[jboss-cvs] JBossAS SVN: r103250 - in projects/ejb3/trunk: testsuite and 6 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Tue Mar 30 07:56:35 EDT 2010


Author: jaikiran
Date: 2010-03-30 07:56:35 -0400 (Tue, 30 Mar 2010)
New Revision: 103250

Added:
   projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/ejbthree2061/
   projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/ejbthree2061/InjectionTester.java
   projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/ejbthree2061/SimpleInterceptor.java
   projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/ejbthree2061/SimpleStatelessBean.java
   projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/ejbthree2061/unit/
   projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/ejbthree2061/unit/InterceptorInjectionTestCase.java
   projects/ejb3/trunk/testsuite/src/test/resources/test/ejbthree2061/
   projects/ejb3/trunk/testsuite/src/test/resources/test/ejbthree2061/META-INF/
   projects/ejb3/trunk/testsuite/src/test/resources/test/ejbthree2061/META-INF/ejb-jar.xml
   projects/ejb3/trunk/testsuite/src/test/resources/test/ejbthree2061/META-INF/persistence.xml
Modified:
   projects/ejb3/trunk/core/src/main/java/org/jboss/injection/ResourceHandler.java
   projects/ejb3/trunk/testsuite/build-test.xml
Log:
EJBTHREE-2061 Fixed the ResourceHandler to not create a bean instance injector while processing the interceptor class environment

Modified: projects/ejb3/trunk/core/src/main/java/org/jboss/injection/ResourceHandler.java
===================================================================
--- projects/ejb3/trunk/core/src/main/java/org/jboss/injection/ResourceHandler.java	2010-03-30 11:49:11 UTC (rev 103249)
+++ projects/ejb3/trunk/core/src/main/java/org/jboss/injection/ResourceHandler.java	2010-03-30 11:56:35 UTC (rev 103250)
@@ -128,46 +128,15 @@
                   throw new RuntimeException(e);
                }
             }
-            else {
+            else 
+            {
                if (UserTransaction.class.getName().equals(envRef.getType()))
                {
-                  final InjectionContainer ic = container;
-                  InjectorFactory<?> factory = new InjectorFactory<UserTransactionPropertyInjector>()
-                  {
-                     public UserTransactionPropertyInjector create(BeanProperty property)
-                     {
-                        return new UserTransactionPropertyInjector(property, ic);
-                     }
-                  };
-                  if(envRef.getInjectionTargets() != null)
-                  {
-                     InjectionUtil.createInjectors(container.getInjectors(), container.getClassloader(), factory, envRef.getInjectionTargets());
-                     continue;
-                  }
-                  else
-                  {
                      mappedName = "java:comp/UserTransaction";
-                  }
                }
                else if (TimerService.class.getName().equals(envRef.getType()))
                {
-                  final Container ic = (Container) container;
-                  InjectorFactory<?> factory = new InjectorFactory<TimerServicePropertyInjector>()
-                  {
-                     public TimerServicePropertyInjector create(BeanProperty property)
-                     {
-                        return new TimerServicePropertyInjector(property, ic);
-                     }
-                  };
-                  if(envRef.getInjectionTargets() != null)
-                  {
-                     InjectionUtil.createInjectors(container.getInjectors(), container.getClassloader(), factory, envRef.getInjectionTargets());
-                     continue;
-                  }
-                  else
-                  {
                      mappedName = "java:comp/TimerService";
-                  }
                }
                else if (ORB.class.getName().equals(envRef.getType()))
                {
@@ -209,101 +178,63 @@
          // TODO: refactor with handlePropertyAnnotation
          String resTypeName = envRef.getType();
          String mappedName = envRef.getMappedName();
-         try
+         String encName = "env/" + envRef.getResourceEnvRefName();
+         if (resTypeName != null)
          {
-            if(resTypeName != null)
+            Class<?> resType = null;
+            try
             {
                // EJBTHREE-1671 : The resType class should be loaded through the container's classloader
-               Class<?> resType = Class.forName(resTypeName,false,container.getClassloader());
-               if(EJBContext.class.isAssignableFrom(resType))
+               resType = Class.forName(resTypeName, false, container.getClassloader());
+            }
+            catch (ClassNotFoundException e)
+            {
+               throw new EJBException(e);
+            }
+            if (EJBContext.class.isAssignableFrom(resType))
+            {
+               mappedName = "java:comp/EJBContext";
+            }
+            else if (resType.equals(UserTransaction.class))
+            {
+               mappedName = "java:comp/UserTransaction";
+            }
+            else if (resType.equals(TimerService.class))
+            {
+               mappedName = "java:comp/TimerService";
+            }
+            else if (resType.equals(ORB.class))
+            {
+               mappedName = "java:comp/ORB";
+               continue;
+            }
+            else if (WebServiceContext.class.getName().equals(envRef.getType()))
+            {
+               // JBAS-5359
+               InjectorFactory<?> factory = new InjectorFactory<WebServiceContextPropertyInjector>()
                {
-                  InjectorFactory<?> factory = new InjectorFactory<EJBContextPropertyInjector>()
+                  public WebServiceContextPropertyInjector create(BeanProperty property)
                   {
-                     public EJBContextPropertyInjector create(BeanProperty property)
-                     {
-                        return new EJBContextPropertyInjector(property);
-                     }
-                  };
-                  if (envRef.getInjectionTargets() != null)
-                  {
-                     InjectionUtil.createInjectors(container.getInjectors(), container.getClassloader(), factory, envRef.getInjectionTargets());
-                     continue;
+                     return new WebServiceContextPropertyInjector(property);
                   }
-                  else
-                  {
-                     mappedName = "java:comp/EJBContext";
-                  }
-               }
-               else if (resType.equals(UserTransaction.class))
+               };
+               if (envRef.getInjectionTargets() != null)
                {
-                  final InjectionContainer ic = container;
-                  InjectorFactory<?> factory = new InjectorFactory<UserTransactionPropertyInjector>()
-                  {
-                     public UserTransactionPropertyInjector create(BeanProperty property)
-                     {
-                        return new UserTransactionPropertyInjector(property, ic);
-                     }
-                  };
-                  if(envRef.getInjectionTargets() != null)
-                  {
-                     InjectionUtil.createInjectors(container.getInjectors(), container.getClassloader(), factory, envRef.getInjectionTargets());
-                     continue;
-                  }
-                  else
-                  {
-                     mappedName = "java:comp/UserTransaction";
-                  }
-               }
-               else if (resType.equals(TimerService.class))
-               {
-                  final Container ic = (Container) container;
-                  InjectorFactory<?> factory = new InjectorFactory<TimerServicePropertyInjector>()
-                  {
-                     public TimerServicePropertyInjector create(BeanProperty property)
-                     {
-                        return new TimerServicePropertyInjector(property, ic);
-                     }
-                  };
-                  if(envRef.getInjectionTargets() != null)
-                  {
-                     InjectionUtil.createInjectors(container.getInjectors(), container.getClassloader(), factory, envRef.getInjectionTargets());
-                     continue;
-                  }
-                  else
-                  {
-                     mappedName = "java:comp/TimerService";
-                  }
-               }
-               else if (resType.equals(ORB.class))
-               {
-                  mappedName = "java:comp/ORB";
+                  // TODO: We shouldn't be creating a injector (WebServiceContextPropertyInjector) which bypasses
+                  // ENC. But this is hack since we don't know the ENC name of webservice context.
+                  // Ideally, we should have just created a ENC injector (the one which sets up the ENC) as follows:
+                  // container.getEncInjectors().put(encName, new LinkRefEncInjector(encName, "java:comp/WeDontKnowTheWSContext", "<resource-ref>"));
+                  // and then created a instance injector (one which picks up from ENC and injects into the instance) as follows:
+                  // InjectionUtil.injectionTarget(encName, envRef, container, container.getEncInjections());
+                  // @see https://jira.jboss.org/jira/browse/EJBTHREE-2061
+                  InjectionUtil.createInjectors(container.getInjectors(), container.getClassloader(), factory, envRef
+                        .getInjectionTargets());
                   continue;
                }
-               else if(WebServiceContext.class.getName().equals(envRef.getType()))
-               {
-                  // JBAS-5359
-                  InjectorFactory<?> factory = new InjectorFactory<WebServiceContextPropertyInjector>()
-                  {
-                     public WebServiceContextPropertyInjector create(BeanProperty property)
-                     {
-                        return new WebServiceContextPropertyInjector(property);
-                     }
-                  };
-                  if(envRef.getInjectionTargets() != null)
-                  {
-                     InjectionUtil.createInjectors(container.getInjectors(), container.getClassloader(), factory, envRef.getInjectionTargets());
-                     continue;
-                  }
 
-               }
             }
          }
-         catch(ClassNotFoundException e)
-         {
-            throw new EJBException(e);
-         }
 
-         String encName = "env/" + envRef.getResourceEnvRefName();
          if (container.getEncInjectors().containsKey(encName)) continue;
          if (mappedName == null || mappedName.equals(""))
          {

Modified: projects/ejb3/trunk/testsuite/build-test.xml
===================================================================
--- projects/ejb3/trunk/testsuite/build-test.xml	2010-03-30 11:49:11 UTC (rev 103249)
+++ projects/ejb3/trunk/testsuite/build-test.xml	2010-03-30 11:56:35 UTC (rev 103250)
@@ -4221,6 +4221,16 @@
     <target name="ejbthree2038">
           <build-simple-jar name="ejbthree2038"/>
     </target>
+
+    <target name="ejbthree2061">
+      <mkdir dir="${build.lib}"/>
+      <jar jarfile="${build.lib}/ejbthree2061.jar">
+         <fileset dir="${build.classes}">
+            <include name="org/jboss/ejb3/test/ejbthree2061/*.class"/>
+         </fileset>
+         <fileset dir="${resources}/test/ejbthree2061"/>
+      </jar>
+    </target>
    
 
    <target name="jars" depends="removedislocal, statelesscreation, defaultremotebindings, localfromremote, clusteredjms, concurrentnaming, propertyreplacement, persistenceunits, appclient, tck5sec, invalidtxmdb, descriptortypo, libdeployment, homeinterface, arjuna, mdbtransactions, unauthenticatedprincipal, clusteredservice, invoker, classloader,
@@ -4255,7 +4265,7 @@
       composite, composite2, entitycallback, relationships, ssl, ssladvanced, clusteredsession, strictpool, jacc,
       localcall, interceptors, interceptors2, interceptors3, iiop, clientinterceptor,
       statelesscreation, changexml, externalrefscoped, ejbthree1671, ejbthree1677, ejbthree1629, 
-      ejbthree1807, ejbthree1346, ejbthree1823, ejbthree1858, ejbthree1876, ejbthree1926, ejbthree2038"/>
+      ejbthree1807, ejbthree1346, ejbthree1823, ejbthree1858, ejbthree1876, ejbthree1926, ejbthree2038, ejbthree2061"/>
 
    <target name="test" depends="init" if="test"
       description="Execute all tests in the given test directory.">
@@ -5082,6 +5092,9 @@
          <param name="test" value="ejbthree2038"/>
       </antcall>
       <antcall target="test" inheritRefs="true">
+         <param name="test" value="ejbthree2061"/>
+      </antcall>
+      <antcall target="test" inheritRefs="true">
          <param name="test" value="statelesscreation"/>
       </antcall>
       <antcall target="test" inheritRefs="true">

Added: projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/ejbthree2061/InjectionTester.java
===================================================================
--- projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/ejbthree2061/InjectionTester.java	                        (rev 0)
+++ projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/ejbthree2061/InjectionTester.java	2010-03-30 11:56:35 UTC (rev 103250)
@@ -0,0 +1,38 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt 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.ejbthree2061;
+
+/**
+ * InjectionTester
+ *
+ * @author Jaikiran Pai
+ * @version $Revision: $
+ */
+public interface InjectionTester
+{
+   /**
+    * Checks that all the expected fields/methods have been injected
+    * 
+    * @throws IllegalStateException If any of the expected field/method was not injected
+    */
+   void assertAllInjectionsDone() throws IllegalStateException;
+}

Added: projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/ejbthree2061/SimpleInterceptor.java
===================================================================
--- projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/ejbthree2061/SimpleInterceptor.java	                        (rev 0)
+++ projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/ejbthree2061/SimpleInterceptor.java	2010-03-30 11:56:35 UTC (rev 103250)
@@ -0,0 +1,68 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt 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.ejbthree2061;
+
+import javax.annotation.Resource;
+import javax.ejb.EJBContext;
+import javax.interceptor.AroundInvoke;
+import javax.interceptor.InvocationContext;
+import javax.persistence.EntityManager;
+import javax.sql.DataSource;
+
+/**
+ * SimpleInterceptor
+ *
+ * @author Jaikiran Pai
+ * @version $Revision: $
+ */
+public class SimpleInterceptor
+{
+
+   @Resource (mappedName = "java:/DefaultDS")
+   private DataSource ds;
+   
+   // an injection-target is configured for this field through ejb-jar.xml
+   private EJBContext ejbContextInjectedThroughEjbJarXml;
+
+   // an injection-target is configured for this field through ejb-jar.xml
+   private EntityManager persistenceCtxRefConfiguredInEJBJarXml; 
+   
+   @AroundInvoke
+   public Object aroundInvoke(InvocationContext invocationCtx) throws Exception
+   {
+      if (ds == null)
+      {
+         throw new IllegalStateException("Datasource was *not* injected in interceptor " + this.getClass().getName());
+      }
+      
+      if (ejbContextInjectedThroughEjbJarXml == null)
+      {
+         throw new IllegalStateException("EJBContext was *not* injected in interceptor " + this.getClass().getName());
+      }
+      
+      if (persistenceCtxRefConfiguredInEJBJarXml == null)
+      {
+         throw new IllegalStateException("EntityManager was *not* injected in interceptor " + this.getClass().getName());
+      }
+      return invocationCtx.proceed();
+   }
+}

Added: projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/ejbthree2061/SimpleStatelessBean.java
===================================================================
--- projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/ejbthree2061/SimpleStatelessBean.java	                        (rev 0)
+++ projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/ejbthree2061/SimpleStatelessBean.java	2010-03-30 11:56:35 UTC (rev 103250)
@@ -0,0 +1,72 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt 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.ejbthree2061;
+
+import javax.annotation.Resource;
+import javax.ejb.Remote;
+import javax.ejb.SessionContext;
+import javax.ejb.Stateless;
+import javax.interceptor.Interceptors;
+import javax.persistence.EntityManager;
+import javax.persistence.PersistenceContext;
+
+import org.jboss.ejb3.annotation.RemoteBinding;
+
+/**
+ * SimpleStatelessBean
+ *
+ * @author Jaikiran Pai
+ * @version $Revision: $
+ */
+ at Stateless
+ at Interceptors(SimpleInterceptor.class)
+ at Remote(InjectionTester.class)
+ at RemoteBinding(jndiBinding = SimpleStatelessBean.JNDI_NAME)
+public class SimpleStatelessBean implements InjectionTester
+{
+
+   public static final String JNDI_NAME = "interceptor-injection-test-bean";
+
+   @PersistenceContext(unitName = "interceptor-test-pu")
+   private EntityManager em;
+
+   @Resource
+   private SessionContext sessionContext;
+
+   /**
+    * @see org.jboss.ejb3.test.ejbthree2061.InjectionTester#allInjectionsDone()
+    */
+   public void assertAllInjectionsDone() throws IllegalStateException
+   {
+      if (em == null)
+      {
+         throw new IllegalStateException("EntityManager was *not* injected in bean " + this.getClass().getName());
+      }
+
+      if (this.sessionContext == null)
+      {
+         throw new IllegalStateException("SessionContext was *not* injected in interceptor "
+               + this.getClass().getName());
+      }
+   }
+
+}

Added: projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/ejbthree2061/unit/InterceptorInjectionTestCase.java
===================================================================
--- projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/ejbthree2061/unit/InterceptorInjectionTestCase.java	                        (rev 0)
+++ projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/ejbthree2061/unit/InterceptorInjectionTestCase.java	2010-03-30 11:56:35 UTC (rev 103250)
@@ -0,0 +1,71 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt 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.ejbthree2061.unit;
+
+import junit.framework.Test;
+
+import org.jboss.ejb3.test.ejbthree2061.InjectionTester;
+import org.jboss.ejb3.test.ejbthree2061.SimpleInterceptor;
+import org.jboss.ejb3.test.ejbthree2061.SimpleStatelessBean;
+import org.jboss.injection.ResourceHandler;
+import org.jboss.test.JBossTestCase;
+
+/**
+ * Tests the bug fix for https://jira.jboss.org/jira/browse/EJBTHREE-2061
+ * 
+ * <p>
+ *  {@link ResourceHandler} was creating an injector for the bean class
+ *  while processing the interceptor class. Instead it should have created
+ *  a ENC injector (which is responsible for setting up ENC)
+ * </p>
+ *
+ * @author Jaikiran Pai
+ * @version $Revision: $
+ */
+public class InterceptorInjectionTestCase extends JBossTestCase
+{
+
+   /**
+    * @param name
+    */
+   public InterceptorInjectionTestCase(String name)
+   {
+      super(name);
+   }
+   
+   public static Test suite() throws Exception
+   {
+      return getDeploySetup(InterceptorInjectionTestCase.class, "ejbthree2061.jar");
+   }
+
+   /**
+    * Tests that the {@link SimpleStatelessBean} and its interceptor class {@link SimpleInterceptor}
+    * have all the expected fields/methods injected 
+    * 
+    * @throws Exception
+    */
+   public void testInjection() throws Exception
+   {
+      InjectionTester bean = (InjectionTester) this.getInitialContext().lookup(SimpleStatelessBean.JNDI_NAME);
+      bean.assertAllInjectionsDone();
+   }
+}

Added: projects/ejb3/trunk/testsuite/src/test/resources/test/ejbthree2061/META-INF/ejb-jar.xml
===================================================================
--- projects/ejb3/trunk/testsuite/src/test/resources/test/ejbthree2061/META-INF/ejb-jar.xml	                        (rev 0)
+++ projects/ejb3/trunk/testsuite/src/test/resources/test/ejbthree2061/META-INF/ejb-jar.xml	2010-03-30 11:56:35 UTC (rev 103250)
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ejb-jar
+        xmlns="http://java.sun.com/xml/ns/javaee"
+        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+        xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+                            http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd"
+        version="3.0">
+        
+        <interceptors>
+            <interceptor>
+                <interceptor-class>org.jboss.ejb3.test.ejbthree2061.SimpleInterceptor</interceptor-class>
+                <resource-env-ref>
+                    <resource-env-ref-name>someOtherENCName</resource-env-ref-name>
+                    <resource-env-ref-type>javax.ejb.EJBContext</resource-env-ref-type>
+                    <injection-target>
+                        <injection-target-class>org.jboss.ejb3.test.ejbthree2061.SimpleInterceptor</injection-target-class>
+                        <injection-target-name>ejbContextInjectedThroughEjbJarXml</injection-target-name>
+                    </injection-target>
+                </resource-env-ref>
+                <persistence-context-ref>
+                    <persistence-context-ref-name>someENCName</persistence-context-ref-name>
+                    <persistence-unit-name>interceptor-test-pu</persistence-unit-name>
+                    <injection-target>
+                        <injection-target-class>org.jboss.ejb3.test.ejbthree2061.SimpleInterceptor</injection-target-class>
+                        <injection-target-name>persistenceCtxRefConfiguredInEJBJarXml</injection-target-name>
+                    </injection-target>
+                </persistence-context-ref>
+            </interceptor>
+        </interceptors>
+</ejb-jar>        
\ No newline at end of file

Added: projects/ejb3/trunk/testsuite/src/test/resources/test/ejbthree2061/META-INF/persistence.xml
===================================================================
--- projects/ejb3/trunk/testsuite/src/test/resources/test/ejbthree2061/META-INF/persistence.xml	                        (rev 0)
+++ projects/ejb3/trunk/testsuite/src/test/resources/test/ejbthree2061/META-INF/persistence.xml	2010-03-30 11:56:35 UTC (rev 103250)
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<persistence xmlns="http://java.sun.com/xml/ns/persistence"
+   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+   xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
+   http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
+   version="1.0">
+   <persistence-unit name="interceptor-test-pu">
+      <jta-data-source>java:/DefaultDS</jta-data-source>
+      <properties>
+          <property name="hibernate.hbm2ddl.auto" value="create-drop"/>
+      </properties>
+   </persistence-unit>
+</persistence>




More information about the jboss-cvs-commits mailing list