There's a bizare problem with my JNDI Lookup: I create a serialized object and bind it to global jndi space (using a utlility program).
In my Worker thread, all I have to do is to retrieve this Object (the name is obtained from the ActivationSpec) by looking up in the jndi space. Unfortunately when I use lookup methods, I was not getting any response. Infact I can't get the statement(System.out) after lookup printed out. I am able to see the bound Object via JNDIView and also able to retrieve using the above utility program.
Context ctx = new InitialContext();
System.out.println(" looking up");// this prints out
XX a = (XX)ctx.lookup("x/xx");
System.out.println(" ...."); // this never prints out.
I wouldn't want to think of passing Properties as the Worker thread is in the same address space of App Server.
Any thoughts? Am I missing some obvious?
Got it guys, its my mistake - there's a toString on the object that throws up NoClassDef exception (as a class was missing from the packaged jar), unfortunately I was swallowing it!