Sort of OT, but u might able to help.
I'm trying to send a text message to a JMS queue from CFMX (not MX for
J2EE).
I'm using the J2EE Platform Reference Implementation as my queue at the
moment.
I'm using the following code...
<cfscript>
ctx = CreateObject("java","javax.naming.InitialContext");
props = CreateObject("java","java.util.Properties");
props.init();
props.put(ctx.INITIAL_CONTEXT_FACTORY,
"com.sun.jndi.cosnaming.CNCtxFactory");
props.put(ctx.PROVIDER_URL, "iiop://localhost:1050"); // got from j2ee start
up
ic = CreateObject("java","javax.naming.InitialContext");
ic.init(props);
queueConnectionFactory = ic.lookup("jms/jndi-QueueConnectionFactory");
queue = ic.lookup("MyQueue");
queueConnection = queueConnectionFactory.createQueueConnection();
sessionObj = CreateObject("java","javax.jms.Session");
queueSession = queueConnection.createQueueSession(false,
sessionObj.AUTO_ACKNOWLEDGE);
queueSender = queueSession.createSender(queue);
message = queueSession.createTextMessage();
message.setText("TEST");
queueSender.send(message);
queueConnection.close();
</cfscript>
It seems to be breaking here
queueConnectionFactory = ic.lookup("jms/jndi-QueueConnectionFactory");
Any ideas
Thanks WG
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=8
Subscription:
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=8
This list and all House of Fusion resources hosted by CFHosting.com. The place for
dependable ColdFusion Hosting.