You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by lars_escriba <la...@escriba.de> on 2021/05/28 14:44:55 UTC

Call local EJB coming from quartz thread

Hi,

in our application the regular calls to our local ejbs work fine, so no
general problem in looking up from java:global. But we have asynchronous ejb
local calls coming from quartz threads that were triggered from within our
.ear.
But then we don't seem to have a chance to access the correct initial
context.
When calling:
context.lookup("java:global/" + jndiName);
we get:
Caused by: javax.naming.NameNotFoundException: Name
[global/escriba/ConsistencyCheckServiceEJB!de.eeconsultants.escriba.server.services.internal.realm.interfaces.ConsistencyCheckServiceLocal]
is not bound in this Context. Unable to find [global].
                at
org.apache.naming.NamingContext.lookup(NamingContext.java:816)
                at
org.apache.naming.NamingContext.lookup(NamingContext.java:173)
                at
org.apache.naming.SelectorContext.lookup(SelectorContext.java:163)
                at
javax.naming.InitialContext.lookup(InitialContext.java:417)

I am aware that threads in JEE contexts is tricky, but the same code is
working in wildfly/jboss, sap netweaver and websphere.
Is there any magic I could do to make it work in TomEE?

(this is latest TomEE 7.0 web profile)

Best regards,

Lars



--
Sent from: http://tomee-openejb.979440.n4.nabble.com/TomEE-Users-f979441.html