3 Replies Latest reply on Nov 8, 2011 9:55 AM by Carlo de Wolf

    Custom JNDI bindings without bean interface

    Alexander Koledzhikov Newbie

      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:



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


      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