EJB Remote Jndi lookup not bound in Jboss 5.2 EAP
shan_ac Oct 6, 2015 10:37 AMI am trying to migrate Jboss 4.0.5 GA EAP to jboss 5.2 EAP. While doing this I am getting Remote EJB Jndi lookup not bound but same jar working in Jboss 4.0.5 EAP not working in Jboss 5.2 EAP.
Code
@Stateless
@LocalBinding(jndiBinding = "com.x.y.z.CaseDaoBean/local")
@RemoteBinding(jndiBinding = "com.x.y.z.CaseDaoBean/remote")
public final class CaseDaoBean implements CaseDaoLocal, CaseDaoRemote {
Jboss 5.2 EAP server log
2015-10-05 17:58:11,252 INFO [org.jboss.ejb3.deployers.JBossASKernel] (main) installing bean: jboss.j2ee:jar=med-review-dao-5.1.3.jar,name=CaseDaoBean,service=EJB3
2015-10-05 17:58:11,252 INFO [org.jboss.ejb3.deployers.JBossASKernel] (main) with dependencies:
2015-10-05 17:58:11,252 INFO [org.jboss.ejb3.deployers.JBossASKernel] (main) and demands:
2015-10-05 17:58:11,253 INFO [org.jboss.ejb3.deployers.JBossASKernel] (main) jboss.ejb:service=EJBTimerService
2015-10-05 17:58:11,253 INFO [org.jboss.ejb3.deployers.JBossASKernel] (main) and supplies:
2015-10-05 17:58:11,254 INFO [org.jboss.ejb3.deployers.JBossASKernel] (main) jndi:CaseDaoBean/local
2015-10-05 17:58:11,254 INFO [org.jboss.ejb3.deployers.JBossASKernel] (main) Class:com.x.y.z.CaseDaoLocal
2015-10-05 17:58:11,254 INFO [org.jboss.ejb3.deployers.JBossASKernel] (main) jndi:CaseDaoBean/remote-com.x.y.z.CaseDaoRemote
2015-10-05 17:58:11,255 INFO [org.jboss.ejb3.deployers.JBossASKernel] (main) jndi:CaseDaoBean/remote
2015-10-05 17:58:11,255 INFO [org.jboss.ejb3.deployers.JBossASKernel] (main) Class:com.x.y.z.CaseDaoRemote
2015-10-05 17:58:11,255 INFO [org.jboss.ejb3.deployers.JBossASKernel] (main) jndi:CaseDaoBean/local-com.x.y.z.CaseDaoLocal
Client code
final JndiLookup<T> jndi = new JndiLookup<T>();
CaseDaoRemote casedaoRemote=jndi.lookup("com.x.y.z.CaseDaoBean/remote");
Exception
18:14:36,382 | FATAL | pool-flow.seda.servicemix-cxf-se-thread-1 | reAllCasesServiceWrapper | .InquireAllCasesServiceWrapper 61 | Unrecoverable system exception occurred.
com.x.y.z.exceptions.NoridianSystemException: com.x.y.z.CaseDaoBean not bound
If I change Jndi binding/jndi name to "CaseDaoBean/remote" then its works fine.I have many ejbs are there so I want to see if any other solution to resolve and with minimal change.
Working code.
@Stateless
public final class CaseDaoBean implements CaseDaoLocal, CaseDaoRemote {
Client code
final JndiLookup<T> jndi = new JndiLookup<T>();
CaseDaoRemote casedaoRemote=jndi.lookup("CaseDaoBean/remote");