You need to pass two properties to the InitialContext, viz., Context.INITIAL_CONTEXT_FACTORY and Context.PROVIDER_URL. You can refer to the sample client at the following location:Writing an ejb client
Thanks for your reply Nitesh... I am wondering how come the authors of Head First EJB not mentioned anything about this and whether without the properties on InitialContext it will work(optional)?
Micheal John
SCJP 1.4 (86%), SCWCD 1.4 (86%), SCBCD 1.3 (85%), SCDJWS (Just Started...) - Satisfaction Lies in Our EFFORT, Not in the ATTAINMENT
I dont think that without the properties the initial context can be created. You can see the Initial context javadocs for the details. Probably, you have the properties available in some property file in the classpath.
Can you send me the link where you downloaded the J2EE1.3 server. I have searched but couldn't get that, so i have downloaded the J2EE server 8.0.. i think it's 1.4 and installed it.. If I have 1.3, then it will be nice..
Micheal John
SCJP 1.4 (86%), SCWCD 1.4 (86%), SCBCD 1.3 (85%), SCDJWS (Just Started...) - Satisfaction Lies in Our EFFORT, Not in the ATTAINMENT
You know it is dark times when the trees riot. I think this tiny ad is their leader:
The Low Tech Laboratory Movie Kickstarter is LIVE NOW!