I have a web component that needs to send data to a remote queue. Both machines
are running JBoss 4, but I cannot get the web client to communicate with the
remote server, it always communicates with the local machine. I have setup the
remote properties as follows in my web component:
Properties properties = new Properties();
properties.put(Context.INITIAL_CONTEXT_FACTORY,
"org.jnp.interfaces.NamingContextFactory");
properties.put(Context.URL_PKG_PREFIXES, "org.jboss.naming rg.jnp.interfaces");
properties.put(Context.PROVIDER_URL, "jnp://server_url:1099");
Context jndiContext = new InitialContext(properties);
connectionFactory = (ConnectionFactory)
jndiContext.lookup("java:comp/env/ConnectionFactory");
destination = (Destination) jndiContext.lookup("queue/testQueue");
connection = connectionFactory.createConnection();
session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
messageProducer = session.createProducer(destination);
Queue tempQueue = session.createTemporaryQueue();
MessageConsumer qReceiver = session.createConsumer(tempQueue);
connection.start();
ObjectMessage message = session.createObjectMessage(jmsObj);
message.setJMSReplyTo(tempQueue);
messageProducer.send(message);
Message msg = qReceiver.receive(TIMEOUT);
processMessage(msg);
if both the web component and server component are located on the same machine,
all is well, but when they are on separate machines the web component just
times-out. There are no thrown exceptions, as i believe the web component is
attached to the locahost queue instead of the remote server queue. I have not
updated any of the JBoss xml files as I am using the pre-configured
"ConnectionFactory" and "queue/testQueue".
Any help would be greatly appreciated.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3923021#3923021
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3923021
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user