wood burning stoves 2.0*
The moose likes BEA/Weblogic and the fly likes Communicating with JMS queue in Different Domain on same machine Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » BEA/Weblogic
Bookmark "Communicating with JMS queue in Different Domain on same machine" Watch "Communicating with JMS queue in Different Domain on same machine" New topic
Author

Communicating with JMS queue in Different Domain on same machine

Priya Dorairaj
Greenhorn

Joined: Dec 11, 2005
Posts: 1
Hi,
I get this following exception on trying to send message to a JMS queue which is configured on a different domain ,but residing on the same machine from which i'm sending the message .
This is the client which sends the JMS message
try {
Hashtable ht = new Hashtable();
ht.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
ht.put(Context.PROVIDER_URL, "t3://216.89.196.169:6001" );
Context ic = new InitialContext(ht);
QueueConnectionFactory factory = (QueueConnectionFactory) ic.lookup(connFactory);
Queue queue = (Queue) ic.lookup("QueueName")
QueueConnection connect = factory.createQueueConnection();
logger.info("Queue connection is created");
QueueSession session = connect.createQueueSession(true,Session.AUTO_ACKNOWLEDGE);
QueueSender sender = session.createSender(queue);
TextMessage msg = session.createTextMessage(ackDoc.toString());
sender.send((Message) msg);
logger.info("Ack is placed in the Queue");
connect.close();
logger.info("Queue connection is closed");
return true;
} catch(JMSException jmse) {
logger.error(SDASMessages.JMS_EXCEPTION, (Throwable) jmse);
return false;
} catch (NamingException ne) {
logger.error(SDASMessages.NAMING_EXCEPTION, (Throwable) ne);
return false;
} catch(NullPointerException npe) {
logger.error(SDASMessages.NULL_EXCEPTION, (Throwable) npe);
return false;
}
}



weblogic.jms.common.JMSException: Connection not found
at weblogic.jms.dispatcher.InvocableManager.invocableFind(InvocableManager.java:136)
at weblogic.jms.dispatcher.Request.wrappedFiniteStateMachine(Request.java:608)
at weblogic.jms.dispatcher.DispatcherImpl.dispatchSync(DispatcherImpl.java:153)
at weblogic.jms.client.JMSConnection.createSessionInternal(JMSConnection.java:400)
at weblogic.jms.client.JMSConnection.createQueueSession(JMSConnection.java:347)

Is this the right approach to communicate with queue in differnt domain but in same machine?
please let me know ur suggestions.
Thanks In Advance
Sri
ankush purwar
Ranch Hand

Joined: Sep 02, 2005
Posts: 46
Yes, you can do it.
It means there are two servers running on same machine with different ports.
Make sure you are using the right port and configured JMS servers properly.
sripriya Ranganathan
Greenhorn

Joined: Jun 27, 2005
Posts: 7
Hi,
Thanks,
It is working!!
Sri
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Communicating with JMS queue in Different Domain on same machine
 
Similar Threads
weblogic 10 + JMS
URGENT Help Needed regarding the sending XML file to the JMS Queue
MQ : error while browsing queues
JMS Request/Reply mode
how to receive message from a queue