[jboss-cvs] JBossAS SVN: r63256 - in trunk/ejb3/src: test/org/jboss/ejb3/test/mdb and 1 other directory.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Wed May 30 10:40:34 EDT 2007
Author: wolfc
Date: 2007-05-30 10:40:34 -0400 (Wed, 30 May 2007)
New Revision: 63256
Modified:
trunk/ejb3/src/resources/ejb3-interceptors-aop.xml
trunk/ejb3/src/test/org/jboss/ejb3/test/mdb/BMTQueueTestMDB.java
trunk/ejb3/src/test/org/jboss/ejb3/test/mdb/CMTQueueTestMDB.java
trunk/ejb3/src/test/org/jboss/ejb3/test/mdb/DefaultedQueueTestMDB.java
trunk/ejb3/src/test/org/jboss/ejb3/test/mdb/NondurableQueueTestMDB.java
trunk/ejb3/src/test/org/jboss/ejb3/test/mdb/OverrideDefaultedQueueTestMDB.java
trunk/ejb3/src/test/org/jboss/ejb3/test/mdb/QueueTestMDB.java
trunk/ejb3/src/test/org/jboss/ejb3/test/mdb/RollbackCMTQueueTestMDB.java
trunk/ejb3/src/test/org/jboss/ejb3/test/mdb/TransactionQueueTestMDB.java
Log:
EJBTHREE-973: fixed MDBs
Modified: trunk/ejb3/src/resources/ejb3-interceptors-aop.xml
===================================================================
--- trunk/ejb3/src/resources/ejb3-interceptors-aop.xml 2007-05-30 14:39:50 UTC (rev 63255)
+++ trunk/ejb3/src/resources/ejb3-interceptors-aop.xml 2007-05-30 14:40:34 UTC (rev 63256)
@@ -276,8 +276,10 @@
<domain name="Message Driven Bean">
<bind pointcut="execution(public * *->*(..))">
+ <interceptor-ref name="org.jboss.ejb3.security.AuthenticationInterceptorFactory"/>
<interceptor-ref name="org.jboss.ejb3.security.RunAsSecurityInterceptorFactory"/>
</bind>
+ <!-- TODO: Authorization? -->
<bind pointcut="execution(public * *->*(..))">
<interceptor-ref name="org.jboss.ejb3.stateless.StatelessInstanceInterceptor"/>
<interceptor-ref name="org.jboss.ejb3.tx.TxInterceptorFactory"/>
Modified: trunk/ejb3/src/test/org/jboss/ejb3/test/mdb/BMTQueueTestMDB.java
===================================================================
--- trunk/ejb3/src/test/org/jboss/ejb3/test/mdb/BMTQueueTestMDB.java 2007-05-30 14:39:50 UTC (rev 63255)
+++ trunk/ejb3/src/test/org/jboss/ejb3/test/mdb/BMTQueueTestMDB.java 2007-05-30 14:40:34 UTC (rev 63256)
@@ -47,8 +47,6 @@
@ActivationConfigProperty(propertyName="destination", propertyValue="queue/bmtmdbtest"),
@ActivationConfigProperty(propertyName="DLQMaxResent", propertyValue="1")
})
- at RunAs("TestRole")
- at SecurityDomain("other")
@TransactionManagement(TransactionManagementType.BEAN)
public class BMTQueueTestMDB implements MessageListener
{
Modified: trunk/ejb3/src/test/org/jboss/ejb3/test/mdb/CMTQueueTestMDB.java
===================================================================
--- trunk/ejb3/src/test/org/jboss/ejb3/test/mdb/CMTQueueTestMDB.java 2007-05-30 14:39:50 UTC (rev 63255)
+++ trunk/ejb3/src/test/org/jboss/ejb3/test/mdb/CMTQueueTestMDB.java 2007-05-30 14:40:34 UTC (rev 63256)
@@ -44,8 +44,6 @@
@ActivationConfigProperty(propertyName="destination", propertyValue="queue/cmtmdbtest"),
@ActivationConfigProperty(propertyName="DLQMaxResent", propertyValue="1")
})
- at RunAs("TestRole")
- at SecurityDomain("other")
public class CMTQueueTestMDB implements MessageListener
{
@SuppressWarnings("unused")
Modified: trunk/ejb3/src/test/org/jboss/ejb3/test/mdb/DefaultedQueueTestMDB.java
===================================================================
--- trunk/ejb3/src/test/org/jboss/ejb3/test/mdb/DefaultedQueueTestMDB.java 2007-05-30 14:39:50 UTC (rev 63255)
+++ trunk/ejb3/src/test/org/jboss/ejb3/test/mdb/DefaultedQueueTestMDB.java 2007-05-30 14:40:34 UTC (rev 63256)
@@ -47,8 +47,6 @@
{
@ActivationConfigProperty(propertyName="destination", propertyValue="queue/defaultedmdbtest")
})
- at RunAs("TestRole")
- at SecurityDomain("other")
public class DefaultedQueueTestMDB implements MessageListener
{
private static final Logger log = Logger.getLogger(DefaultedQueueTestMDB.class);
Modified: trunk/ejb3/src/test/org/jboss/ejb3/test/mdb/NondurableQueueTestMDB.java
===================================================================
--- trunk/ejb3/src/test/org/jboss/ejb3/test/mdb/NondurableQueueTestMDB.java 2007-05-30 14:39:50 UTC (rev 63255)
+++ trunk/ejb3/src/test/org/jboss/ejb3/test/mdb/NondurableQueueTestMDB.java 2007-05-30 14:40:34 UTC (rev 63256)
@@ -46,8 +46,6 @@
@ActivationConfigProperty(propertyName="destination", propertyValue="queue/nondurablemdbtest"),
@ActivationConfigProperty(propertyName="subscriptionDurability", propertyValue="NON_DURABLE")
})
- at RunAs("TestRole")
- at SecurityDomain("other")
public class NondurableQueueTestMDB implements MessageListener
{
private static final Logger log = Logger.getLogger(NondurableQueueTestMDB.class);
Modified: trunk/ejb3/src/test/org/jboss/ejb3/test/mdb/OverrideDefaultedQueueTestMDB.java
===================================================================
--- trunk/ejb3/src/test/org/jboss/ejb3/test/mdb/OverrideDefaultedQueueTestMDB.java 2007-05-30 14:39:50 UTC (rev 63255)
+++ trunk/ejb3/src/test/org/jboss/ejb3/test/mdb/OverrideDefaultedQueueTestMDB.java 2007-05-30 14:40:34 UTC (rev 63256)
@@ -47,8 +47,6 @@
{
@ActivationConfigProperty(propertyName="destination", propertyValue="queue/overridedefaultedmdbtest")
})
- at RunAs("TestRole")
- at SecurityDomain("other")
public class OverrideDefaultedQueueTestMDB implements MessageListener
{
private static final Logger log = Logger.getLogger(DefaultedQueueTestMDB.class);
Modified: trunk/ejb3/src/test/org/jboss/ejb3/test/mdb/QueueTestMDB.java
===================================================================
--- trunk/ejb3/src/test/org/jboss/ejb3/test/mdb/QueueTestMDB.java 2007-05-30 14:39:50 UTC (rev 63255)
+++ trunk/ejb3/src/test/org/jboss/ejb3/test/mdb/QueueTestMDB.java 2007-05-30 14:40:34 UTC (rev 63256)
@@ -51,7 +51,7 @@
@ActivationConfigProperty(propertyName="destination", propertyValue="queue/mdbtest")
})
@RunAs("TestRole")
- at SecurityDomain("other")
+ at SecurityDomain(value="other",unauthenticatedPrincipal="nobody")
public class QueueTestMDB implements MessageListener
{
private static final Logger log = Logger.getLogger(QueueTestMDB.class);
Modified: trunk/ejb3/src/test/org/jboss/ejb3/test/mdb/RollbackCMTQueueTestMDB.java
===================================================================
--- trunk/ejb3/src/test/org/jboss/ejb3/test/mdb/RollbackCMTQueueTestMDB.java 2007-05-30 14:39:50 UTC (rev 63255)
+++ trunk/ejb3/src/test/org/jboss/ejb3/test/mdb/RollbackCMTQueueTestMDB.java 2007-05-30 14:40:34 UTC (rev 63256)
@@ -44,8 +44,6 @@
@ActivationConfigProperty(propertyName="destination", propertyValue="queue/rollbackcmtmdbtest"),
@ActivationConfigProperty(propertyName="DLQMaxResent", propertyValue="1")
})
- at RunAs("TestRole")
- at SecurityDomain("other")
public class RollbackCMTQueueTestMDB implements MessageListener
{
@SuppressWarnings("unused")
Modified: trunk/ejb3/src/test/org/jboss/ejb3/test/mdb/TransactionQueueTestMDB.java
===================================================================
--- trunk/ejb3/src/test/org/jboss/ejb3/test/mdb/TransactionQueueTestMDB.java 2007-05-30 14:39:50 UTC (rev 63255)
+++ trunk/ejb3/src/test/org/jboss/ejb3/test/mdb/TransactionQueueTestMDB.java 2007-05-30 14:40:34 UTC (rev 63256)
@@ -25,17 +25,10 @@
import javax.ejb.MessageDriven;
import javax.ejb.TransactionAttribute;
import javax.ejb.TransactionAttributeType;
-import javax.ejb.TransactionManagement;
-import javax.ejb.TransactionManagementType;
-import javax.ejb.MessageDrivenContext;
import javax.jms.Message;
import javax.jms.MessageListener;
-import javax.annotation.security.RunAs;
-import javax.annotation.Resource;
-
import org.jboss.annotation.ejb.TransactionTimeout;
-import org.jboss.annotation.security.SecurityDomain;
import org.jboss.logging.Logger;
/**
@@ -45,22 +38,24 @@
{
@ActivationConfigProperty(propertyName="destinationType", propertyValue="javax.jms.Queue"),
@ActivationConfigProperty(propertyName="destination", propertyValue="queue/transactionmdbtest"),
- @ActivationConfigProperty(propertyName="maxSession", propertyValue="1")
+ @ActivationConfigProperty(propertyName="maxSession", propertyValue="1"),
+ @ActivationConfigProperty(propertyName="DLQMaxResent", propertyValue="1")
})
@TransactionTimeout(1)
-//@TransactionAttribute(TransactionAttributeType.REQUIRES_NEW)
+// Not allowed on a MDB
+//@TransactionAttribute(TransactionAttributeType.REQUIRES_NEW) // if we specify a tx timeout, we must start the tx
public class TransactionQueueTestMDB implements MessageListener
{
private static final Logger log = Logger.getLogger(TransactionQueueTestMDB.class);
-
public void onMessage(Message recvMsg)
{
System.out.println("*** TransactionQueueTestMDB onMessage " + this);
try
{
- Thread.sleep(1000 * 60 * 6);
+ //Thread.sleep(1000 * 60 * 6);
+ Thread.sleep(1000 * 10);
}
catch (InterruptedException e)
{
More information about the jboss-cvs-commits
mailing list