Hi

it is expected or more explicitly unspecified. EJB as web env (servlet)
have their own jndi tree (you can configure some parts in ejb-jar.xml or
web.xml) so if you are not in this context then it is up to you to make it
work or not.

Easy workaround is to wrap the lookup in a known context
(ejb.doInContext(() -> return lookup()); for instance)


Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<https://blog-rmannibucau.rhcloud.com> | Old Wordpress Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
<http://www.tomitribe.com> | JavaEE Factory
<https://javaeefactory-rmannibucau.rhcloud.com>

2016-06-13 10:10 GMT+02:00 Dignesh <dgo...@opentext.com>:

> Hi,
>
> JNDI look up to EJB's fail if the look up is done from user spawned thread.
>
> I am forking a new thread in my servlet and doing a JNDI look up to EJB,
> and
> it is failing. Is it is a bug or it is expected behaviour.
>
>
>
> --
> View this message in context:
> http://tomee-openejb.979440.n4.nabble.com/JNDI-look-up-fails-in-user-spwaned-thread-tp4678861.html
> Sent from the TomEE Dev mailing list archive at Nabble.com.
>

Reply via email to