[Jboss-cvs] JBoss Messaging SVN: r1315 - branches/Branch_1_0/tests/src/org/jboss/test/messaging/jms
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Sep 19 00:07:10 EDT 2006
Author: ovidiu.feodorov at jboss.com
Date: 2006-09-19 00:07:09 -0400 (Tue, 19 Sep 2006)
New Revision: 1315
Modified:
branches/Branch_1_0/tests/src/org/jboss/test/messaging/jms/JMSTest.java
Log:
added one more basic test case
Modified: branches/Branch_1_0/tests/src/org/jboss/test/messaging/jms/JMSTest.java
===================================================================
--- branches/Branch_1_0/tests/src/org/jboss/test/messaging/jms/JMSTest.java 2006-09-19 00:30:56 UTC (rev 1314)
+++ branches/Branch_1_0/tests/src/org/jboss/test/messaging/jms/JMSTest.java 2006-09-19 04:07:09 UTC (rev 1315)
@@ -153,7 +153,7 @@
conn.close();
}
- public void test_NonPersistent_Transactional() throws Exception
+ public void test_NonPersistent_Transactional_Send() throws Exception
{
ConnectionFactory cf = (ConnectionFactory)ic.lookup("/ConnectionFactory");
@@ -191,6 +191,40 @@
conn.close();
}
+ public void test_NonPersistent_Transactional_Acknowledgment() throws Exception
+ {
+ ConnectionFactory cf = (ConnectionFactory)ic.lookup("/ConnectionFactory");
+
+ Queue queue = (Queue)ic.lookup("/queue/JMSTestQueue");
+
+ Connection conn = cf.createConnection();
+
+ Session session = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
+
+ MessageProducer prod = session.createProducer(queue);
+ prod.setDeliveryMode(DeliveryMode.NON_PERSISTENT);
+ TextMessage m = session.createTextMessage("one");
+ prod.send(m);
+
+ conn.close();
+
+ conn = cf.createConnection();
+
+ session = conn.createSession(true, Session.SESSION_TRANSACTED);
+
+ MessageConsumer cons = session.createConsumer(queue);
+
+ conn.start();
+
+ TextMessage rm = (TextMessage)cons.receive();
+ assertEquals("one", rm.getText());
+
+ session.commit();
+
+ conn.close();
+ }
+
+
public void test_NonPersistent_NonTransactional_Asynchronous_to_Client() throws Exception
{
ConnectionFactory cf = (ConnectionFactory)ic.lookup("/ConnectionFactory");
More information about the jboss-cvs-commits
mailing list