Skip to main content
Summary How to set username and password on a JMS conduit in Artix 5.5 JAX-WS, using Java code
Article Number 13331
Environment All Supported Operating Systems Artix 5.5
Question/Problem Description How to set username and password on a JMS conduit in Artix 5.5 JAX-WS, using Java code
How to specify JMS config programatically for Artix 5.5 JAX-WS (specifically username and password)
How to set the credentials on a JMS endpoint, using Java code, in Artix JAX-WS
Clarifying Information
Error Message
Defect/Enhancement Number
Cause
Resolution

The credentials (username and password) for a JMS endpoint can be set by getting the JMS Conduit, and setting them on the JMSConfiguration object. 

Here is an example:

Client client = ClientProxy.getClient(greeter);
Conduit conduit=client.getConduit();
JMSConduit jmsConduit=(JMSConduit)conduit;
JMSConfiguration jmsConfiguration=jmsConduit.getJmsConfig();
String user= "username";
String password="password";
jmsConfiguration.getJndiConfig().setConnectionUserName(user);
jmsConfiguration.getJndiConfig().setConnectionPassword(password); 

Workaround
Notes
Attachment
Created date: 06 September 2011
Last Modified: 13 February 2013
Last Published: 23 June 2012
First Published date: 09 September 2011

#KnowledgeDocs
#Orbix