4 Replies Latest reply on Dec 15, 2008 8:43 AM by jaikiran pai

    JNDI Binding not working in JBoss-5 Beta 4

    James Callaghan Newbie

      I've got an application that deploys fine on JBoss404 and JBoss422. I'm now trying out JBoss5 (Beta4) and can't get my EJBs deployed where I want them. I'm using:

      @Stateless
      @LocalBinding(jndiBinding = HibernateDaoBeanInterface.JNDI_LOCATION_LOCAL)
      @RemoteBinding(jndiBinding = HibernateDaoBeanInterface.JNDI_LOCATION_REMOTE)
      public class HibernateDaoBean<VO> implements HibernateDaoBeanInterface.ILocal<VO>,
       HibernateDaoBeanInterface.IRemote<VO>
      {
      ...
      



      at the top of my EJB class. The values are defined in this interface as:

      public interface HibernateDaoBeanInterface<VO> extends HibernateDaoInterface<VO>
      {
      public static final String JNDI_LOCATION_LOCAL = "/ejb3/my_application/HibernateDaoBean/prod/local";
      public static final String JNDI_LOCATION_REMOTE = "/ejb3/my_application/HibernateDaoBean/prod/remote";
      ...
      


      However, when I look at the JNDI view in the JMX console I can see that the EJBs are being deployed in the default locations. It is as if the binding annotations are being ignored. I've been searching around but haven't discovered anyone having a similar problem.

      This is happening to all of the EJB3 objects in my application. The JNDI view shows me this:

      +- 10.platform.local.20080624.1239
       | +- PlatformDAOBeanImpl
       | | +- local (proxy: $Proxy168 ...
       | +- QueueConnectionServiceBean
       | | +- local (proxy: $Proxy141 ...
       | | +- remote (proxy: $Proxy140 ...
       | +- AddBulkMessagesToDatabaseBean
       | | +- local (proxy: $Proxy153 ...
       | | +- remote (proxy: $Proxy152 ...
       | +- HibernateDaoBean
       | | +- local (proxy: $Proxy145 ...
       | | +- remote (proxy: $Proxy144 ...
       | +- JbpmServiceBean
       | | +- local (proxy: $Proxy149 ...
       | | +- remote (proxy: $Proxy148 ...
       | +- SendAMessageFromCommandLineBean
       | | +- remote (proxy: $Proxy160 ...
       | +- BatchFilesProcessingInfoBean
       | | +- local (proxy: $Proxy157 ...
       | | +- remote (proxy: $Proxy156 ...


      As you can see, the bean object is NOT bound to ejb3/my_application/...