[jboss-cvs] JBoss Messaging SVN: r5517 - trunk/examples/messaging/src/org/jboss/messaging/example.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu Dec 11 12:18:53 EST 2008
Author: jmesnil
Date: 2008-12-11 12:18:53 -0500 (Thu, 11 Dec 2008)
New Revision: 5517
Modified:
trunk/examples/messaging/src/org/jboss/messaging/example/HttpClient.java
Log:
removed dependency to a JMS class
Modified: trunk/examples/messaging/src/org/jboss/messaging/example/HttpClient.java
===================================================================
--- trunk/examples/messaging/src/org/jboss/messaging/example/HttpClient.java 2008-12-11 15:13:49 UTC (rev 5516)
+++ trunk/examples/messaging/src/org/jboss/messaging/example/HttpClient.java 2008-12-11 17:18:53 UTC (rev 5517)
@@ -21,6 +21,8 @@
*/
package org.jboss.messaging.example;
+import java.util.HashMap;
+
import org.jboss.messaging.core.client.ClientConsumer;
import org.jboss.messaging.core.client.ClientMessage;
import org.jboss.messaging.core.client.ClientProducer;
@@ -29,11 +31,8 @@
import org.jboss.messaging.core.client.impl.ClientSessionFactoryImpl;
import org.jboss.messaging.core.config.TransportConfiguration;
import org.jboss.messaging.core.exception.MessagingException;
-import org.jboss.messaging.jms.client.JBossTextMessage;
import org.jboss.messaging.util.SimpleString;
-import java.util.HashMap;
-
/**
* Uses the core messaging API to send and receive a message to a queue via http. You will need to enable the server with
* the netty http acceptor for this to work.
@@ -53,8 +52,7 @@
clientSession = sessionFactory.createSession(false, true, true);
SimpleString queue = new SimpleString("queuejms.testQueue");
ClientProducer clientProducer = clientSession.createProducer(queue);
- ClientMessage message = clientSession.createClientMessage(JBossTextMessage.TYPE, false, 0,
- System.currentTimeMillis(), (byte) 1);
+ ClientMessage message = clientSession.createClientMessage(false);
message.getBody().putString("Hello!");
clientProducer.send(message);
ClientConsumer clientConsumer = clientSession.createConsumer(queue);
More information about the jboss-cvs-commits
mailing list