Hi
a workaround can be to have an EJB:
@Singleton @Lock(READ)
public class NamingEjb {
public void run(fnal Runnable run) {
run.run();
}
}
and execute your code as a runnable with it. Then it will be executed
in the EJB JNDI context and it should work
Romain Manni-Bucau
@rmannibucau
http://www.tomitribe.com
http://rmannibucau.wordpress.com
https://github.com/rmannibucau
2014-11-17 22:06 GMT+01:00 [email protected]
<[email protected]>:
> Hi Romain,
>
> Thanks for the lightening quick answer! I hadn't realized that. Is there an
> alternative if I want to run a simple main program with local references
> available for lookup? I actually also tried bootstrapping with 'new
> InitialContext' instead of EJBContainer.createEJBContainer, but with same
> result.
>
> My goal is first to setup a testing environment for an existing application,
> but then see if it can work as a production environment as well. The local
> ejb references end up being accessed by the Spring framework.
>
> Thanks!
> Boris
>
>
>
> --
> View this message in context:
> http://tomee-openejb.979440.n4.nabble.com/using-local-ejb-reference-in-the-embedded-container-tp4672896p4672898.html
> Sent from the TomEE Users mailing list archive at Nabble.com.