gdamour     2004/10/25 10:24:31

  Modified:    modules/core/src/java/org/openejb EJBModuleImpl.java
  Log:

  o Update the way CMR fields are mapped.
  The previous implementation was using the <ejb-relation-name> and 
<ejb-relationship-role-name> elements, which were optional elements.
  The new implementation uses the fact that at least one <relationship-role-source> 
and <cmr-field> couple exists for a given relationship.
  
  o It is no more required to configure a TransactionManager for EJB having OTM or MTM 
relationships. One uses the TransactionManager contained by the 
TransactionContextManager associated to the provided EARContext.
  
  Revision  Changes    Path
  1.9       +8 -8      openejb/modules/core/src/java/org/openejb/EJBModuleImpl.java
  
  Index: EJBModuleImpl.java
  ===================================================================
  RCS file: 
/home/projects/openejb/scm/openejb/modules/core/src/java/org/openejb/EJBModuleImpl.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- EJBModuleImpl.java        15 Oct 2004 01:48:43 -0000      1.8
  +++ EJBModuleImpl.java        25 Oct 2004 14:24:31 -0000      1.9
  @@ -50,7 +50,6 @@
   import java.util.Hashtable;
   import javax.management.MalformedObjectNameException;
   import javax.management.ObjectName;
  -import javax.transaction.TransactionManager;
   
   import org.apache.geronimo.gbean.GBeanInfo;
   import org.apache.geronimo.gbean.GBeanInfoFactory;
  @@ -62,6 +61,7 @@
   import org.apache.geronimo.j2ee.management.impl.Util;
   import org.apache.geronimo.kernel.Kernel;
   import org.apache.geronimo.kernel.jmx.JMXUtil;
  +import org.apache.geronimo.transaction.context.TransactionContextManager;
   import org.openejb.entity.cmp.ConnectionProxyFactory;
   import org.tranql.ejb.TransactionManagerDelegate;
   import org.tranql.query.ConnectionFactoryDelegate;
  @@ -78,9 +78,9 @@
       private final ConnectionFactoryDelegate delegate;
       private final ConnectionProxyFactory connectionFactory;
       private final TransactionManagerDelegate tmDelegate;
  -    private final TransactionManager tm;
  +    private final TransactionContextManager transactionContextManager;
       
  -    public EJBModuleImpl(Kernel kernel, String objectName, J2EEServer server, 
J2EEApplication application, String deploymentDescriptor, ConnectionFactoryDelegate 
delegate, ConnectionProxyFactory connectionFactory, TransactionManagerDelegate 
tmDelegate, TransactionManager tm) {
  +    public EJBModuleImpl(Kernel kernel, String objectName, J2EEServer server, 
J2EEApplication application, String deploymentDescriptor, ConnectionFactoryDelegate 
delegate, ConnectionProxyFactory connectionFactory, TransactionManagerDelegate 
tmDelegate, TransactionContextManager transactionContextManager) {
           ObjectName myObjectName = JMXUtil.getObjectName(objectName);
           verifyObjectName(myObjectName);
   
  @@ -98,7 +98,7 @@
           this.delegate = delegate;
           this.connectionFactory = connectionFactory;
           this.tmDelegate = tmDelegate;
  -        this.tm = tm;
  +        this.transactionContextManager = transactionContextManager;
       }
   
       public String getDeploymentDescriptor() {
  @@ -158,7 +158,7 @@
               delegate.setConnectionFactory(connectionFactory.getProxy());
           }
           if ( null != tmDelegate ) {
  -            tmDelegate.setTransactionManager(tm);
  +            
tmDelegate.setTransactionManager(transactionContextManager.getTransactionManager());
           }
       }
   
  @@ -190,7 +190,7 @@
           infoFactory.addAttribute("deploymentDescriptor", String.class, true);
           infoFactory.addReference("ConnectionFactory", ConnectionProxyFactory.class);
           infoFactory.addAttribute("Delegate", ConnectionFactoryDelegate.class, true);
  -        infoFactory.addReference("TransactionManager", TransactionManager.class);
  +        infoFactory.addReference("TransactionContextManager", 
TransactionContextManager.class);
           infoFactory.addAttribute("TMDelegate", TransactionManagerDelegate.class, 
true);
   
           infoFactory.addAttribute("kernel", Kernel.class, false);
  @@ -209,7 +209,7 @@
               "Delegate",
               "ConnectionFactory",
               "TMDelegate",
  -            "TransactionManager"});
  +            "TransactionContextManager"});
   
           GBEAN_INFO = infoFactory.getBeanInfo();
       }
  
  
  

Reply via email to