3 Replies Latest reply on Nov 8, 2011 9:55 AM by wolfc

    Custom JNDI bindings without bean interface

    akoledzhikov

      Is there a way to have stateless ejb bound to custom jndi name (since the default names are quite verbose and somewhat confusing) without providing a local/remote interface. Currently, I'm doing it like this:

       

      @Stateless

      @EJB(name = "java:global/ejb/AlienEntityHome", beanInterface = AlienEntityHomeInterface.class)

      @SuppressWarnings("unchecked")

      public class AlienEntityHome implements AlienEntityHomeInterface

       

      but, since EJB 3.1 specification says that interfaces are no longer required, I thought it should be possible to ommit it. Unfrotunately, when I try to skip the interface, I get:

       

      org.jboss.as.server.deployment.DeploymentUnitProcessingException: @EJB attribute 'beanInterface' is required fo class level annotations.

       

      Any ideas how can I have custom jndi name and take advantage of the new spec at the same time? Thanks in advance