[jboss-cvs] JBossAS SVN: r82294 - in projects/ejb3/trunk/testsuite/src/test: resources and 1 other directory.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Mon Dec 15 20:32:08 EST 2008
Author: ALRubinger
Date: 2008-12-15 20:32:08 -0500 (Mon, 15 Dec 2008)
New Revision: 82294
Modified:
projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/dd/mdb/QueueBean.java
projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/dd/mdb/TopicBean.java
projects/ejb3/trunk/testsuite/src/test/resources/known-issues.xml
Log:
[EJBTHREE-1633][EJBTHREE-1241] Add known issue to dd/mdb tests (setMessageDrivenContext callback not applied)
Modified: projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/dd/mdb/QueueBean.java
===================================================================
--- projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/dd/mdb/QueueBean.java 2008-12-16 00:33:40 UTC (rev 82293)
+++ projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/dd/mdb/QueueBean.java 2008-12-16 01:32:08 UTC (rev 82294)
@@ -23,22 +23,18 @@
import java.sql.Connection;
-import javax.annotation.Resource;
+import javax.ejb.EJBException;
import javax.ejb.MessageDrivenBean;
import javax.ejb.MessageDrivenContext;
-import javax.ejb.EJBException;
-
-import javax.jms.MessageListener;
import javax.jms.Message;
+import javax.jms.MessageListener;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;
import javax.sql.DataSource;
-import org.jboss.logging.Logger;
import org.jboss.ejb3.Container;
-import org.jboss.ejb3.test.dd.mdb.StatelessLocal;
-import org.jboss.ejb3.test.dd.mdb.StatelessRemote;
+import org.jboss.logging.Logger;
/**
* MessageBeanImpl.java
@@ -62,9 +58,10 @@
public QueueBean()
{
-
+ log.info("Created");
}
+ //@Resource //@see EJBTHREE-1633
public void setMessageDrivenContext(MessageDrivenContext ctx) throws EJBException
{
this.ctx = ctx;
@@ -100,9 +97,10 @@
private void testInjections() throws Exception
{
- if(ctx == null)
- throw new IllegalStateException("ctx is not set");
-
+ if(ctx==null)
+ {
+ throw new IllegalStateException("EJBTHREE-1633, Missing setMessageDrivenContext");
+ }
stateless.test();
statelessLocal.testLocal();
Connection conn = testDatasource.getConnection();
Modified: projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/dd/mdb/TopicBean.java
===================================================================
--- projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/dd/mdb/TopicBean.java 2008-12-16 00:33:40 UTC (rev 82293)
+++ projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/dd/mdb/TopicBean.java 2008-12-16 01:32:08 UTC (rev 82294)
@@ -21,14 +21,12 @@
*/
package org.jboss.ejb3.test.dd.mdb;
-import javax.annotation.Resource;
+import javax.ejb.EJBException;
import javax.ejb.MessageDrivenBean;
import javax.ejb.MessageDrivenContext;
-import javax.ejb.EJBException;
-
import javax.jms.JMSException;
+import javax.jms.Message;
import javax.jms.MessageListener;
-import javax.jms.Message;
import org.jboss.logging.Logger;
@@ -53,7 +51,7 @@
}
- @Resource
+ //@Resource //@see EJBTHREE-1633
public void setMessageDrivenContext(MessageDrivenContext ctx) throws EJBException
{
this.ctx = ctx;
@@ -70,6 +68,10 @@
public void onMessage(Message message)
{
+ if(ctx==null)
+ {
+ throw new IllegalStateException("EJBTHREE-1633, Missing setMessageDrivenContext");
+ }
if (ctx.getRollbackOnly())
throw new IllegalStateException("Error in transaction");
log.debug("DEBUG: TopicBean got message" + message.toString());
Modified: projects/ejb3/trunk/testsuite/src/test/resources/known-issues.xml
===================================================================
--- projects/ejb3/trunk/testsuite/src/test/resources/known-issues.xml 2008-12-16 00:33:40 UTC (rev 82293)
+++ projects/ejb3/trunk/testsuite/src/test/resources/known-issues.xml 2008-12-16 01:32:08 UTC (rev 82294)
@@ -16,4 +16,8 @@
<entry key="org.jboss.ejb3.test.ejbthree1040.unit.RequireDeploymentDescriptorFlagUnitTestCase.testDeploySuccessWithRequiredDdAndEjbJarXml">show</entry>
<!-- EJBTHREE-1632 -->
<entry key="org.jboss.ejb3.test.defaultremotebindings.unit.DefaultRemoteBindingsTestCase.testDefault">show</entry>
+ <!-- EJBTHREE-1633 -->
+ <entry key="org.jboss.ejb3.test.dd.mdb.unit.MDBUnitTestCase.testQueue">show</entry>
+ <entry key="org.jboss.ejb3.test.dd.mdb.unit.MDBUnitTestCase.testDurableTopic">show</entry>
+
</properties>
More information about the jboss-cvs-commits
mailing list