Do you have any jndi.properties files in the classpath of the client, if you do the properties will be retrieved from there if you do not provide them yourself.
I think some of the JBoss jar files contain a jndi.properties so depending on which jar files you have included is could be one of those.
Thankyou for your response.
I dont have any properties file in classpath.
Is there any advantage of specifying the properties while look up instead of using the default properties?
What is the full classpath that you are using for the client and which version of JBoss are you using?
The connection details have got to be obtained from somewhere.
I am using Jboss 3.0.8 and in my classpath i have only run.jar. Actually i am doing a lookup of local home interface.
Is it because i am doing a lookup of local home interface i am able to do it without specifying the properties?
Thanks a lot for your support.
That makes sense now,
If you are running a client inside the same JBoss JVM do not provide any properties for the InitialContext and the JBoss defaults will be used.
If you are running a client outside of the JBoss JVM you will need to supply all the properties either as properties supplied to the InitialContext constructor or within a jndi.properties file on the classpath.