Posted By:
Bert_Depaz
Posted On:
Monday, March 24, 2003 02:41 AM
Hi, I'm currently heaving a problem with getting my connection to my JMS server. The server I'm trying to connect to is a Weblogic 7. As the client I'm using an IBM Business Connector Integerator (bridge between SAP and Java). I wanted to put the message this BC receives on a JMS Queue, So I entered the following code: try{ Hashtable ht = new Hashtable(); ht.put(Context.SECURITY_PRINCIPAL, "principal"); ht.put(Context.SECURITY_CREDENTIALS, "credentials"); ht.put(Context.PROVIDER_URL, "t3://10.129.34.18:7007"); ht.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory"); Initia
More>>
Hi,
I'm currently heaving a problem with getting my connection to my JMS server. The server I'm trying to connect to is a Weblogic 7.
As the client I'm using an IBM Business Connector Integerator (bridge between SAP and Java). I wanted to put the message this BC receives on a JMS Queue, So I entered the following code:
try{
Hashtable ht = new Hashtable();
ht.put(Context.SECURITY_PRINCIPAL, "principal");
ht.put(Context.SECURITY_CREDENTIALS, "credentials");
ht.put(Context.PROVIDER_URL, "t3://10.129.34.18:7007");
ht.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
InitialContext ctx = new InitialContext(ht);
QueueConnectionFactory jmsFactory =
(QueueConnectionFactory) ctx.lookup("JMSQueueConnectionFactory");
QueueConnection jmsConnection = jmsFactory.createQueueConnection();
QueueSession jmsQsession = jmsConnection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
Queue jmsQueue = (Queue) ctx.lookup("MyQueue");
QueueSender jmsQsender = jmsQsession.createSender(jmsQueue);
TextMessage txtMsg = jmsQsession.createTextMessage();
jmsConnection.start();
//Putting message on the queue
txtMsg.setText(messageData);
jmsQsender.send(txtMsg);
jmsQsender.close();
jmsQsession.close();
jmsConnection.close();
} catch (Exception ex) {
System.out.println(ex.toString());
throw new ServiceException("B -- Exception " + ex.toString());
}
The error I'm getting is this:
javax.naming.CommunicationException [Root exception is java.net.ConnectException: t3://10.129.34.18:7007: Bootstrap to: 'backoffice/10.129.34.18:7007' over: 't3' got an error or timed out]
Both client and server app are running on the same physical machine.
Does anybody have any idea where I can find what the problem is ?
All your help is being appreciated..
<<Less