Accessing JMS resources from a standalone java application

D

dsevilla

Dear all:

I've been following the different JMS tutorials on the web, but they
seem to stick to JDK/J2EE version 1.3 mostly. The problem is that I can
reproduce till some extent the steps necessary in the new J2EE 1.4/1.5,
but the problem is that I cannot access the JMS ConnectionFactory from
a remote standalone java application.

This is what I did:

1. I started the "domain1" domain using asadmin application.
2. From the web admin interface I created a JMS ConnectionFactory, name
"jms/ConnectionFactory", type "javax.jms.TopicConnectionFactory".
3. I created a JMS Destination called "Bank".

OK. From the administration Web interface I can see these two objects
when I click "JNDI Browser".

What I want to do now is to contact with this connection factory from
an stand-alone java application. I created the following
jndi.properties file:

java.naming.factory.initial=com.sun.jndi.cosnaming.CNCtxFactory
java.naming.factory.url.pkgs=com.sun.enterprise.naming
java.naming.provider.url=iiop://localhost:3700

Wich means I'm accessing the naming service at port 3700, as instructed
by the J2EE Application Server.

The problem is that when I list all the objects in the initial context,
I only get:

SerialContextProvider
ejb

That is, no "Bank" and no "jms/ConnectionFactory".

My question is: Can I access to that two objects that I need from a
stand-alone application? I need the connection factory to create a
topic and start subscribing and sending messages using JMS.

Any help? Really thanks in advance,
diego.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top