you can spawn a new thread from the main thread, and let the new child thread take care of invoking EJB.
Joined: Aug 19, 2008
Executing the work in a thread is what I would do for a client application. But in the server context it is prohibited to span thread because this process is not under control of the container (App Server). The application server should manage all the resources being indeed.
You can wrap your SLB as a JAS-WS webservice and let your client invoke it asynchronously or you can also wrap it as a one-way webservice. Internally the container would use helper threads to accomplish this.
According to the EJB3 spec you can also send a message to a local MBD without the need for MOM. I have not seen a real world example of this approach.