geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject svn commit: r415721 - in /geronimo/branches/dain/openejb-2.2-merge: configs/openejb-deployer/src/plan/ configs/openejb/src/plan/ modules/client-builder/src/java/org/apache/geronimo/client/builder/ modules/connector-builder/src/test/org/apache/geronimo/...
Date Tue, 20 Jun 2006 16:06:27 GMT
Author: dain
Date: Tue Jun 20 09:06:26 2006
New Revision: 415721

URL: http://svn.apache.org/viewvc?rev=415721&view=rev
Log:
Updated to match API changes in openejb

Modified:
    geronimo/branches/dain/openejb-2.2-merge/configs/openejb-deployer/src/plan/plan.xml
    geronimo/branches/dain/openejb-2.2-merge/configs/openejb/src/plan/plan.xml
    geronimo/branches/dain/openejb-2.2-merge/modules/client-builder/src/java/org/apache/geronimo/client/builder/AppClientModuleBuilder.java
    geronimo/branches/dain/openejb-2.2-merge/modules/connector-builder/src/test/org/apache/geronimo/connector/deployment/ConnectorModuleBuilderTest.java
    geronimo/branches/dain/openejb-2.2-merge/modules/deployment/src/java/org/apache/geronimo/deployment/DeploymentContext.java
    geronimo/branches/dain/openejb-2.2-merge/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder.java
    geronimo/branches/dain/openejb-2.2-merge/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/EARContext.java
    geronimo/branches/dain/openejb-2.2-merge/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/EJBModule.java
    geronimo/branches/dain/openejb-2.2-merge/modules/j2ee-builder/src/test/org/apache/geronimo/j2ee/deployment/EARConfigBuilderTest.java
    geronimo/branches/dain/openejb-2.2-merge/modules/jetty-builder/src/test/org/apache/geronimo/jetty/deployment/JettyModuleBuilderTest.java
    geronimo/branches/dain/openejb-2.2-merge/modules/naming/src/java/org/apache/geronimo/naming/enc/EnterpriseNamingContext.java
    geronimo/branches/dain/openejb-2.2-merge/modules/tomcat-builder/src/test/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilderTest.java
    geronimo/branches/dain/openejb-2.2-merge/modules/transaction/src/java/org/apache/geronimo/transaction/context/TransactionContextManager.java
    geronimo/branches/dain/openejb-2.2-merge/modules/transaction/src/java/org/apache/geronimo/transaction/context/UserTransactionImpl.java

Modified: geronimo/branches/dain/openejb-2.2-merge/configs/openejb-deployer/src/plan/plan.xml
URL: http://svn.apache.org/viewvc/geronimo/branches/dain/openejb-2.2-merge/configs/openejb-deployer/src/plan/plan.xml?rev=415721&r1=415720&r2=415721&view=diff
==============================================================================
--- geronimo/branches/dain/openejb-2.2-merge/configs/openejb-deployer/src/plan/plan.xml (original)
+++ geronimo/branches/dain/openejb-2.2-merge/configs/openejb-deployer/src/plan/plan.xml Tue
Jun 20 09:06:26 2006
@@ -17,12 +17,14 @@
 -->
 
 <!-- $Rev$ $Date$ -->
-
 <module xmlns="http://geronimo.apache.org/xml/ns/deployment-1.1">
-
-
-    <gbean name="EJBBuilder" class="org.openejb.deployment.OpenEJBModuleBuilder">
+    <gbean name="EJBBuilder" class="org.openejb.deployment.OpenEjbModuleBuilder">
         <attribute name="listener">?name=WebContainer</attribute>
+        <attribute name="defaultStatelessEjbContainer">geronimo.server:J2EEApplication=null,J2EEModule=${pom.groupId}/openejb/${pom.currentVersion}/car,J2EEServer=geronimo,j2eeType=StatelessEjbContainer,name=StatelessEjbContainer</attribute>
+        <attribute name="defaultStatefulEjbContainer">geronimo.server:J2EEApplication=null,J2EEModule=${pom.groupId}/openejb/${pom.currentVersion}/car,J2EEServer=geronimo,j2eeType=StatefulEjbContainer,name=StatefulEjbContainer</attribute>
+        <attribute name="defaultBmpEjbContainer">geronimo.server:J2EEApplication=null,J2EEModule=${pom.groupId}/openejb/${pom.currentVersion}/car,J2EEServer=geronimo,j2eeType=BmpEjbContainer,name=BmpEjbContainer</attribute>
+        <attribute name="defaultCmpEjbContainer">geronimo.server:J2EEApplication=null,J2EEModule=${pom.groupId}/openejb/${pom.currentVersion}/car,J2EEServer=geronimo,j2eeType=CmpEjbContainer,name=CmpEjbContainer</attribute>
+        <attribute name="defaultMdbEjbContainer">geronimo.server:J2EEApplication=null,J2EEModule=${pom.groupId}/openejb/${pom.currentVersion}/car,J2EEServer=geronimo,j2eeType=MdbEjbContainer,name=MdbEjbContainer</attribute>
         <reference name="WebServiceLinkTemplate">
             <name>WebServiceEJBLinkTemplate</name>
         </reference>
@@ -57,8 +59,12 @@
     <gbean name="CSSAttributeBuilder" class="org.openejb.corba.security.config.css.CSSConfigEditor"/>
     <gbean name="TSSAttributeBuilder" class="org.openejb.corba.security.config.tss.TSSConfigEditor"/>
 
-    <gbean name="ClientEJBReferenceBuilder" class="org.openejb.deployment.RemoteEJBReferenceBuilder"/>
-    <gbean name="ServerEJBReferenceBuilder" class="org.openejb.deployment.OpenEJBReferenceBuilder"/>
+    <gbean name="ClientEJBReferenceBuilder" class="org.openejb.deployment.RemoteEjbReferenceBuilder">
+        <attribute name="host">${PlanServerHostname}</attribute>
+        <attribute name="port">${PlanOpenEJBPort}</attribute>
+    </gbean>
+
+    <gbean name="ServerEJBReferenceBuilder" class="org.openejb.deployment.OpenEjbReferenceBuilder"/>
     <gbean name="WebServiceEJBLinkTemplate" class="org.openejb.server.axis.WSContainerGBean"/>
 
 </module>

Modified: geronimo/branches/dain/openejb-2.2-merge/configs/openejb/src/plan/plan.xml
URL: http://svn.apache.org/viewvc/geronimo/branches/dain/openejb-2.2-merge/configs/openejb/src/plan/plan.xml?rev=415721&r1=415720&r2=415721&view=diff
==============================================================================
--- geronimo/branches/dain/openejb-2.2-merge/configs/openejb/src/plan/plan.xml (original)
+++ geronimo/branches/dain/openejb-2.2-merge/configs/openejb/src/plan/plan.xml Tue Jun 20
09:06:26 2006
@@ -29,19 +29,15 @@
 <module xmlns="http://geronimo.apache.org/xml/ns/deployment-1.1">
   <gbean name="StatelessEjbContainer" class="org.openejb.slsb.DefaultStatelessEjbContainerGBean">
     <reference name="TransactionContextManager">
-      <module>*</module>
       <name>TransactionContextManager</name>
     </reference>
     <reference name="TrackedConnectionAssociator">
-      <module>*</module>
       <name>ConnectionTracker</name>
     </reference>
     <reference name="TransactedTimer">
-      <module>*</module>
       <name>TransactionalThreadPooledTimer</name>
     </reference>
     <reference name="NontransactedTimer">
-      <module>*</module>
       <name>NonTransactionalThreadPooledTimer</name>
     </reference>
     <attribute name="securityEnabled">true</attribute>
@@ -51,11 +47,9 @@
 
   <gbean name="StatefulEjbContainer" class="org.openejb.sfsb.DefaultStatefulEjbContainerGBean">
     <reference name="TransactionContextManager">
-      <module>*</module>
       <name>TransactionContextManager</name>
     </reference>
     <reference name="TrackedConnectionAssociator">
-      <module>*</module>
       <name>ConnectionTracker</name>
     </reference>
     <attribute name="securityEnabled">true</attribute>
@@ -65,19 +59,15 @@
 
   <gbean name="BmpEjbContainer" class="org.openejb.entity.bmp.DefaultBmpEjbContainerGBean">
     <reference name="TransactionContextManager">
-      <module>*</module>
       <name>TransactionContextManager</name>
     </reference>
     <reference name="TrackedConnectionAssociator">
-      <module>*</module>
       <name>ConnectionTracker</name>
     </reference>
     <reference name="TransactedTimer">
-      <module>*</module>
       <name>TransactionalThreadPooledTimer</name>
     </reference>
     <reference name="NontransactedTimer">
-      <module>*</module>
       <name>NonTransactionalThreadPooledTimer</name>
     </reference>
     <attribute name="securityEnabled">true</attribute>
@@ -87,19 +77,15 @@
 
   <gbean name="CmpEjbContainer" class="org.openejb.entity.cmp.DefaultCmpEjbContainerGBean">
     <reference name="TransactionContextManager">
-      <module>*</module>
       <name>TransactionContextManager</name>
     </reference>
     <reference name="TrackedConnectionAssociator">
-      <module>*</module>
       <name>ConnectionTracker</name>
     </reference>
     <reference name="TransactedTimer">
-      <module>*</module>
       <name>TransactionalThreadPooledTimer</name>
     </reference>
     <reference name="NontransactedTimer">
-      <module>*</module>
       <name>NonTransactionalThreadPooledTimer</name>
     </reference>
     <attribute name="securityEnabled">true</attribute>
@@ -109,19 +95,15 @@
 
   <gbean name="MdbEjbContainer" class="org.openejb.mdb.DefaultMdbContainerGBean">
     <reference name="TransactionContextManager">
-      <module>*</module>
       <name>TransactionContextManager</name>
     </reference>
     <reference name="TrackedConnectionAssociator">
-      <module>*</module>
       <name>ConnectionTracker</name>
     </reference>
     <reference name="TransactedTimer">
-      <module>*</module>
       <name>TransactionalThreadPooledTimer</name>
     </reference>
     <reference name="NontransactedTimer">
-      <module>*</module>
       <name>NonTransactionalThreadPooledTimer</name>
     </reference>
     <attribute name="doAsCurrentCaller">true</attribute>

Modified: geronimo/branches/dain/openejb-2.2-merge/modules/client-builder/src/java/org/apache/geronimo/client/builder/AppClientModuleBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/branches/dain/openejb-2.2-merge/modules/client-builder/src/java/org/apache/geronimo/client/builder/AppClientModuleBuilder.java?rev=415721&r1=415720&r2=415721&view=diff
==============================================================================
--- geronimo/branches/dain/openejb-2.2-merge/modules/client-builder/src/java/org/apache/geronimo/client/builder/AppClientModuleBuilder.java
(original)
+++ geronimo/branches/dain/openejb-2.2-merge/modules/client-builder/src/java/org/apache/geronimo/client/builder/AppClientModuleBuilder.java
Tue Jun 20 09:06:26 2006
@@ -363,6 +363,7 @@
                     earContext.getConfigurationManager(),
                     null, //no server name needed on client
                     clientBaseName,
+                    null,
                     transactionContextManagerObjectName,
                     connectionTrackerObjectName,
                     null,

Modified: geronimo/branches/dain/openejb-2.2-merge/modules/connector-builder/src/test/org/apache/geronimo/connector/deployment/ConnectorModuleBuilderTest.java
URL: http://svn.apache.org/viewvc/geronimo/branches/dain/openejb-2.2-merge/modules/connector-builder/src/test/org/apache/geronimo/connector/deployment/ConnectorModuleBuilderTest.java?rev=415721&r1=415720&r2=415721&view=diff
==============================================================================
--- geronimo/branches/dain/openejb-2.2-merge/modules/connector-builder/src/test/org/apache/geronimo/connector/deployment/ConnectorModuleBuilderTest.java
(original)
+++ geronimo/branches/dain/openejb-2.2-merge/modules/connector-builder/src/test/org/apache/geronimo/connector/deployment/ConnectorModuleBuilderTest.java
Tue Jun 20 09:06:26 2006
@@ -72,13 +72,13 @@
 import org.apache.geronimo.kernel.config.NullConfigurationStore;
 import org.apache.geronimo.kernel.management.State;
 import org.apache.geronimo.kernel.repository.Artifact;
+import org.apache.geronimo.kernel.repository.ArtifactManager;
+import org.apache.geronimo.kernel.repository.ArtifactResolver;
 import org.apache.geronimo.kernel.repository.DefaultArtifactManager;
 import org.apache.geronimo.kernel.repository.DefaultArtifactResolver;
 import org.apache.geronimo.kernel.repository.Environment;
 import org.apache.geronimo.kernel.repository.ImportType;
 import org.apache.geronimo.kernel.repository.Repository;
-import org.apache.geronimo.kernel.repository.ArtifactManager;
-import org.apache.geronimo.kernel.repository.ArtifactResolver;
 import org.apache.geronimo.system.serverinfo.BasicServerInfo;
 import org.tranql.sql.jdbc.JDBCUtil;
 
@@ -162,13 +162,15 @@
         JarFile rarFile = null;
         try {
             rarFile = DeploymentUtil.createJarFile(new File(basedir, "target/test-ear-noger.ear"));
-            EARConfigBuilder configBuilder = new EARConfigBuilder(defaultEnvironment, transactionContextManagerName,
connectionTrackerName, null, null, null, new AbstractNameQuery(serverName, J2EEServerImpl.GBEAN_INFO.getInterfaces()),
null, null, ejbReferenceBuilder, null,
+
+            EARConfigBuilder configBuilder = new EARConfigBuilder(defaultEnvironment, null,
transactionContextManagerName, connectionTrackerName, null, null, null, new AbstractNameQuery(serverName,
J2EEServerImpl.GBEAN_INFO.getInterfaces()), null, null, ejbReferenceBuilder, null,
                     new ConnectorModuleBuilder(defaultEnvironment, defaultMaxSize, defaultMinSize,
defaultBlockingTimeoutMilliseconds, defaultidleTimeoutMinutes, defaultXATransactionCaching,
defaultXAThreadCaching),
                     resourceReferenceBuilder, null, serviceReferenceBuilder, kernel.getNaming());
             ConfigurationData configData = null;
             DeploymentContext context = null;
             ArtifactManager artifactManager = new DefaultArtifactManager();
             ArtifactResolver artifactResolver = new DefaultArtifactResolver(artifactManager,
Collections.EMPTY_SET, null);
+
             try {
                 File planFile = new File(basedir, "src/test-data/data/external-application-plan.xml");
                 ModuleIDBuilder idBuilder = new ModuleIDBuilder();
@@ -352,8 +354,6 @@
             File tempDir = null;
             try {
                 tempDir = DeploymentUtil.createTempDir();
-                ArtifactManager artifactManager = new DefaultArtifactManager();
-                ArtifactResolver artifactResolver = new DefaultArtifactResolver(artifactManager,
Collections.EMPTY_SET, null);
                 EARContext earContext = new EARContext(tempDir,
                         null,
                         module.getEnvironment(),
@@ -363,6 +363,7 @@
                         Collections.EMPTY_SET,
                         new AbstractNameQuery(serverName, J2EEServerImpl.GBEAN_INFO.getInterfaces()),
                         module.getModuleName(), //hardcode standalone here.
+                        null,
                         transactionContextManagerName,
                         connectionTrackerName,
                         null,

Modified: geronimo/branches/dain/openejb-2.2-merge/modules/deployment/src/java/org/apache/geronimo/deployment/DeploymentContext.java
URL: http://svn.apache.org/viewvc/geronimo/branches/dain/openejb-2.2-merge/modules/deployment/src/java/org/apache/geronimo/deployment/DeploymentContext.java?rev=415721&r1=415720&r2=415721&view=diff
==============================================================================
--- geronimo/branches/dain/openejb-2.2-merge/modules/deployment/src/java/org/apache/geronimo/deployment/DeploymentContext.java
(original)
+++ geronimo/branches/dain/openejb-2.2-merge/modules/deployment/src/java/org/apache/geronimo/deployment/DeploymentContext.java
Tue Jun 20 09:06:26 2006
@@ -57,7 +57,6 @@
 import org.apache.geronimo.kernel.config.ConfigurationModuleType;
 import org.apache.geronimo.kernel.config.NoSuchConfigException;
 import org.apache.geronimo.kernel.repository.Artifact;
-import org.apache.geronimo.kernel.repository.ArtifactResolver;
 import org.apache.geronimo.kernel.repository.Environment;
 
 /**
@@ -149,6 +148,11 @@
         if (gbean == null) throw new NullPointerException("gbean is null");
         if (gbean.getAbstractName() == null) throw new NullPointerException("gbean.getAbstractName()
is null");
         configuration.addGBean(gbean);
+    }
+
+    public void removeGBean(AbstractName name) throws GBeanNotFoundException {
+        if (name == null) throw new NullPointerException("name is null");
+        configuration.removeGBean(name);
     }
 
     public Set getGBeanNames() {

Modified: geronimo/branches/dain/openejb-2.2-merge/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/branches/dain/openejb-2.2-merge/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder.java?rev=415721&r1=415720&r2=415721&view=diff
==============================================================================
--- geronimo/branches/dain/openejb-2.2-merge/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder.java
(original)
+++ geronimo/branches/dain/openejb-2.2-merge/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder.java
Tue Jun 20 09:06:26 2006
@@ -61,25 +61,23 @@
 import org.apache.geronimo.gbean.SingleElementCollection;
 import org.apache.geronimo.j2ee.ApplicationInfo;
 import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
-import org.apache.geronimo.j2ee.j2eeobjectnames.J2eeContext;
-import org.apache.geronimo.j2ee.j2eeobjectnames.J2eeContextImpl;
 import org.apache.geronimo.j2ee.management.impl.J2EEApplicationImpl;
 import org.apache.geronimo.kernel.GBeanAlreadyExistsException;
 import org.apache.geronimo.kernel.Kernel;
 import org.apache.geronimo.kernel.Naming;
 import org.apache.geronimo.kernel.config.ConfigurationAlreadyExistsException;
 import org.apache.geronimo.kernel.config.ConfigurationData;
+import org.apache.geronimo.kernel.config.ConfigurationManager;
 import org.apache.geronimo.kernel.config.ConfigurationModuleType;
 import org.apache.geronimo.kernel.config.ConfigurationStore;
-import org.apache.geronimo.kernel.config.ConfigurationManager;
-import org.apache.geronimo.kernel.config.SimpleConfigurationManager;
 import org.apache.geronimo.kernel.config.ConfigurationUtil;
+import org.apache.geronimo.kernel.config.SimpleConfigurationManager;
 import org.apache.geronimo.kernel.repository.Artifact;
 import org.apache.geronimo.kernel.repository.ArtifactResolver;
 import org.apache.geronimo.kernel.repository.Environment;
 import org.apache.geronimo.kernel.repository.Repository;
-import org.apache.geronimo.management.J2EEServer;
 import org.apache.geronimo.management.J2EEResource;
+import org.apache.geronimo.management.J2EEServer;
 import org.apache.geronimo.schema.SchemaConversionUtils;
 import org.apache.geronimo.security.deployment.SecurityBuilder;
 import org.apache.geronimo.security.deployment.SecurityConfiguration;
@@ -114,6 +112,7 @@
 
     private final Environment defaultEnvironment;
     private final AbstractNameQuery serverName;
+    private final AbstractNameQuery transactionManagerObjectName;
     private final AbstractNameQuery transactionContextManagerObjectName;
     private final AbstractNameQuery connectionTrackerObjectName;
     private final AbstractNameQuery transactionalTimerObjectName;
@@ -121,8 +120,8 @@
     private final AbstractNameQuery corbaGBeanObjectName;
     private final Naming naming;
 
-
     public EARConfigBuilder(Environment defaultEnvironment,
+            AbstractNameQuery transactionManagerObjectName,
             AbstractNameQuery transactionContextManagerAbstractName,
             AbstractNameQuery connectionTrackerAbstractName,
             AbstractNameQuery transactionalTimerAbstractName,
@@ -139,6 +138,7 @@
             Collection serviceReferenceBuilder,
             Kernel kernel) {
         this(defaultEnvironment,
+                transactionManagerObjectName,
                 transactionContextManagerAbstractName,
                 connectionTrackerAbstractName,
                 transactionalTimerAbstractName,
@@ -157,6 +157,7 @@
                 kernel.getNaming());
     }
     public EARConfigBuilder(Environment defaultEnvironment,
+            AbstractNameQuery transactionManagerObjectName,
             AbstractNameQuery transactionContextManagerAbstractName,
             AbstractNameQuery connectionTrackerAbstractName,
             AbstractNameQuery transactionalTimerAbstractName,
@@ -173,6 +174,7 @@
             ServiceReferenceBuilder serviceReferenceBuilder,
             Naming naming) {
         this(defaultEnvironment,
+                transactionManagerObjectName,
                 transactionContextManagerAbstractName,
                 connectionTrackerAbstractName,
                 transactionalTimerAbstractName,
@@ -192,6 +194,7 @@
     }
 
     private EARConfigBuilder(Environment defaultEnvironment,
+            AbstractNameQuery transactionManagerObjectName,
             AbstractNameQuery transactionContextManagerAbstractName,
             AbstractNameQuery connectionTrackerAbstractName,
             AbstractNameQuery transactionalTimerAbstractName,
@@ -219,6 +222,7 @@
         this.connectorConfigBuilder = connectorConfigBuilder;
         this.appClientConfigBuilder = appClientConfigBuilder;
         this.serviceReferenceBuilder = serviceReferenceBuilder;
+        this.transactionManagerObjectName = transactionManagerObjectName;
         this.transactionContextManagerObjectName = transactionContextManagerAbstractName;
         this.connectionTrackerObjectName = connectionTrackerAbstractName;
         this.transactionalTimerObjectName = transactionalTimerAbstractName;
@@ -455,6 +459,7 @@
                     repositories,
                     serverName,
                     applicationInfo.getBaseName(),
+                    transactionManagerObjectName,
                     transactionContextManagerObjectName,
                     connectionTrackerObjectName,
                     transactionalTimerObjectName,
@@ -915,6 +920,7 @@
     static {
         GBeanInfoBuilder infoFactory = GBeanInfoBuilder.createStatic(EARConfigBuilder.class,
NameFactory.CONFIG_BUILDER);
         infoFactory.addAttribute("defaultEnvironment", Environment.class, true, true);
+        infoFactory.addAttribute("transactionManagerObjectName", AbstractNameQuery.class,
true);
         infoFactory.addAttribute("transactionContextManagerAbstractName", AbstractNameQuery.class,
true);
         infoFactory.addAttribute("connectionTrackerAbstractName", AbstractNameQuery.class,
true);
         infoFactory.addAttribute("transactionalTimerAbstractName", AbstractNameQuery.class,
true);
@@ -937,6 +943,7 @@
 
         infoFactory.setConstructor(new String[]{
                 "defaultEnvironment",
+                "transactionManagerObjectName",
                 "transactionContextManagerAbstractName",
                 "connectionTrackerAbstractName",
                 "transactionalTimerAbstractName",

Modified: geronimo/branches/dain/openejb-2.2-merge/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/EARContext.java
URL: http://svn.apache.org/viewvc/geronimo/branches/dain/openejb-2.2-merge/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/EARContext.java?rev=415721&r1=415720&r2=415721&view=diff
==============================================================================
--- geronimo/branches/dain/openejb-2.2-merge/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/EARContext.java
(original)
+++ geronimo/branches/dain/openejb-2.2-merge/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/EARContext.java
Tue Jun 20 09:06:26 2006
@@ -29,14 +29,13 @@
 import org.apache.geronimo.kernel.config.ConfigurationModuleType;
 import org.apache.geronimo.kernel.config.ConfigurationManager;
 import org.apache.geronimo.kernel.repository.Environment;
-import org.apache.geronimo.kernel.repository.ArtifactResolver;
 import org.apache.geronimo.security.deployment.SecurityConfiguration;
 
 /**
  * @version $Rev:386276 $ $Date$
  */
 public class EARContext extends DeploymentContext {
-
+    private final AbstractNameQuery transactionManagerObjectName;
     private final AbstractNameQuery transactionContextManagerObjectName;
     private final AbstractNameQuery connectionTrackerObjectName;
 
@@ -61,6 +60,7 @@
             ConfigurationManager configurationManager, Collection repositories,
             AbstractNameQuery serverName,
             AbstractName baseName,
+            AbstractNameQuery transactionManagerObjectName,
             AbstractNameQuery transactionContextManagerObjectName,
             AbstractNameQuery connectionTrackerObjectName,
             AbstractNameQuery transactedTimerName,
@@ -68,10 +68,10 @@
             AbstractNameQuery corbaGBeanObjectName,
             RefContext refContext) throws DeploymentException {
         super(baseDir, inPlaceConfigurationDir, environment, moduleType, naming, configurationManager,
repositories);
-        
+
         moduleName = baseName;
         this.serverName = serverName;
-
+        this.transactionManagerObjectName = transactionManagerObjectName;
         this.transactionContextManagerObjectName = transactionContextManagerObjectName;
         this.connectionTrackerObjectName = connectionTrackerObjectName;
         this.transactedTimerName = transactedTimerName;
@@ -88,6 +88,7 @@
             ConfigurationManager configurationManager,
             AbstractNameQuery serverName,
             AbstractName baseName,
+            AbstractNameQuery transactionManagerObjectName,
             AbstractNameQuery transactionContextManagerObjectName,
             AbstractNameQuery connectionTrackerObjectName,
             AbstractNameQuery transactedTimerName,
@@ -99,6 +100,7 @@
         moduleName = baseName;
         this.serverName = serverName;
 
+        this.transactionManagerObjectName = transactionManagerObjectName;
         this.transactionContextManagerObjectName = transactionContextManagerObjectName;
         this.connectionTrackerObjectName = connectionTrackerObjectName;
         this.transactedTimerName = transactedTimerName;
@@ -112,6 +114,7 @@
         moduleName = baseName;
         this.serverName = parent.getServerName();
 
+        this.transactionManagerObjectName = parent.getTransactionManagerObjectName();
         this.transactionContextManagerObjectName = parent.getTransactionContextManagerObjectName();
         this.connectionTrackerObjectName = parent.getConnectionTrackerObjectName();
         this.transactedTimerName = parent.getTransactedTimerName();
@@ -122,6 +125,10 @@
 
     public AbstractNameQuery getServerName() {
         return serverName;
+    }
+
+    public AbstractNameQuery getTransactionManagerObjectName() {
+        return transactionManagerObjectName;
     }
 
     public AbstractNameQuery getTransactionContextManagerObjectName() {

Modified: geronimo/branches/dain/openejb-2.2-merge/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/EJBModule.java
URL: http://svn.apache.org/viewvc/geronimo/branches/dain/openejb-2.2-merge/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/EJBModule.java?rev=415721&r1=415720&r2=415721&view=diff
==============================================================================
--- geronimo/branches/dain/openejb-2.2-merge/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/EJBModule.java
(original)
+++ geronimo/branches/dain/openejb-2.2-merge/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/EJBModule.java
Tue Jun 20 09:06:26 2006
@@ -28,9 +28,11 @@
 import org.apache.xmlbeans.XmlObject;
 
 /**
- * @version $Rev: 385487 $ $Date$
+ * @version $Rev$ $Date$
  */
 public class EJBModule extends Module {
+    private AbstractName moduleCmpEngineName;
+
     public EJBModule(boolean standAlone, AbstractName moduleName, Environment environment,
JarFile moduleFile, String targetPath, XmlObject specDD, XmlObject vendorDD, String originalSpecDD)
{
         super(standAlone, moduleName, environment, moduleFile, targetPath, specDD, vendorDD,
originalSpecDD, null);
     }
@@ -41,6 +43,14 @@
 
     public void addClass(URI location, String fqcn, byte[] bytes, DeploymentContext context)
throws IOException, URISyntaxException {
         context.addClass(location, fqcn, bytes);
+    }
+
+    public AbstractName getModuleCmpEngineName() {
+        return moduleCmpEngineName;
+    }
+
+    public void setModuleCmpEngineName(AbstractName moduleCmpEngineName) {
+        this.moduleCmpEngineName = moduleCmpEngineName;
     }
 }
 

Modified: geronimo/branches/dain/openejb-2.2-merge/modules/j2ee-builder/src/test/org/apache/geronimo/j2ee/deployment/EARConfigBuilderTest.java
URL: http://svn.apache.org/viewvc/geronimo/branches/dain/openejb-2.2-merge/modules/j2ee-builder/src/test/org/apache/geronimo/j2ee/deployment/EARConfigBuilderTest.java?rev=415721&r1=415720&r2=415721&view=diff
==============================================================================
--- geronimo/branches/dain/openejb-2.2-merge/modules/j2ee-builder/src/test/org/apache/geronimo/j2ee/deployment/EARConfigBuilderTest.java
(original)
+++ geronimo/branches/dain/openejb-2.2-merge/modules/j2ee-builder/src/test/org/apache/geronimo/j2ee/deployment/EARConfigBuilderTest.java
Tue Jun 20 09:06:26 2006
@@ -99,6 +99,7 @@
     private Environment defaultParentId;
     private static String contextRoot = "test";
     private static final Map portMap = null;
+    private final AbstractNameQuery transactionManagerAbstractNameQuery = new AbstractNameQuery(transactionManagerObjectName,
null);
     private final AbstractNameQuery transactionContextManagerAbstractNameQuery = new AbstractNameQuery(transactionManagerObjectName,
null);
     private final AbstractNameQuery connectionTrackerAbstractNameQuery = new AbstractNameQuery(connectionTrackerObjectName,
null);
     private final AbstractNameQuery transactionalTimerAbstractNameQuery = new AbstractNameQuery(transactionalTimerObjectName,
null);
@@ -259,6 +260,7 @@
         DeploymentContext context = null;
         try {
             EARConfigBuilder configBuilder = new EARConfigBuilder(defaultParentId,
+                    transactionManagerAbstractNameQuery,
                     transactionContextManagerAbstractNameQuery,
                     connectionTrackerAbstractNameQuery,
                     transactionalTimerAbstractNameQuery,
@@ -290,6 +292,7 @@
 
     public void testBadEJBJARConfiguration() throws Exception {
         EARConfigBuilder configBuilder = new EARConfigBuilder(defaultParentId,
+                transactionManagerAbstractNameQuery,
                 transactionContextManagerAbstractNameQuery,
                 connectionTrackerAbstractNameQuery,
                 transactionalTimerAbstractNameQuery,
@@ -329,6 +332,7 @@
 
     public void testBadWARConfiguration() throws Exception {
         EARConfigBuilder configBuilder = new EARConfigBuilder(defaultParentId,
+                transactionManagerAbstractNameQuery,
                 transactionContextManagerAbstractNameQuery,
                 connectionTrackerAbstractNameQuery,
                 transactionalTimerAbstractNameQuery,
@@ -368,6 +372,7 @@
 
     public void testBadRARConfiguration() throws Exception {
         EARConfigBuilder configBuilder = new EARConfigBuilder(defaultParentId,
+                transactionManagerAbstractNameQuery,
                 transactionContextManagerAbstractNameQuery,
                 connectionTrackerAbstractNameQuery,
                 transactionalTimerAbstractNameQuery,
@@ -407,6 +412,7 @@
 
     public void testBadCARConfiguration() throws Exception {
         EARConfigBuilder configBuilder = new EARConfigBuilder(defaultParentId,
+                transactionManagerAbstractNameQuery,
                 transactionContextManagerAbstractNameQuery,
                 connectionTrackerAbstractNameQuery,
                 transactionalTimerAbstractNameQuery,
@@ -446,6 +452,7 @@
 
     public void testNoEJBDeployer() throws Exception {
         EARConfigBuilder configBuilder = new EARConfigBuilder(defaultParentId,
+                transactionManagerAbstractNameQuery,
                 transactionContextManagerAbstractNameQuery,
                 connectionTrackerAbstractNameQuery,
                 transactionalTimerAbstractNameQuery,
@@ -484,6 +491,7 @@
 
     public void testNoWARDeployer() throws Exception {
         EARConfigBuilder configBuilder = new EARConfigBuilder(defaultParentId,
+                transactionManagerAbstractNameQuery,
                 transactionContextManagerAbstractNameQuery,
                 connectionTrackerAbstractNameQuery,
                 transactionalTimerAbstractNameQuery,
@@ -521,6 +529,7 @@
 
     public void testNoConnectorDeployer() throws Exception {
         EARConfigBuilder configBuilder = new EARConfigBuilder(defaultParentId,
+                transactionManagerAbstractNameQuery,
                 transactionContextManagerAbstractNameQuery,
                 connectionTrackerAbstractNameQuery,
                 transactionalTimerAbstractNameQuery,

Modified: geronimo/branches/dain/openejb-2.2-merge/modules/jetty-builder/src/test/org/apache/geronimo/jetty/deployment/JettyModuleBuilderTest.java
URL: http://svn.apache.org/viewvc/geronimo/branches/dain/openejb-2.2-merge/modules/jetty-builder/src/test/org/apache/geronimo/jetty/deployment/JettyModuleBuilderTest.java?rev=415721&r1=415720&r2=415721&view=diff
==============================================================================
--- geronimo/branches/dain/openejb-2.2-merge/modules/jetty-builder/src/test/org/apache/geronimo/jetty/deployment/JettyModuleBuilderTest.java
(original)
+++ geronimo/branches/dain/openejb-2.2-merge/modules/jetty-builder/src/test/org/apache/geronimo/jetty/deployment/JettyModuleBuilderTest.java
Tue Jun 20 09:06:26 2006
@@ -186,6 +186,7 @@
                 repositories,
                 new AbstractNameQuery(serverName),
                 moduleName,
+                null,
                 new AbstractNameQuery(tcmName),
                 new AbstractNameQuery(ctcName),
                 null,

Modified: geronimo/branches/dain/openejb-2.2-merge/modules/naming/src/java/org/apache/geronimo/naming/enc/EnterpriseNamingContext.java
URL: http://svn.apache.org/viewvc/geronimo/branches/dain/openejb-2.2-merge/modules/naming/src/java/org/apache/geronimo/naming/enc/EnterpriseNamingContext.java?rev=415721&r1=415720&r2=415721&view=diff
==============================================================================
--- geronimo/branches/dain/openejb-2.2-merge/modules/naming/src/java/org/apache/geronimo/naming/enc/EnterpriseNamingContext.java
(original)
+++ geronimo/branches/dain/openejb-2.2-merge/modules/naming/src/java/org/apache/geronimo/naming/enc/EnterpriseNamingContext.java
Tue Jun 20 09:06:26 2006
@@ -17,16 +17,21 @@
 
 package org.apache.geronimo.naming.enc;
 
-import javax.naming.Context;
-import javax.naming.LinkRef;
-import javax.naming.Name;
-import javax.naming.NamingException;
-import javax.naming.Reference;
 import java.util.Collections;
 import java.util.Enumeration;
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.Map;
+import javax.naming.Context;
+import javax.naming.LinkRef;
+import javax.naming.Name;
+import javax.naming.NamingException;
+import javax.naming.Reference;
+import javax.transaction.UserTransaction;
+
+import org.apache.geronimo.kernel.Kernel;
+import org.apache.geronimo.naming.reference.ClassLoaderAwareReference;
+import org.apache.geronimo.naming.reference.KernelAwareReference;
 
 /**
  * @version $Rev$ $Date$
@@ -35,6 +40,30 @@
     private final Map localBindings;
 
     private final Map globalBindings;
+
+    public static Context createEnterpriseNamingContext(Map componentContext, UserTransaction
userTransaction, Kernel kernel, ClassLoader classLoader) throws NamingException {
+        Map map = new HashMap();
+        if (componentContext != null) {
+            map.putAll(componentContext);
+        }
+
+        for (Iterator iterator = map.values().iterator(); iterator.hasNext();) {
+            Object value = iterator.next();
+            if (value instanceof KernelAwareReference) {
+                ((KernelAwareReference) value).setKernel(kernel);
+            }
+            if (value instanceof ClassLoaderAwareReference) {
+                ((ClassLoaderAwareReference) value).setClassLoader(classLoader);
+            }
+        }
+
+        if (userTransaction != null) {
+            map.put("UserTransaction", userTransaction);
+        }
+
+        Context enc = EnterpriseNamingContext.createEnterpriseNamingContext(map);
+        return enc;
+    }
 
     public static Context createEnterpriseNamingContext(Map context) throws NamingException
{
         return new EnterpriseNamingContext(context);

Modified: geronimo/branches/dain/openejb-2.2-merge/modules/tomcat-builder/src/test/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilderTest.java
URL: http://svn.apache.org/viewvc/geronimo/branches/dain/openejb-2.2-merge/modules/tomcat-builder/src/test/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilderTest.java?rev=415721&r1=415720&r2=415721&view=diff
==============================================================================
--- geronimo/branches/dain/openejb-2.2-merge/modules/tomcat-builder/src/test/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilderTest.java
(original)
+++ geronimo/branches/dain/openejb-2.2-merge/modules/tomcat-builder/src/test/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilderTest.java
Tue Jun 20 09:06:26 2006
@@ -198,6 +198,7 @@
                 repositories,
                 new AbstractNameQuery(serverName),
                 moduleName,
+                null,
                 new AbstractNameQuery(tcmName),
                 new AbstractNameQuery(ctcName),
                 null,

Modified: geronimo/branches/dain/openejb-2.2-merge/modules/transaction/src/java/org/apache/geronimo/transaction/context/TransactionContextManager.java
URL: http://svn.apache.org/viewvc/geronimo/branches/dain/openejb-2.2-merge/modules/transaction/src/java/org/apache/geronimo/transaction/context/TransactionContextManager.java?rev=415721&r1=415720&r2=415721&view=diff
==============================================================================
--- geronimo/branches/dain/openejb-2.2-merge/modules/transaction/src/java/org/apache/geronimo/transaction/context/TransactionContextManager.java
(original)
+++ geronimo/branches/dain/openejb-2.2-merge/modules/transaction/src/java/org/apache/geronimo/transaction/context/TransactionContextManager.java
Tue Jun 20 09:06:26 2006
@@ -17,6 +17,20 @@
 
 package org.apache.geronimo.transaction.context;
 
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+import javax.resource.spi.XATerminator;
+import javax.transaction.InvalidTransactionException;
+import javax.transaction.NotSupportedException;
+import javax.transaction.Status;
+import javax.transaction.SystemException;
+import javax.transaction.Transaction;
+import javax.transaction.TransactionManager;
+import javax.transaction.xa.XAException;
+import javax.transaction.xa.XAResource;
+import javax.transaction.xa.Xid;
+
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.geronimo.transaction.ExtendedTransactionManager;
@@ -24,15 +38,6 @@
 import org.apache.geronimo.transaction.XAWork;
 import org.apache.geronimo.transaction.manager.XidImporter;
 
-import javax.resource.spi.XATerminator;
-import javax.transaction.*;
-import javax.transaction.xa.XAException;
-import javax.transaction.xa.XAResource;
-import javax.transaction.xa.Xid;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-
 /**
  * @version $Rev$ $Date$
  */
@@ -82,7 +87,7 @@
 
     public TransactionContext newBeanTransactionContext(long transactionTimeoutMilliseconds)
throws NotSupportedException, SystemException {
         TransactionContext ctx = getContext();
-        if (ctx instanceof UnspecifiedTransactionContext == false) {
+        if (!(ctx instanceof UnspecifiedTransactionContext)) {
             throw new NotSupportedException("Previous Transaction has not been committed");
         }
         UnspecifiedTransactionContext oldContext = (UnspecifiedTransactionContext) ctx;

Modified: geronimo/branches/dain/openejb-2.2-merge/modules/transaction/src/java/org/apache/geronimo/transaction/context/UserTransactionImpl.java
URL: http://svn.apache.org/viewvc/geronimo/branches/dain/openejb-2.2-merge/modules/transaction/src/java/org/apache/geronimo/transaction/context/UserTransactionImpl.java?rev=415721&r1=415720&r2=415721&view=diff
==============================================================================
--- geronimo/branches/dain/openejb-2.2-merge/modules/transaction/src/java/org/apache/geronimo/transaction/context/UserTransactionImpl.java
(original)
+++ geronimo/branches/dain/openejb-2.2-merge/modules/transaction/src/java/org/apache/geronimo/transaction/context/UserTransactionImpl.java
Tue Jun 20 09:06:26 2006
@@ -40,10 +40,15 @@
         protected Object initialValue() {
             return OFFLINE;
         }
-    };
+    }
 
     public UserTransactionImpl() {
         state.set(OFFLINE);
+    }
+
+    public UserTransactionImpl(TransactionContextManager transactionContextManager, TrackedConnectionAssociator
trackedConnectionAssociator) {
+        state.set(OFFLINE);
+        ONLINE.setUp(transactionContextManager, trackedConnectionAssociator);
     }
 
     public void setUp(TransactionContextManager transactionContextManager, TrackedConnectionAssociator
trackedConnectionAssociator) {



Mime
View raw message