Are threads "already" allowed in the J2EE specification ?
Threads were prohibited in the J2EE specifications since the first version (until now ?). They fail in context lookup because they do not have the Container Context.
Try to use the lookup as if you're using an external client, maybe this could help.
If you wanna an correct thread approach in J2EE, try to use JMS queue.
Threads are always forbidden inside a JEE application, it is in the responsibility of the server.
but you might use Asynchronous EJB's according to the EJB3.1 spec.
Sandip, how do you initialize the InitialContext before issuing lookup?
Try to remove property "jboss.naming.client.ejb.context" in a Properties object passed to InitialContext
and use jboss-ejb-client.properties in your client.