Accessing JMS resources from a standalone java application

Discussion in 'Java' started by dsevilla@gmail.com, Nov 6, 2006.

  1. Guest

    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.
     
    , Nov 6, 2006
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. may
    Replies:
    0
    Views:
    988
  2. Thomas Stein
    Replies:
    0
    Views:
    804
    Thomas Stein
    Oct 18, 2004
  3. Russell E. Owen
    Replies:
    0
    Views:
    736
    Russell E. Owen
    Sep 8, 2006
  4. cpreiche
    Replies:
    0
    Views:
    337
    cpreiche
    Apr 16, 2007
  5. Replies:
    0
    Views:
    462
Loading...

Share This Page