[jboss-cvs] JBossAS SVN: r112242 - in branches/JBPAPP_5_0_1_GA_JBPAPP-7203/testsuite: src/main/org/jboss/test/bootstrapdependencies/jbas5349/ejb2 and 19 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Wed Sep 14 16:43:33 EDT 2011
Author: jbertram at redhat.com
Date: 2011-09-14 16:43:33 -0400 (Wed, 14 Sep 2011)
New Revision: 112242
Added:
branches/JBPAPP_5_0_1_GA_JBPAPP-7203/testsuite/src/main/org/jboss/test/ejb3/jbpapp6855/
branches/JBPAPP_5_0_1_GA_JBPAPP-7203/testsuite/src/main/org/jboss/test/ejb3/jbpapp6855/SimpleMDBWithAUnSupportedActivationConfigProp.java
branches/JBPAPP_5_0_1_GA_JBPAPP-7203/testsuite/src/main/org/jboss/test/ejb3/jbpapp6855/unit/
branches/JBPAPP_5_0_1_GA_JBPAPP-7203/testsuite/src/main/org/jboss/test/ejb3/jbpapp6855/unit/MDBActivationConfigPropTestCase.java
branches/JBPAPP_5_0_1_GA_JBPAPP-7203/testsuite/src/resources/ejb3/jbpapp6855/
branches/JBPAPP_5_0_1_GA_JBPAPP-7203/testsuite/src/resources/ejb3/jbpapp6855/META-INF/
branches/JBPAPP_5_0_1_GA_JBPAPP-7203/testsuite/src/resources/ejb3/jbpapp6855/META-INF/jboss.xml
Removed:
branches/JBPAPP_5_0_1_GA_JBPAPP-7203/testsuite/src/main/org/jboss/test/ejb3/jbpapp6855/SimpleMDBWithAUnSupportedActivationConfigProp.java
branches/JBPAPP_5_0_1_GA_JBPAPP-7203/testsuite/src/main/org/jboss/test/ejb3/jbpapp6855/unit/
branches/JBPAPP_5_0_1_GA_JBPAPP-7203/testsuite/src/main/org/jboss/test/ejb3/jbpapp6855/unit/MDBActivationConfigPropTestCase.java
branches/JBPAPP_5_0_1_GA_JBPAPP-7203/testsuite/src/resources/ejb3/jbpapp6855/META-INF/
branches/JBPAPP_5_0_1_GA_JBPAPP-7203/testsuite/src/resources/ejb3/jbpapp6855/META-INF/jboss.xml
Modified:
branches/JBPAPP_5_0_1_GA_JBPAPP-7203/testsuite/imports/sections/ejb3.xml
branches/JBPAPP_5_0_1_GA_JBPAPP-7203/testsuite/src/main/org/jboss/test/bootstrapdependencies/jbas5349/ejb2/
branches/JBPAPP_5_0_1_GA_JBPAPP-7203/testsuite/src/main/org/jboss/test/bootstrapdependencies/jbas5349/ejb3/
branches/JBPAPP_5_0_1_GA_JBPAPP-7203/testsuite/src/main/org/jboss/test/bootstrapdependencies/jbas5349/sar/
branches/JBPAPP_5_0_1_GA_JBPAPP-7203/testsuite/src/main/org/jboss/test/bootstrapdependencies/jbas5349/servlet/
branches/JBPAPP_5_0_1_GA_JBPAPP-7203/testsuite/src/main/org/jboss/test/bootstrapdependencies/jbas5349/test/
branches/JBPAPP_5_0_1_GA_JBPAPP-7203/testsuite/src/main/org/jboss/test/classloader/leak/test/Ejb3ClassloaderLeakTestBase.java
branches/JBPAPP_5_0_1_GA_JBPAPP-7203/testsuite/src/main/org/jboss/test/classloader/leak/test/IsolatedEarWithDualCommonsLoggingClassloaderLeakTestCase.java
branches/JBPAPP_5_0_1_GA_JBPAPP-7203/testsuite/src/main/org/jboss/test/classloader/leak/test/J2EEClassloaderLeakTestBase.java
branches/JBPAPP_5_0_1_GA_JBPAPP-7203/testsuite/src/main/org/jboss/test/cluster/classloader/leak/test/FieldGranularityClassloaderLeakTestBase.java
branches/JBPAPP_5_0_1_GA_JBPAPP-7203/testsuite/src/main/org/jboss/test/cluster/classloader/leak/test/J2EEClassloaderLeakTestBase.java
branches/JBPAPP_5_0_1_GA_JBPAPP-7203/testsuite/src/main/org/jboss/test/cluster/defaultcfg/test/YieldingGloballyExclusiveClusterLockSupportUnitTestCase.java
branches/JBPAPP_5_0_1_GA_JBPAPP-7203/testsuite/src/main/org/jboss/test/cluster/web/notification/SessionSpecListenerAttribute.java
branches/JBPAPP_5_0_1_GA_JBPAPP-7203/testsuite/src/main/org/jboss/test/ejb3/common/AbstractReplierMDB.java
branches/JBPAPP_5_0_1_GA_JBPAPP-7203/testsuite/src/main/org/jboss/test/ejb3/common/EJB3TestCase.java
branches/JBPAPP_5_0_1_GA_JBPAPP-7203/testsuite/src/main/org/jboss/test/ejb3/jbpapp2260/TransactionMDB.java
branches/JBPAPP_5_0_1_GA_JBPAPP-7203/testsuite/src/main/org/jboss/test/ejb3/jbpapp2260/unit/
branches/JBPAPP_5_0_1_GA_JBPAPP-7203/testsuite/src/main/org/jboss/test/spring/test/SpringFacadeTestCase.java
branches/JBPAPP_5_0_1_GA_JBPAPP-7203/testsuite/src/resources/bootstrapdependencies/jbas5349/
Log:
JBPAPP-7203
Modified: branches/JBPAPP_5_0_1_GA_JBPAPP-7203/testsuite/imports/sections/ejb3.xml
===================================================================
--- branches/JBPAPP_5_0_1_GA_JBPAPP-7203/testsuite/imports/sections/ejb3.xml 2011-09-14 20:42:33 UTC (rev 112241)
+++ branches/JBPAPP_5_0_1_GA_JBPAPP-7203/testsuite/imports/sections/ejb3.xml 2011-09-14 20:43:33 UTC (rev 112242)
@@ -188,7 +188,8 @@
ejb3-webservice,
jbpapp2260,
jbpapp2473,
- jbpapp3026
+ jbpapp3026,
+ jbpapp6855
">
<mkdir dir="${build.lib}" />
@@ -200,4 +201,14 @@
</jar>
</target>
+ <target name="jbpapp-6855" depends="compile">
+ <mkdir dir="${build.lib}" />
+
+ <jar destfile="${build.lib}/jbpapp-6855.jar">
+ <fileset dir="${build.classes}">
+ <include name="org/jboss/test/ejb3/jbpapp6855/**" />
+ </fileset>
+ <fileset dir="${build.resources}/ejb3/jbpapp6855" includes="**"/>
+ </jar>
+ </target>
</project>
Property changes on: branches/JBPAPP_5_0_1_GA_JBPAPP-7203/testsuite/src/main/org/jboss/test/bootstrapdependencies/jbas5349/ejb2
___________________________________________________________________
Deleted: svn:mergeinfo
-
Property changes on: branches/JBPAPP_5_0_1_GA_JBPAPP-7203/testsuite/src/main/org/jboss/test/bootstrapdependencies/jbas5349/ejb3
___________________________________________________________________
Deleted: svn:mergeinfo
-
Property changes on: branches/JBPAPP_5_0_1_GA_JBPAPP-7203/testsuite/src/main/org/jboss/test/bootstrapdependencies/jbas5349/sar
___________________________________________________________________
Deleted: svn:mergeinfo
-
Property changes on: branches/JBPAPP_5_0_1_GA_JBPAPP-7203/testsuite/src/main/org/jboss/test/bootstrapdependencies/jbas5349/servlet
___________________________________________________________________
Deleted: svn:mergeinfo
-
Property changes on: branches/JBPAPP_5_0_1_GA_JBPAPP-7203/testsuite/src/main/org/jboss/test/bootstrapdependencies/jbas5349/test
___________________________________________________________________
Deleted: svn:mergeinfo
-
Property changes on: branches/JBPAPP_5_0_1_GA_JBPAPP-7203/testsuite/src/main/org/jboss/test/classloader/leak/test/Ejb3ClassloaderLeakTestBase.java
___________________________________________________________________
Deleted: svn:mergeinfo
-
Property changes on: branches/JBPAPP_5_0_1_GA_JBPAPP-7203/testsuite/src/main/org/jboss/test/classloader/leak/test/IsolatedEarWithDualCommonsLoggingClassloaderLeakTestCase.java
___________________________________________________________________
Deleted: svn:mergeinfo
-
Property changes on: branches/JBPAPP_5_0_1_GA_JBPAPP-7203/testsuite/src/main/org/jboss/test/classloader/leak/test/J2EEClassloaderLeakTestBase.java
___________________________________________________________________
Deleted: svn:mergeinfo
-
Property changes on: branches/JBPAPP_5_0_1_GA_JBPAPP-7203/testsuite/src/main/org/jboss/test/cluster/classloader/leak/test/FieldGranularityClassloaderLeakTestBase.java
___________________________________________________________________
Deleted: svn:mergeinfo
-
Property changes on: branches/JBPAPP_5_0_1_GA_JBPAPP-7203/testsuite/src/main/org/jboss/test/cluster/classloader/leak/test/J2EEClassloaderLeakTestBase.java
___________________________________________________________________
Deleted: svn:mergeinfo
-
Property changes on: branches/JBPAPP_5_0_1_GA_JBPAPP-7203/testsuite/src/main/org/jboss/test/cluster/defaultcfg/test/YieldingGloballyExclusiveClusterLockSupportUnitTestCase.java
___________________________________________________________________
Deleted: svn:mergeinfo
-
Property changes on: branches/JBPAPP_5_0_1_GA_JBPAPP-7203/testsuite/src/main/org/jboss/test/cluster/web/notification/SessionSpecListenerAttribute.java
___________________________________________________________________
Deleted: svn:mergeinfo
-
Property changes on: branches/JBPAPP_5_0_1_GA_JBPAPP-7203/testsuite/src/main/org/jboss/test/ejb3/common/AbstractReplierMDB.java
___________________________________________________________________
Deleted: svn:mergeinfo
-
Property changes on: branches/JBPAPP_5_0_1_GA_JBPAPP-7203/testsuite/src/main/org/jboss/test/ejb3/common/EJB3TestCase.java
___________________________________________________________________
Deleted: svn:mergeinfo
-
Property changes on: branches/JBPAPP_5_0_1_GA_JBPAPP-7203/testsuite/src/main/org/jboss/test/ejb3/jbpapp2260/TransactionMDB.java
___________________________________________________________________
Deleted: svn:mergeinfo
-
Property changes on: branches/JBPAPP_5_0_1_GA_JBPAPP-7203/testsuite/src/main/org/jboss/test/ejb3/jbpapp2260/unit
___________________________________________________________________
Deleted: svn:mergeinfo
-
Deleted: branches/JBPAPP_5_0_1_GA_JBPAPP-7203/testsuite/src/main/org/jboss/test/ejb3/jbpapp6855/SimpleMDBWithAUnSupportedActivationConfigProp.java
===================================================================
--- branches/JBPAPP_5_1/testsuite/src/main/org/jboss/test/ejb3/jbpapp6855/SimpleMDBWithAUnSupportedActivationConfigProp.java 2011-09-13 10:54:13 UTC (rev 112230)
+++ branches/JBPAPP_5_0_1_GA_JBPAPP-7203/testsuite/src/main/org/jboss/test/ejb3/jbpapp6855/SimpleMDBWithAUnSupportedActivationConfigProp.java 2011-09-14 20:43:33 UTC (rev 112242)
@@ -1,97 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-
-package org.jboss.test.ejb3.jbpapp6855;
-
-import javax.annotation.Resource;
-import javax.ejb.ActivationConfigProperty;
-import javax.ejb.MessageDriven;
-import javax.jms.DeliveryMode;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageListener;
-import javax.jms.Queue;
-import javax.jms.QueueConnection;
-import javax.jms.QueueConnectionFactory;
-import javax.jms.QueueSender;
-import javax.jms.QueueSession;
-import javax.jms.TextMessage;
-
-import org.jboss.logging.Logger;
-
-/**
- * User: Jaikiran Pai
- */
- at MessageDriven(activationConfig =
- {
- @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue"),
- @ActivationConfigProperty(propertyName = "destination", propertyValue = SimpleMDBWithAUnSupportedActivationConfigProp.QUEUE_JNDI_NAME),
- // Unsupported activation config property. Should *not* result in deployment failure
- @ActivationConfigProperty(propertyName = "foo", propertyValue = "bar")
- })
-public class SimpleMDBWithAUnSupportedActivationConfigProp implements MessageListener
-{
- public static final String QUEUE_JNDI_NAME = "queue/auto-create/jbpapp-6855";
-
- private static Logger logger = Logger.getLogger(SimpleMDBWithAUnSupportedActivationConfigProp.class);
-
- public static final String REPLY = "You have successfully established contact with the MDB";
-
- @Resource(mappedName="java:/ConnectionFactory")
- private QueueConnectionFactory qFactory;
-
- @Override
- public void onMessage(Message message)
- {
- // do nothing
- logger.info("Received message " + message);
- try
- {
- sendReply((Queue) message.getJMSReplyTo(), message.getJMSMessageID());
- }
- catch (JMSException e)
- {
- throw new RuntimeException(e);
- }
- }
-
- private void sendReply(Queue destination, String jmsMessageID) throws JMSException
- {
- if (destination == null) {
- return;
- }
- QueueConnection conn = qFactory.createQueueConnection();
- try
- {
- QueueSession session = conn.createQueueSession(false, QueueSession.AUTO_ACKNOWLEDGE);
- QueueSender sender = session.createSender(destination);
- TextMessage message = session.createTextMessage(REPLY);
- message.setJMSCorrelationID(jmsMessageID);
- sender.send(message);
- }
- finally
- {
- conn.close();
- }
- }
-}
Copied: branches/JBPAPP_5_0_1_GA_JBPAPP-7203/testsuite/src/main/org/jboss/test/ejb3/jbpapp6855/SimpleMDBWithAUnSupportedActivationConfigProp.java (from rev 112230, branches/JBPAPP_5_1/testsuite/src/main/org/jboss/test/ejb3/jbpapp6855/SimpleMDBWithAUnSupportedActivationConfigProp.java)
===================================================================
--- branches/JBPAPP_5_0_1_GA_JBPAPP-7203/testsuite/src/main/org/jboss/test/ejb3/jbpapp6855/SimpleMDBWithAUnSupportedActivationConfigProp.java (rev 0)
+++ branches/JBPAPP_5_0_1_GA_JBPAPP-7203/testsuite/src/main/org/jboss/test/ejb3/jbpapp6855/SimpleMDBWithAUnSupportedActivationConfigProp.java 2011-09-14 20:43:33 UTC (rev 112242)
@@ -0,0 +1,97 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.test.ejb3.jbpapp6855;
+
+import javax.annotation.Resource;
+import javax.ejb.ActivationConfigProperty;
+import javax.ejb.MessageDriven;
+import javax.jms.DeliveryMode;
+import javax.jms.Destination;
+import javax.jms.JMSException;
+import javax.jms.Message;
+import javax.jms.MessageListener;
+import javax.jms.Queue;
+import javax.jms.QueueConnection;
+import javax.jms.QueueConnectionFactory;
+import javax.jms.QueueSender;
+import javax.jms.QueueSession;
+import javax.jms.TextMessage;
+
+import org.jboss.logging.Logger;
+
+/**
+ * User: Jaikiran Pai
+ */
+ at MessageDriven(activationConfig =
+ {
+ @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue"),
+ @ActivationConfigProperty(propertyName = "destination", propertyValue = SimpleMDBWithAUnSupportedActivationConfigProp.QUEUE_JNDI_NAME),
+ // Unsupported activation config property. Should *not* result in deployment failure
+ @ActivationConfigProperty(propertyName = "foo", propertyValue = "bar")
+ })
+public class SimpleMDBWithAUnSupportedActivationConfigProp implements MessageListener
+{
+ public static final String QUEUE_JNDI_NAME = "queue/auto-create/jbpapp-6855";
+
+ private static Logger logger = Logger.getLogger(SimpleMDBWithAUnSupportedActivationConfigProp.class);
+
+ public static final String REPLY = "You have successfully established contact with the MDB";
+
+ @Resource(mappedName="java:/ConnectionFactory")
+ private QueueConnectionFactory qFactory;
+
+ @Override
+ public void onMessage(Message message)
+ {
+ // do nothing
+ logger.info("Received message " + message);
+ try
+ {
+ sendReply((Queue) message.getJMSReplyTo(), message.getJMSMessageID());
+ }
+ catch (JMSException e)
+ {
+ throw new RuntimeException(e);
+ }
+ }
+
+ private void sendReply(Queue destination, String jmsMessageID) throws JMSException
+ {
+ if (destination == null) {
+ return;
+ }
+ QueueConnection conn = qFactory.createQueueConnection();
+ try
+ {
+ QueueSession session = conn.createQueueSession(false, QueueSession.AUTO_ACKNOWLEDGE);
+ QueueSender sender = session.createSender(destination);
+ TextMessage message = session.createTextMessage(REPLY);
+ message.setJMSCorrelationID(jmsMessageID);
+ sender.send(message);
+ }
+ finally
+ {
+ conn.close();
+ }
+ }
+}
Deleted: branches/JBPAPP_5_0_1_GA_JBPAPP-7203/testsuite/src/main/org/jboss/test/ejb3/jbpapp6855/unit/MDBActivationConfigPropTestCase.java
===================================================================
--- branches/JBPAPP_5_1/testsuite/src/main/org/jboss/test/ejb3/jbpapp6855/unit/MDBActivationConfigPropTestCase.java 2011-09-13 10:54:13 UTC (rev 112230)
+++ branches/JBPAPP_5_0_1_GA_JBPAPP-7203/testsuite/src/main/org/jboss/test/ejb3/jbpapp6855/unit/MDBActivationConfigPropTestCase.java 2011-09-14 20:43:33 UTC (rev 112242)
@@ -1,123 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-
-package org.jboss.test.ejb3.jbpapp6855.unit;
-
-import junit.framework.Test;
-import org.jboss.test.JBossJMSTestCase;
-import org.jboss.test.ejb3.jbpapp6855.SimpleMDBWithAUnSupportedActivationConfigProp;
-
-import javax.jms.Connection;
-import javax.jms.ConnectionFactory;
-import javax.jms.DeliveryMode;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.Queue;
-import javax.jms.Session;
-import javax.jms.TemporaryQueue;
-import javax.jms.TextMessage;
-
-/**
- * Tests activation config properties on MDBs.
- * <p/>
- * User: Jaikiran Pai
- */
-public class MDBActivationConfigPropTestCase extends JBossJMSTestCase
-{
-
- public MDBActivationConfigPropTestCase(String name)
- {
- super(name);
- }
-
- public static Test suite() throws Exception
- {
- return getDeploySetup(MDBActivationConfigPropTestCase.class, "jbpapp-6855.jar");
-
- }
-
- /**
- * Tests that a MDB referencing a unsupported activation config property does not run into
- * deployment failures
- *
- * @throws Exception
- * @see https://issues.jboss.org/browse/JBPAPP-6855
- */
- public void testUnsupportedActivationConfigProp() throws Exception
- {
- ConnectionFactory connFactory = null;
- Connection conn = null;
- Session session = null;
- MessageProducer producer = null;
- MessageConsumer consumer = null;
- try
- {
- connFactory = lookup("ConnectionFactory", ConnectionFactory.class);
- conn = connFactory.createConnection();
- conn.start();
- session = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
- TemporaryQueue replyQueue = session.createTemporaryQueue();
- // Create and send a message to the queue on which the MDB is listening
- TextMessage msg = session.createTextMessage("Hello world");
- msg.setJMSDeliveryMode(DeliveryMode.NON_PERSISTENT);
- msg.setJMSReplyTo(replyQueue);
- Queue queue = lookup(SimpleMDBWithAUnSupportedActivationConfigProp.QUEUE_JNDI_NAME, Queue.class);
- producer = session.createProducer(queue);
- // send the message
- producer.send(msg);
- // wait for the reply on the reply queue
- consumer = session.createConsumer(replyQueue);
- Message replyMsg = consumer.receive(5000);
- assertNotNull("No reply received from MDB", replyMsg);
- assertInstanceOf(replyMsg, TextMessage.class);
- String actual = ((TextMessage) replyMsg).getText();
- assertEquals("Unexpected reply from MDB", SimpleMDBWithAUnSupportedActivationConfigProp.REPLY, actual);
-
- }
- finally
- {
- if (consumer != null)
- {
- consumer.close();
- }
- if (producer != null)
- {
- producer.close();
- }
- if (session != null)
- {
- session.close();
- }
- if (conn != null)
- {
- conn.close();
- }
- }
- }
-
- protected <T> T lookup(String name, Class<T> cls) throws Exception
- {
- return cls.cast(getInitialContext().lookup(name));
- }
-
-}
Copied: branches/JBPAPP_5_0_1_GA_JBPAPP-7203/testsuite/src/main/org/jboss/test/ejb3/jbpapp6855/unit/MDBActivationConfigPropTestCase.java (from rev 112230, branches/JBPAPP_5_1/testsuite/src/main/org/jboss/test/ejb3/jbpapp6855/unit/MDBActivationConfigPropTestCase.java)
===================================================================
--- branches/JBPAPP_5_0_1_GA_JBPAPP-7203/testsuite/src/main/org/jboss/test/ejb3/jbpapp6855/unit/MDBActivationConfigPropTestCase.java (rev 0)
+++ branches/JBPAPP_5_0_1_GA_JBPAPP-7203/testsuite/src/main/org/jboss/test/ejb3/jbpapp6855/unit/MDBActivationConfigPropTestCase.java 2011-09-14 20:43:33 UTC (rev 112242)
@@ -0,0 +1,123 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.test.ejb3.jbpapp6855.unit;
+
+import junit.framework.Test;
+import org.jboss.test.JBossJMSTestCase;
+import org.jboss.test.ejb3.jbpapp6855.SimpleMDBWithAUnSupportedActivationConfigProp;
+
+import javax.jms.Connection;
+import javax.jms.ConnectionFactory;
+import javax.jms.DeliveryMode;
+import javax.jms.Message;
+import javax.jms.MessageConsumer;
+import javax.jms.MessageProducer;
+import javax.jms.Queue;
+import javax.jms.Session;
+import javax.jms.TemporaryQueue;
+import javax.jms.TextMessage;
+
+/**
+ * Tests activation config properties on MDBs.
+ * <p/>
+ * User: Jaikiran Pai
+ */
+public class MDBActivationConfigPropTestCase extends JBossJMSTestCase
+{
+
+ public MDBActivationConfigPropTestCase(String name)
+ {
+ super(name);
+ }
+
+ public static Test suite() throws Exception
+ {
+ return getDeploySetup(MDBActivationConfigPropTestCase.class, "jbpapp-6855.jar");
+
+ }
+
+ /**
+ * Tests that a MDB referencing a unsupported activation config property does not run into
+ * deployment failures
+ *
+ * @throws Exception
+ * @see https://issues.jboss.org/browse/JBPAPP-6855
+ */
+ public void testUnsupportedActivationConfigProp() throws Exception
+ {
+ ConnectionFactory connFactory = null;
+ Connection conn = null;
+ Session session = null;
+ MessageProducer producer = null;
+ MessageConsumer consumer = null;
+ try
+ {
+ connFactory = lookup("ConnectionFactory", ConnectionFactory.class);
+ conn = connFactory.createConnection();
+ conn.start();
+ session = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
+ TemporaryQueue replyQueue = session.createTemporaryQueue();
+ // Create and send a message to the queue on which the MDB is listening
+ TextMessage msg = session.createTextMessage("Hello world");
+ msg.setJMSDeliveryMode(DeliveryMode.NON_PERSISTENT);
+ msg.setJMSReplyTo(replyQueue);
+ Queue queue = lookup(SimpleMDBWithAUnSupportedActivationConfigProp.QUEUE_JNDI_NAME, Queue.class);
+ producer = session.createProducer(queue);
+ // send the message
+ producer.send(msg);
+ // wait for the reply on the reply queue
+ consumer = session.createConsumer(replyQueue);
+ Message replyMsg = consumer.receive(5000);
+ assertNotNull("No reply received from MDB", replyMsg);
+ assertInstanceOf(replyMsg, TextMessage.class);
+ String actual = ((TextMessage) replyMsg).getText();
+ assertEquals("Unexpected reply from MDB", SimpleMDBWithAUnSupportedActivationConfigProp.REPLY, actual);
+
+ }
+ finally
+ {
+ if (consumer != null)
+ {
+ consumer.close();
+ }
+ if (producer != null)
+ {
+ producer.close();
+ }
+ if (session != null)
+ {
+ session.close();
+ }
+ if (conn != null)
+ {
+ conn.close();
+ }
+ }
+ }
+
+ protected <T> T lookup(String name, Class<T> cls) throws Exception
+ {
+ return cls.cast(getInitialContext().lookup(name));
+ }
+
+}
Property changes on: branches/JBPAPP_5_0_1_GA_JBPAPP-7203/testsuite/src/main/org/jboss/test/spring/test/SpringFacadeTestCase.java
___________________________________________________________________
Deleted: svn:mergeinfo
-
Property changes on: branches/JBPAPP_5_0_1_GA_JBPAPP-7203/testsuite/src/resources/bootstrapdependencies/jbas5349
___________________________________________________________________
Deleted: svn:mergeinfo
-
Deleted: branches/JBPAPP_5_0_1_GA_JBPAPP-7203/testsuite/src/resources/ejb3/jbpapp6855/META-INF/jboss.xml
===================================================================
--- branches/JBPAPP_5_1/testsuite/src/resources/ejb3/jbpapp6855/META-INF/jboss.xml 2011-09-13 10:54:13 UTC (rev 112230)
+++ branches/JBPAPP_5_0_1_GA_JBPAPP-7203/testsuite/src/resources/ejb3/jbpapp6855/META-INF/jboss.xml 2011-09-14 20:43:33 UTC (rev 112242)
@@ -1,14 +0,0 @@
-<?xml version="1.0"?>
-<jboss
- xmlns="http://www.jboss.com/xml/ns/javaee"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.jboss.com/xml/ns/javaee
- http://www.jboss.org/j2ee/schema/jboss_5_0.xsd"
- version="3.0">
- <enterprise-beans>
- <message-driven>
- <ejb-name>SimpleMDBWithAUnSupportedActivationConfigProp</ejb-name>
- <create-destination>true</create-destination>
- </message-driven>
- </enterprise-beans>
-</jboss>
\ No newline at end of file
Copied: branches/JBPAPP_5_0_1_GA_JBPAPP-7203/testsuite/src/resources/ejb3/jbpapp6855/META-INF/jboss.xml (from rev 112230, branches/JBPAPP_5_1/testsuite/src/resources/ejb3/jbpapp6855/META-INF/jboss.xml)
===================================================================
--- branches/JBPAPP_5_0_1_GA_JBPAPP-7203/testsuite/src/resources/ejb3/jbpapp6855/META-INF/jboss.xml (rev 0)
+++ branches/JBPAPP_5_0_1_GA_JBPAPP-7203/testsuite/src/resources/ejb3/jbpapp6855/META-INF/jboss.xml 2011-09-14 20:43:33 UTC (rev 112242)
@@ -0,0 +1,14 @@
+<?xml version="1.0"?>
+<jboss
+ xmlns="http://www.jboss.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.jboss.com/xml/ns/javaee
+ http://www.jboss.org/j2ee/schema/jboss_5_0.xsd"
+ version="3.0">
+ <enterprise-beans>
+ <message-driven>
+ <ejb-name>SimpleMDBWithAUnSupportedActivationConfigProp</ejb-name>
+ <create-destination>true</create-destination>
+ </message-driven>
+ </enterprise-beans>
+</jboss>
\ No newline at end of file
More information about the jboss-cvs-commits
mailing list