call EJB from a thread , pb with lookup
843829Aug 21 2003 — edited Aug 21 2003Hello,
I have seen taht it is possible to call an EJB within a thread that can act as a client. But in my case when the thread calls the EJB method the lookup failed. I do exactly the same like if I call the ejb from an external client.
In my case I have got the following architecture:
one MDB which receive a message the pass the a "manager of thread" which select a thread and then this thread calls a session bean. Everything goes well until the thread call the EJB method and at this time the lookup fail. I call from local interface as I constructed my jar with all this components inside, i.e the MDB, the thread manager, threads and the session bean.
I tried to call the session bean from the MDB in the same way I have done from the thread and in that configuration its ok.
Is there a specific manner to lookup an ejb when we want to call it from a thread or simply this configuration is completely impossible?
Thanks for any advice