tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hwaastad <he...@waastad.org>
Subject Re: basic ejb lookup question...
Date Thu, 15 May 2014 07:38:29 GMT
Something strange is happening with email to this list...it bounces.
And a reply from Romain never got into the list:

---
Remote bean name, ejb-name no link with java itself if you dont name your
ejb as the implementation
---


Anyway,

I had @Stateless @LocalBean on my bean implementation.
Removing @localbean made the jndi lookup work, both with
localinitialcontextfactory and remoteinitialcontextfactory
@EJB(mappedName = "jndi:ext://myInitialContext/ResourceBeanRemote")

(is there a reason why this is so?)

output:

With @LocalBean:

INFO - Auto-deploying ejb ResourceBean:
EjbDeployment(deployment-id=ResourceBean)
INFO - Jndi(name=ResourceBeanLocalBean) --> Ejb(deployment-id=ResourceBean)
INFO -
Jndi(name=global/EjbLookup/ResourceBean!com.mycompany.ejblookup.ejb.business.ResourceBean)
--> Ejb(deployment-id=ResourceBean)
INFO - Jndi(name=ResourceBeanRemote) --> Ejb(deployment-id=ResourceBean)
INFO -
Jndi(name=global/EjbLookup/ResourceBean!com.mycompany.ejblookup.ejb.business.ResourceBeanRemote)
--> Ejb(deployment-id=ResourceBean)
INFO - Jndi(name=global/EjbLookup/ResourceBean) -->
Ejb(deployment-id=ResourceBean)
INFO - Created Ejb(deployment-id=ResourceBean, ejb-name=ResourceBean,
container=Default Stateless Container)
INFO - Started Ejb(deployment-id=ResourceBean, ejb-name=ResourceBean,
container=Default Stateless Container)

Without @Localbean:

INFO - Auto-deploying ejb ResourceBean:
EjbDeployment(deployment-id=ResourceBean)
INFO - Jndi(name=ResourceBeanRemote) --> Ejb(deployment-id=ResourceBean)
INFO -
Jndi(name=global/EjbLookup/ResourceBean!com.mycompany.ejblookup.ejb.business.ResourceBeanRemote)
--> Ejb(deployment-id=ResourceBean)
INFO - Jndi(name=global/EjbLookup/ResourceBean) -->
Ejb(deployment-id=ResourceBean)
INFO - Created Ejb(deployment-id=ResourceBean, ejb-name=ResourceBean,
container=Default Stateless Container)
INFO - Started Ejb(deployment-id=ResourceBean, ejb-name=ResourceBean,
container=Default Stateless Container)

br hw



--
View this message in context: http://openejb.979440.n4.nabble.com/basic-ejb-lookup-question-tp4669243p4669339.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Mime
View raw message