Skip to Content
author's profile photo Former Member
Former Member

How to access a remote JMS queue from a client program?

On system X (with SAP XI and Web AS server installed) messages are written to a JMS queue. Connection factories, queues etc. are defined and created only on system X.

Now I want to access this JMS queue from a client program running on another system Y (where both SAP Netweaver Developer Studio and Web AS are installed).

What must I do in order that the client program on system Y can access the queue on system X? Do I have to create a connection factory and a queue on system Y though I want to access those on system X? Are there written instructions and example Java programs for this scenario?

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Posted on Nov 04, 2004 at 08:59 AM

    Hi Leendert,

    do you want to use the JMS API directly? In this case you have to create the connection factory on system X. From system Y, you access the JNDI on system X and look up the connection factory. Since you are accessing the JNDI on system X from outside, you need to set some properties to create the InitialContext:

    Properties env = new Properties();

    env.put(Context.INITIAL_CONTEXT_FACTORY, "");

    env.put(Context.PROVIDER_URL, <system X>:<p4 port>); // replace with your settings

    env.put(Context.SECURITY_PRINCIPAL, <user name>); // replace with your settings

    env.put(Context.SECURITY_CREDENTIALS, <password>); // replace with your settings

    naming = new InitialContext(env);

    Hope that helps.



    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.