JBoss and jndi

Hey all, I am trying to write a stand alone client that accesses a java message queue on a remote machine. This machine is implementing JBoss technology.

I assume I need to use a jndi lookup. I have tried created an inital context. For example,

Hashtable environment = new Hashtable();

jndiContext = new InitialContext(environment);

Now, obviously I need to add something to this environment. So far, anything I try to add/modify to this environment throws a multitude of exceptions. If anybody can point me to a tutorial on using JBoss + remote jndi lookups, or can give me some help on what to put into my environment I would be very thankful. I have spent hours trying to find a tutorial / read forums, but no luck. Thanks

[758 byte] By [Trunks7712a] at [2007-11-27 5:32:33]
# 1

Hi

Set these 2 properties.

Properties env = new Properties();

env.put"java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");

env.put("java.naming.provider.url", "jnp://<RemoteIPAddress>:1099");

Context ctx = new InitialContext(env);

Cheers!!!

sr_sindheya at 2007-7-12 14:58:47 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 2

Hey, Thanks for your response. I've added those to the environment, however I am now getting an exception.

javax.naming.NameNotFoundException: QueueName not bound.

I have found no useful information on this excpetion. Also does it matter whether I create my environment using a HashTable vs Properties classes? Thanks =)

Trunks7712a at 2007-7-12 14:58:47 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 3
Try this http://wiki.jboss.org/wiki/Wiki.jsp?page=QueueExampleRegards,Bhavani
polimetlaa at 2007-7-12 14:58:47 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...