Hello,<br />
<br />
I want to connect to the JMS Server on WAS 6.02 with a standalone jms-client. I have seen that I need specific jars to get it working, so I have considered the instructions in
http://www-1.ibm.com/support/docview.wss?uid=swg21195691 (IBM Client for JMS on J2SE with IBM WebSphere Application Server)<br />
<br />
I am using following lines of code to get it working:<br />
<br />
Hashtable env = new Hashtable();<br />
env.put(Context.INITIAL_CONTEXT_FACTORY,<br />
"com.ibm.websphere.naming.WsnInitialContextFactory");<br />
env.put(Context.PROVIDER_URL, "iiop://localhost:2810");<br />
Context c = new InitialContext(env);<br />
ConnectionFactory factory = (ConnectionFactory) c<br />
.lookup("jms/JMSCustomBindingFactory");<br />
Destination destination = (Destination) c<br />
.lookup("jms/JMSCustomBinding_Export_Receive_Q");<br />
// Create the connection and session<br />
Connection connection = factory.createConnection(); // HERE I AM GETTING THE ERROR<br />
Session session = connection.createSession(false,<br />
Session.AUTO_ACKNOWLEDGE);<br />
<br />
// Use the session and destination to create the producer<br />
MessageProducer producer = session.createProducer(destination);<br />
<br />
I am getting following error:<br />
<br />
Exception in thread "P=729787:O=0:CT" javax.jms.JMSException: CWSIA0241E: An exception was received during the call to the method JmsManagedConnectionFactoryImpl.createConnection: com.ibm.websphere.sib.exception.SIResourceException: CWSIT0006E: It is not possible to connect to bus SCA.APPLICATION.esbCell.Bus because the following bootstrap servers could not be contacted <a href="
http://www-128.ibm.com/developerworks/forums/">localhost:7276:BootstrapBasicMessaging] and the following bootstrap servers returned an error condition [</a>. See previous messages for the reason for each bootstrap server failure..<br />
at com.ibm.ws.sib.api.jms.impl.JmsManagedConnectionFactoryImpl.createConnection(JmsManagedConnectionFactoryImpl.java:240)<br />
at com.ibm.ws.sib.api.jms.impl.JmsManagedConnectionFactoryImpl.createConnection(JmsManagedConnectionFactoryImpl.java:159)<br />
at com.ibm.de.jms.SessionClient.lookupSessionAddBean(SessionClient.java:103)<br />
at com.ibm.de.jms.SessionClient.main(SessionClient.java:61)<br />
Caused by: com.ibm.websphere.sib.exception.SIResourceException: CWSIT0006E: It is not possible to connect to bus SCA.APPLICATION.esbCell.Bus because the following bootstrap servers could not be contacted <a href="
http://www-128.ibm.com/developerworks/forums/">localhost:7276:BootstrapBasicMessaging] and the following bootstrap servers returned an error condition [</a>. See previous messages for the reason for each bootstrap server failure.<br />
at com.ibm.ws.sib.trm.client.TrmSICoreConnectionFactoryImpl2.bootstrapRequest(TrmSICoreConnectionFactoryImpl2.java:607)<br />
at com.ibm.ws.sib.trm.client.TrmSICoreConnectionFactoryImpl2.remoteBootstrap(TrmSICoreConnectionFactoryImpl2.java:404)<br />
at com.ibm.ws.sib.trm.client.TrmSICoreConnectionFactoryImpl2.createConnection(TrmSICoreConnectionFactoryImpl2.java:239)<br />
at com.ibm.ws.sib.trm.client.TrmSICoreConnectionFactoryImpl2.createConnection(TrmSICoreConnectionFactoryImpl2.java:144)<br />
at com.ibm.ws.sib.api.jmsra.impl.JmsJcaConnectionFactoryImpl.createCoreConnection(JmsJcaConnectionFactoryImpl.java:545)<br />
at com.ibm.ws.sib.api.jmsra.impl.JmsJcaConnectionFactoryImpl.createCoreConnection(JmsJcaConnectionFactoryImpl.java:481)<br />
at com.ibm.ws.sib.api.jmsra.impl.JmsJcaConnectionFactoryImpl.createConnection(JmsJcaConnectionFactoryImpl.java:302)<br />
at com.ibm.ws.sib.api.jms.impl.JmsManagedConnectionFactoryImpl.createConnection(JmsManagedConnectionFactoryImpl.java:206)<br />
... 3 more<br />
<br />
I have seen that the error is listed in<br />
http://www-1.ibm.com/support/docview.wss?uid=swg21195691<br />
<br />
I have checked the resources.xml and see that the ports are not equal to my one. On Port 7276 does nobody listen, only on port 7277.<br />
netstat -an|find "7276" -> nothing<br />
netstat -an|find "7277" -> listening port<br />
<br />
I have created two profiles, so I think the port difference is caused by the second profile.<br />
<br />
My question is now:<br />
1. How can I change the port in the client?<br />
2. If I would change the port to the needed port, the other profile cannot work correctly, right?<br />
<br />
Thanks for your help.<br />
Regards,<br />
Jens