dev@glassfish.java.net

standalone client jndi lookup

From: Ashish Sahni <Ashish.Sahni_at_Sun.COM>
Date: Wed, 16 May 2007 18:57:57 -0700

Hi Gentlebeings,
I have a standalone client via which I need to connect to a jms resource
in GFv2.
But there seems to be something wrong with my implementation. Details below:

1. The list of resources via asadmin

[ashish_at_hysteria] glassfish > /home/ashish/gf91/publish/glassfish/bin/asadmin list-jms-resources

jms/bsQueue
jms/bsTopic
jms/bsCF
Command list-jms-resources executed successfully.


2. JNDI lookup error combinations and the corresponding errors below

2.1
Trying to lookup java:comp/env/jms/bsCF...
Exception message: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial

2.2
Trying to lookup corbaname:iiop:localhost:3700#jms/bsCF...
Exception message: null
javax.naming.NameNotFoundException [Root exception is org.omg.CosNaming.NamingContextPackage.NotFound: IDL:omg.org/CosNaming/NamingContext/NotFound:1.0]
...

2.3
Trying to lookup corbaname:iiop:localhost:3700#java:/comp/env/jms/bsCF...
Exception message: null
javax.naming.NameNotFoundException [Root exception is org.omg.CosNaming.NamingContextPackage.NotFound: IDL:omg.org/CosNaming/NamingContext/NotFound:1.0]

3. Server is running with default setting (corba port : 3700)
4. Using jndi.properties via appserve-rt.jar in the classpath

What am I missing ?
Also, is it possible to use resource injection in a standalone client ?

Thanks
Ashish