[jboss-cvs] JBossAS SVN: r89869 - in projects/ejb3/trunk/transactions: src/main/java/org/jboss/ejb3/tx and 9 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Fri Jun 5 04:37:50 EDT 2009


Author: wolfc
Date: 2009-06-05 04:37:50 -0400 (Fri, 05 Jun 2009)
New Revision: 89869

Added:
   projects/ejb3/trunk/transactions/src/main/java/org/jboss/ejb3/tx/RetryingInterceptor.java
   projects/ejb3/trunk/transactions/src/main/java/org/jboss/ejb3/tx/api/
   projects/ejb3/trunk/transactions/src/main/java/org/jboss/ejb3/tx/api/TransactionRetry.java
   projects/ejb3/trunk/transactions/src/test/java/org/jboss/aop/
   projects/ejb3/trunk/transactions/src/test/java/org/jboss/aop/asintegration/
   projects/ejb3/trunk/transactions/src/test/java/org/jboss/ejb3/test/tx/common/SynchronizationActionInterceptor.java
   projects/ejb3/trunk/transactions/src/test/java/org/jboss/ejb3/test/tx/retry/
   projects/ejb3/trunk/transactions/src/test/java/org/jboss/ejb3/test/tx/retry/Noop.java
   projects/ejb3/trunk/transactions/src/test/java/org/jboss/ejb3/test/tx/retry/NoopStatelessBean.java
   projects/ejb3/trunk/transactions/src/test/java/org/jboss/ejb3/test/tx/retry/unit/
   projects/ejb3/trunk/transactions/src/test/java/org/jboss/ejb3/test/tx/retry/unit/RetryOperationTestCase.java
   projects/ejb3/trunk/transactions/src/test/resources/instance/pojo.xml
Modified:
   projects/ejb3/trunk/transactions/pom.xml
   projects/ejb3/trunk/transactions/src/main/java/org/jboss/ejb3/tx/CMTTxInterceptorFactory.java
   projects/ejb3/trunk/transactions/src/test/java/org/jboss/ejb3/test/tx/common/AbstractTxTestCase.java
   projects/ejb3/trunk/transactions/src/test/resources/instance/jboss-aop.xml
   projects/ejb3/trunk/transactions/src/test/resources/log4j.xml
Log:
EJBTHREE-1844: retry operation after a transaction rollback

Modified: projects/ejb3/trunk/transactions/pom.xml
===================================================================
--- projects/ejb3/trunk/transactions/pom.xml	2009-06-05 08:31:38 UTC (rev 89868)
+++ projects/ejb3/trunk/transactions/pom.xml	2009-06-05 08:37:50 UTC (rev 89869)
@@ -22,7 +22,7 @@
   
   <properties>
     <version.org.jboss.deployers>2.2.0.M2</version.org.jboss.deployers>
-    <version.org.jboss.aop>2.1.0.CR3</version.org.jboss.aop>
+    <version.org.jboss.aop>2.1.1.GA</version.org.jboss.aop>
     <version.org.jboss.microcontainer>2.2.0.M1</version.org.jboss.microcontainer>
   </properties>
   

Modified: projects/ejb3/trunk/transactions/src/main/java/org/jboss/ejb3/tx/CMTTxInterceptorFactory.java
===================================================================
--- projects/ejb3/trunk/transactions/src/main/java/org/jboss/ejb3/tx/CMTTxInterceptorFactory.java	2009-06-05 08:31:38 UTC (rev 89868)
+++ projects/ejb3/trunk/transactions/src/main/java/org/jboss/ejb3/tx/CMTTxInterceptorFactory.java	2009-06-05 08:37:50 UTC (rev 89869)
@@ -30,6 +30,7 @@
 import org.jboss.aop.Advisor;
 import org.jboss.aop.joinpoint.Joinpoint;
 import org.jboss.aop.joinpoint.MethodJoinpoint;
+import org.jboss.beans.metadata.api.annotations.Inject;
 import org.jboss.ejb3.annotation.TransactionTimeout;
 import org.jboss.logging.Logger;
 
@@ -46,6 +47,14 @@
    
    private TransactionManager transactionManager; 
 
+   /**
+    * 
+    */
+   public CMTTxInterceptorFactory()
+   {
+      // TODO Auto-generated constructor stub
+   }
+   
    protected TransactionAttributeType getTxType(Advisor advisor, Joinpoint jp)
    {
       Method method = ((MethodJoinpoint) jp).getMethod();
@@ -125,6 +134,12 @@
       }
    }
    
+   @Inject
+   public void setSomething(String a)
+   {
+      
+   }
+   
    /**
     * Returns the TransactionManager
     * @return

Added: projects/ejb3/trunk/transactions/src/main/java/org/jboss/ejb3/tx/RetryingInterceptor.java
===================================================================
--- projects/ejb3/trunk/transactions/src/main/java/org/jboss/ejb3/tx/RetryingInterceptor.java	                        (rev 0)
+++ projects/ejb3/trunk/transactions/src/main/java/org/jboss/ejb3/tx/RetryingInterceptor.java	2009-06-05 08:37:50 UTC (rev 89869)
@@ -0,0 +1,74 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, 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.ejb3.tx;
+
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Method;
+import java.util.concurrent.TimeUnit;
+
+import javax.ejb.EJBTransactionRolledbackException;
+
+import org.jboss.aop.Advisor;
+import org.jboss.aop.joinpoint.Invocation;
+import org.jboss.aop.joinpoint.MethodInvocation;
+import org.jboss.ejb3.tx.api.TransactionRetry;
+
+/**
+ * Retry an operation if the transaction is rolled back.
+ * 
+ * @author <a href="mailto:cdewolf at redhat.com">Carlo de Wolf</a>
+ * @version $Revision: $
+ */
+public class RetryingInterceptor extends AbstractInterceptor
+{
+   protected <A extends Annotation> A getAnnotation(Invocation invocation, Method method, Class<A> annotationType)
+   {
+      Advisor advisor = invocation.getAdvisor();
+      A annotation = annotationType.cast(advisor.resolveAnnotation(method, annotationType));
+      if(annotation == null)
+         annotation = annotationType.cast(advisor.resolveAnnotation(annotationType));
+      return annotation;
+   }
+   
+   public Object invoke(Invocation invocation) throws Throwable
+   {
+      Method method = ((MethodInvocation) invocation).getMethod();
+      TransactionRetry txRetry = getAnnotation(invocation, method, TransactionRetry.class);
+      
+      int numRetries = txRetry.numRetries();
+      long waitTime = TimeUnit.MILLISECONDS.convert(txRetry.waitTime(), txRetry.waitTimeUnit());
+      
+      while(true)
+      {
+         try
+         {
+            return invocation.invokeNext();
+         }
+         catch(EJBTransactionRolledbackException e)
+         {
+            Thread.sleep(waitTime);
+            if(--numRetries <= 0)
+               throw e;
+         }
+      }
+   }
+}

Added: projects/ejb3/trunk/transactions/src/main/java/org/jboss/ejb3/tx/api/TransactionRetry.java
===================================================================
--- projects/ejb3/trunk/transactions/src/main/java/org/jboss/ejb3/tx/api/TransactionRetry.java	                        (rev 0)
+++ projects/ejb3/trunk/transactions/src/main/java/org/jboss/ejb3/tx/api/TransactionRetry.java	2009-06-05 08:37:50 UTC (rev 89869)
@@ -0,0 +1,46 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, 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.ejb3.tx.api;
+
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+import java.util.concurrent.TimeUnit;
+
+/**
+ * If a transaction fails to commit retry the operation.
+ * 
+ * @author <a href="mailto:cdewolf at redhat.com">Carlo de Wolf</a>
+ * @version $Revision: $
+ * @deprecated experimental
+ */
+ at Target({METHOD, TYPE})
+ at Retention(RUNTIME)
+public @interface TransactionRetry {
+   int numRetries() default 3;
+   
+   long waitTime() default 1000;
+   TimeUnit waitTimeUnit() default TimeUnit.MILLISECONDS;
+}

Modified: projects/ejb3/trunk/transactions/src/test/java/org/jboss/ejb3/test/tx/common/AbstractTxTestCase.java
===================================================================
--- projects/ejb3/trunk/transactions/src/test/java/org/jboss/ejb3/test/tx/common/AbstractTxTestCase.java	2009-06-05 08:31:38 UTC (rev 89868)
+++ projects/ejb3/trunk/transactions/src/test/java/org/jboss/ejb3/test/tx/common/AbstractTxTestCase.java	2009-06-05 08:37:50 UTC (rev 89869)
@@ -55,6 +55,7 @@
       bootstrap.deploy(getResource("instance/classloader.xml"));
       bootstrap.deploy(getResource("instance/aop.xml"));
       bootstrap.deploy(getResource("instance/deployers.xml"));
+      bootstrap.deploy(getResource("instance/pojo.xml"));
       bootstrap.deploy(getResource("instance/beans.xml"));
    }
    

Added: projects/ejb3/trunk/transactions/src/test/java/org/jboss/ejb3/test/tx/common/SynchronizationActionInterceptor.java
===================================================================
--- projects/ejb3/trunk/transactions/src/test/java/org/jboss/ejb3/test/tx/common/SynchronizationActionInterceptor.java	                        (rev 0)
+++ projects/ejb3/trunk/transactions/src/test/java/org/jboss/ejb3/test/tx/common/SynchronizationActionInterceptor.java	2009-06-05 08:37:50 UTC (rev 89869)
@@ -0,0 +1,62 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, 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.ejb3.test.tx.common;
+
+import javax.transaction.Synchronization;
+import javax.transaction.Transaction;
+
+import org.jboss.aop.joinpoint.Invocation;
+import org.jboss.ejb3.tx.AbstractInterceptor;
+import org.jboss.tm.TransactionLocal;
+
+/**
+ * Allows a custom transaction synchronization.
+ * 
+ * @author <a href="mailto:cdewolf at redhat.com">Carlo de Wolf</a>
+ * @version $Revision: $
+ */
+public class SynchronizationActionInterceptor extends AbstractInterceptor
+{
+   private static TransactionLocal local = new TransactionLocal();
+   private static Synchronization sync;
+   
+   private static Transaction getCurrentTransaction()
+   {
+      return local.getTransaction();
+   }
+   
+   public Object invoke(Invocation invocation) throws Throwable
+   {
+      if(local.get() == null && sync != null)
+      {
+         Transaction tx = getCurrentTransaction();
+         tx.registerSynchronization(sync);
+         local.set(sync);
+      }
+      return invocation.invokeNext();
+   }
+   
+   public static void setSynchronization(Synchronization s)
+   {
+      sync = s;
+   }
+}

Added: projects/ejb3/trunk/transactions/src/test/java/org/jboss/ejb3/test/tx/retry/Noop.java
===================================================================
--- projects/ejb3/trunk/transactions/src/test/java/org/jboss/ejb3/test/tx/retry/Noop.java	                        (rev 0)
+++ projects/ejb3/trunk/transactions/src/test/java/org/jboss/ejb3/test/tx/retry/Noop.java	2009-06-05 08:37:50 UTC (rev 89869)
@@ -0,0 +1,34 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, 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.ejb3.test.tx.retry;
+
+/**
+ * @author <a href="mailto:cdewolf at redhat.com">Carlo de Wolf</a>
+ * @version $Revision: $
+ */
+public interface Noop
+{
+   /**
+    * Surprise! It does have an op :-)
+    */
+   void noop();
+}

Added: projects/ejb3/trunk/transactions/src/test/java/org/jboss/ejb3/test/tx/retry/NoopStatelessBean.java
===================================================================
--- projects/ejb3/trunk/transactions/src/test/java/org/jboss/ejb3/test/tx/retry/NoopStatelessBean.java	                        (rev 0)
+++ projects/ejb3/trunk/transactions/src/test/java/org/jboss/ejb3/test/tx/retry/NoopStatelessBean.java	2009-06-05 08:37:50 UTC (rev 89869)
@@ -0,0 +1,46 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, 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.ejb3.test.tx.retry;
+
+import javax.ejb.Stateless;
+
+import org.jboss.ejb3.tx.api.TransactionRetry;
+
+/**
+ * @author <a href="mailto:cdewolf at redhat.com">Carlo de Wolf</a>
+ * @version $Revision: $
+ */
+ at Stateless
+ at TransactionRetry(numRetries=4, waitTime=100)
+public class NoopStatelessBean implements Noop
+{
+   // exposed for unit test
+   public int operations = 0;
+   
+   public void noop()
+   {
+      // really do absolutely nothing
+      
+      // I lied, I need to count
+      operations++;
+   }
+}

Added: projects/ejb3/trunk/transactions/src/test/java/org/jboss/ejb3/test/tx/retry/unit/RetryOperationTestCase.java
===================================================================
--- projects/ejb3/trunk/transactions/src/test/java/org/jboss/ejb3/test/tx/retry/unit/RetryOperationTestCase.java	                        (rev 0)
+++ projects/ejb3/trunk/transactions/src/test/java/org/jboss/ejb3/test/tx/retry/unit/RetryOperationTestCase.java	2009-06-05 08:37:50 UTC (rev 89869)
@@ -0,0 +1,122 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, 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.ejb3.test.tx.retry.unit;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.fail;
+
+import javax.ejb.EJBTransactionRolledbackException;
+import javax.transaction.Synchronization;
+import javax.transaction.SystemException;
+import javax.transaction.TransactionManager;
+
+import org.jboss.ejb3.interceptors.container.BeanContext;
+import org.jboss.ejb3.interceptors.direct.DirectContainer;
+import org.jboss.ejb3.test.tx.common.AbstractTxTestCase;
+import org.jboss.ejb3.test.tx.common.SynchronizationActionInterceptor;
+import org.jboss.ejb3.test.tx.retry.NoopStatelessBean;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * @author <a href="mailto:cdewolf at redhat.com">Carlo de Wolf</a>
+ * @version $Revision: $
+ */
+public class RetryOperationTestCase extends AbstractTxTestCase
+{
+   private static TransactionManager tm ;
+   
+   @BeforeClass
+   public static void beforeClass() throws Throwable
+   {
+      AbstractTxTestCase.beforeClass();
+      
+      tm = bootstrap.lookup("RealTransactionManager", TransactionManager.class);
+   }
+   
+   @Test
+   public void testBeforeCompletionFailure() throws Throwable
+   {
+      SynchronizationActionInterceptor.setSynchronization(new Synchronization() {
+         public void afterCompletion(int status)
+         {
+         }
+
+         public void beforeCompletion()
+         {
+            throw new RuntimeException("fail on purpose");
+         }
+      });
+      DirectContainer<NoopStatelessBean> container = new DirectContainer<NoopStatelessBean>("NoopStatelessBean", "Retrying Stateless Container", NoopStatelessBean.class);
+      
+      BeanContext<NoopStatelessBean> bean = container.construct();
+      
+      try
+      {
+         container.invoke(bean, "noop");
+         fail("Should have caught an EJBTransactionRolledbackException");
+      }
+      catch(EJBTransactionRolledbackException e)
+      {
+         // in the end it'll still throw this one
+      }
+      
+      assertEquals("Should have retried 4 times", 4, bean.getInstance().operations);
+   }
+
+   @Test
+   public void testBeforeCompletionRollback() throws Throwable
+   {
+      SynchronizationActionInterceptor.setSynchronization(new Synchronization() {
+         public void afterCompletion(int status)
+         {
+         }
+
+         public void beforeCompletion()
+         {
+            try
+            {
+               tm.setRollbackOnly();
+            }
+            catch(SystemException e)
+            {
+               throw new RuntimeException(e);
+            }
+         }
+      });
+      DirectContainer<NoopStatelessBean> container = new DirectContainer<NoopStatelessBean>("NoopStatelessBean", "Retrying Stateless Container", NoopStatelessBean.class);
+      
+      BeanContext<NoopStatelessBean> bean = container.construct();
+      
+      try
+      {
+         container.invoke(bean, "noop");
+         fail("Should have caught an EJBTransactionRolledbackException");
+      }
+      catch(EJBTransactionRolledbackException e)
+      {
+         // in the end it'll still throw this one
+      }
+      
+      assertEquals("Should have retried 4 times", 4, bean.getInstance().operations);
+   }
+}

Modified: projects/ejb3/trunk/transactions/src/test/resources/instance/jboss-aop.xml
===================================================================
--- projects/ejb3/trunk/transactions/src/test/resources/instance/jboss-aop.xml	2009-06-05 08:31:38 UTC (rev 89868)
+++ projects/ejb3/trunk/transactions/src/test/resources/instance/jboss-aop.xml	2009-06-05 08:37:50 UTC (rev 89869)
@@ -5,7 +5,10 @@
    <interceptor class="org.jboss.ejb3.test.tx.common.StatefulInstanceInterceptor" scope="PER_VM"/>
    <interceptor factory="org.jboss.ejb3.tx.BMTTxInterceptorFactory" scope="PER_CLASS_JOINPOINT"/>
    <interceptor factory="org.jboss.ejb3.tx.CMTTxInterceptorFactory" scope="PER_CLASS_JOINPOINT"/>
+   <interceptor class="org.jboss.ejb3.tx.RetryingInterceptor" scope="PER_VM"/>
+   <interceptor class="org.jboss.ejb3.test.tx.common.SynchronizationActionInterceptor" scope="PER_VM"/>
    
+   
    <domain name="Stateless Container">
       <bind pointcut="execution(public * *->*(..))">
          <interceptor-ref name="org.jboss.aspects.currentinvocation.CurrentInvocationInterceptor"/>
@@ -15,6 +18,21 @@
       </bind>
    </domain>
    
+   <domain name="Retrying Stateless Container">
+      <bind pointcut="execution(public * *->*(..))">
+         <interceptor-ref name="org.jboss.aspects.currentinvocation.CurrentInvocationInterceptor"/>
+      </bind>
+      <bind pointcut="execution(public * @org.jboss.ejb3.tx.api.TransactionRetry->*(..))">
+         <interceptor-ref name="org.jboss.ejb3.tx.RetryingInterceptor"/>
+      </bind>
+      <bind pointcut="execution(public * *->*(..))">
+         <interceptor-ref name="org.jboss.ejb3.tx.CMTTxInterceptorFactory"/>
+         <!-- here be an instance interceptor -->
+         <interceptor-ref name="org.jboss.ejb3.tx.BMTTxInterceptorFactory"/>
+         <interceptor-ref name="org.jboss.ejb3.test.tx.common.SynchronizationActionInterceptor"/>
+      </bind>
+   </domain>
+   
    <domain name="Stateful Container">
       <bind pointcut="execution(public * *->*(..))">
          <interceptor-ref name="org.jboss.aspects.currentinvocation.CurrentInvocationInterceptor"/>

Added: projects/ejb3/trunk/transactions/src/test/resources/instance/pojo.xml
===================================================================
--- projects/ejb3/trunk/transactions/src/test/resources/instance/pojo.xml	                        (rev 0)
+++ projects/ejb3/trunk/transactions/src/test/resources/instance/pojo.xml	2009-06-05 08:37:50 UTC (rev 89869)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+   <!-- POJO Deployment -->
+   <bean name="BeanDeployer" class="org.jboss.deployers.vfs.deployer.kernel.BeanDeployer"/>
+   <bean name="KernelDeploymentDeployer" class="org.jboss.deployers.vfs.deployer.kernel.KernelDeploymentDeployer"/>
+   <bean name="BeanMetaDataDeployer" class="org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer">
+      <constructor><parameter class="org.jboss.kernel.Kernel"><inject bean="jboss.kernel:service=Kernel"/></parameter></constructor>
+   </bean>
+</deployment>
\ No newline at end of file

Modified: projects/ejb3/trunk/transactions/src/test/resources/log4j.xml
===================================================================
--- projects/ejb3/trunk/transactions/src/test/resources/log4j.xml	2009-06-05 08:31:38 UTC (rev 89868)
+++ projects/ejb3/trunk/transactions/src/test/resources/log4j.xml	2009-06-05 08:37:50 UTC (rev 89869)
@@ -107,6 +107,16 @@
     <priority value="INFO"/>
   </category>
   
+  <!--
+  <category name="org.jboss.aop">
+    <priority value="ALL"/>
+  </category>
+  
+  <category name="org.jboss.deployers">
+    <priority value="ALL"/>
+  </category>
+  -->
+  
   <category name="org.jboss.ejb3">
     <priority value="ALL"/>
   </category>




More information about the jboss-cvs-commits mailing list