geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject svn commit: r374054 - in /geronimo/trunk: configs/openejb-deployer/src/plan/ configs/openejb/src/plan/ etc/ modules/client-builder/src/java/org/apache/geronimo/client/builder/ modules/connector-builder/src/test/org/apache/geronimo/connector/deployment/...
Date Wed, 01 Feb 2006 11:51:05 GMT
Author: dain
Date: Wed Feb  1 03:50:54 2006
New Revision: 374054

URL: http://svn.apache.org/viewcvs?rev=374054&view=rev
Log:
Updated to reflect openejb refactor

Modified:
    geronimo/trunk/configs/openejb-deployer/src/plan/plan.xml
    geronimo/trunk/configs/openejb/src/plan/plan.xml
    geronimo/trunk/etc/project.properties
    geronimo/trunk/modules/client-builder/src/java/org/apache/geronimo/client/builder/AppClientModuleBuilder.java
    geronimo/trunk/modules/connector-builder/src/test/org/apache/geronimo/connector/deployment/ConnectorModuleBuilderTest.java
    geronimo/trunk/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder.java
    geronimo/trunk/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/EARContext.java
    geronimo/trunk/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/EJBModule.java
    geronimo/trunk/modules/j2ee-builder/src/test/org/apache/geronimo/j2ee/deployment/EARConfigBuilderTest.java
    geronimo/trunk/modules/naming/src/java/org/apache/geronimo/naming/enc/EnterpriseNamingContext.java
    geronimo/trunk/modules/transaction/src/java/org/apache/geronimo/transaction/context/TransactionContextManager.java
    geronimo/trunk/modules/transaction/src/java/org/apache/geronimo/transaction/context/UserTransactionImpl.java

Modified: geronimo/trunk/configs/openejb-deployer/src/plan/plan.xml
URL: http://svn.apache.org/viewcvs/geronimo/trunk/configs/openejb-deployer/src/plan/plan.xml?rev=374054&r1=374053&r2=374054&view=diff
==============================================================================
--- geronimo/trunk/configs/openejb-deployer/src/plan/plan.xml (original)
+++ geronimo/trunk/configs/openejb-deployer/src/plan/plan.xml Wed Feb  1 03:50:54 2006
@@ -17,13 +17,17 @@
 -->
 
 <configuration xmlns="http://geronimo.apache.org/xml/ns/deployment-1.0"
-               configId="${pom.groupId}/${pom.artifactId}/${pom.currentVersion}/car"
-        >
+    configId="${pom.groupId}/${pom.artifactId}/${pom.currentVersion}/car">
 
 
-    <gbean name="EJBBuilder" class="org.openejb.deployment.OpenEJBModuleBuilder">
+    <gbean name="EJBBuilder" class="org.openejb.deployment.OpenEjbModuleBuilder">
         <attribute name="defaultParentId">${pom.groupId}/openejb/${pom.currentVersion}/car,${pom.groupId}/axis/${pom.currentVersion}/car</attribute>
         <attribute name="listener">geronimo.server:J2EEApplication=null,J2EEModule=${pom.groupId}/j2ee-server/${pom.currentVersion}/car,J2EEServer=geronimo,j2eeType=GBean,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>
@@ -46,11 +50,11 @@
     <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="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="ServerEJBReferenceBuilder" class="org.openejb.deployment.OpenEjbReferenceBuilder"/>
     <gbean name="WebServiceEJBLinkTemplate" class="org.openejb.server.axis.WSContainerGBean"/>
 
 </configuration>

Modified: geronimo/trunk/configs/openejb/src/plan/plan.xml
URL: http://svn.apache.org/viewcvs/geronimo/trunk/configs/openejb/src/plan/plan.xml?rev=374054&r1=374053&r2=374054&view=diff
==============================================================================
--- geronimo/trunk/configs/openejb/src/plan/plan.xml (original)
+++ geronimo/trunk/configs/openejb/src/plan/plan.xml Wed Feb  1 03:50:54 2006
@@ -26,12 +26,55 @@
                parentId="${pom.groupId}/rmi-naming/${pom.currentVersion}/car"
 
 -->
-<configuration
-    xmlns="http://geronimo.apache.org/xml/ns/deployment-1.0"
-               configId="${pom.groupId}/${pom.artifactId}/${pom.currentVersion}/car"
-    >
+<configuration xmlns="http://geronimo.apache.org/xml/ns/deployment-1.0"
+    configId="${pom.groupId}/${pom.artifactId}/${pom.currentVersion}/car">
+
+    <gbean name="StatelessEjbContainer" class="org.openejb.slsb.DefaultStatelessEjbContainer">
+        <reference name="TransactionContextManager"><name>TransactionContextManager</name></reference>
+        <reference name="TrackedConnectionAssociator"><name>ConnectionTracker</name></reference>
+        <reference name="TransactedTimer"><gbean-name>geronimo.server:name=TransactionalThreadPooledTimer,*</gbean-name></reference>
+        <reference name="NontransactedTimer"><gbean-name>geronimo.server:name=NonTransactionalThreadPooledTimer,*</gbean-name></reference>
+        <attribute name="securityEnabled">true</attribute>
+        <attribute name="doAsCurrentCaller">true</attribute>
+        <attribute name="useContextHandler">true</attribute>
+    </gbean>
+
+    <gbean name="StatefulEjbContainer" class="org.openejb.sfsb.DefaultStatefulEjbContainer">
+        <reference name="TransactionContextManager"><name>TransactionContextManager</name></reference>
+        <reference name="TrackedConnectionAssociator"><name>ConnectionTracker</name></reference>
+        <attribute name="securityEnabled">true</attribute>
+        <attribute name="doAsCurrentCaller">true</attribute>
+        <attribute name="useContextHandler">true</attribute>
+    </gbean>
+
+    <gbean name="BmpEjbContainer" class="org.openejb.entity.bmp.DefaultBmpEjbContainer">
+        <reference name="TransactionContextManager"><name>TransactionContextManager</name></reference>
+        <reference name="TrackedConnectionAssociator"><name>ConnectionTracker</name></reference>
+        <reference name="TransactedTimer"><gbean-name>geronimo.server:name=TransactionalThreadPooledTimer,*</gbean-name></reference>
+        <reference name="NontransactedTimer"><gbean-name>geronimo.server:name=NonTransactionalThreadPooledTimer,*</gbean-name></reference>
+        <attribute name="securityEnabled">true</attribute>
+        <attribute name="doAsCurrentCaller">true</attribute>
+        <attribute name="useContextHandler">true</attribute>
+    </gbean>
+
+    <gbean name="CmpEjbContainer" class="org.openejb.entity.cmp.DefaultCmpEjbContainer">
+        <reference name="TransactionContextManager"><name>TransactionContextManager</name></reference>
+        <reference name="TrackedConnectionAssociator"><name>ConnectionTracker</name></reference>
+        <reference name="TransactedTimer"><gbean-name>geronimo.server:name=TransactionalThreadPooledTimer,*</gbean-name></reference>
+        <reference name="NontransactedTimer"><gbean-name>geronimo.server:name=NonTransactionalThreadPooledTimer,*</gbean-name></reference>
+        <attribute name="securityEnabled">true</attribute>
+        <attribute name="doAsCurrentCaller">true</attribute>
+        <attribute name="useContextHandler">true</attribute>
+    </gbean>
+
+    <gbean name="MdbEjbContainer" class="org.openejb.mdb.DefaultMdbContainer">
+        <reference name="TransactionContextManager"><name>TransactionContextManager</name></reference>
+        <reference name="TrackedConnectionAssociator"><name>ConnectionTracker</name></reference>
+        <reference name="TransactedTimer"><gbean-name>geronimo.server:name=TransactionalThreadPooledTimer,*</gbean-name></reference>
+        <reference name="NontransactedTimer"><gbean-name>geronimo.server:name=NonTransactionalThreadPooledTimer,*</gbean-name></reference>
+        <attribute name="doAsCurrentCaller">true</attribute>
+    </gbean>
 
-    <!-- EJB Protocol -->
     <gbean gbeanName="geronimo:type=NetworkService,name=EJB" class="org.activeio.xnet.StandardServiceStackGBean">
         <attribute name="name">EJB</attribute>
         <attribute name="port">${PlanOpenEJBPort}</attribute>
@@ -47,8 +90,8 @@
     </gbean>
 
     <gbean gbeanName="openejb:type=Server,name=EJB" class="org.openejb.server.ejbd.EjbServerGBean">
-        <reference name="ContainerIndex">
-            <gbean-name>openejb:type=ContainerIndex</gbean-name>
+        <reference name="DeploymentIndex">
+            <gbean-name>openejb:type=DeploymentIndex</gbean-name>
         </reference>
         <reference name="ORBRefs">
             <module>*</module>
@@ -57,8 +100,8 @@
     </gbean>
 
     <!-- pattern domain name must match the domain of the j2eeServer attribute of the
EAR builder in the deployer plan -->
-    <gbean gbeanName="openejb:type=ContainerIndex" class="org.openejb.ContainerIndex">
-        <references name="EJBContainers">
+    <gbean gbeanName="openejb:type=DeploymentIndex" class="org.openejb.DeploymentIndex">
+        <references name="EjbDeployments">
             <pattern><gbean-name>geronimo.server:j2eeType=StatelessSessionBean,*</gbean-name></pattern>
             <pattern><gbean-name>geronimo.server:j2eeType=StatefulSessionBean,*</gbean-name></pattern>
             <pattern><gbean-name>geronimo.server:j2eeType=EntityBean,*</gbean-name></pattern>

Modified: geronimo/trunk/etc/project.properties
URL: http://svn.apache.org/viewcvs/geronimo/trunk/etc/project.properties?rev=374054&r1=374053&r2=374054&view=diff
==============================================================================
--- geronimo/trunk/etc/project.properties (original)
+++ geronimo/trunk/etc/project.properties Wed Feb  1 03:50:54 2006
@@ -167,7 +167,7 @@
 regexp_version=1.3
 scout_version=0.5
 slf4j_version=1.0-beta7
-spring_version=1.1.3
+spring_version=1.2.4
 standard_taglibs_version=1.1.1
 stax_version=1.1.1-dev
 stax_api_version=1.0

Modified: geronimo/trunk/modules/client-builder/src/java/org/apache/geronimo/client/builder/AppClientModuleBuilder.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/client-builder/src/java/org/apache/geronimo/client/builder/AppClientModuleBuilder.java?rev=374054&r1=374053&r2=374054&view=diff
==============================================================================
--- geronimo/trunk/modules/client-builder/src/java/org/apache/geronimo/client/builder/AppClientModuleBuilder.java
(original)
+++ geronimo/trunk/modules/client-builder/src/java/org/apache/geronimo/client/builder/AppClientModuleBuilder.java
Wed Feb  1 03:50:54 2006
@@ -24,13 +24,13 @@
 import java.net.URL;
 import java.net.URLDecoder;
 import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.Collection;
 import java.util.Collections;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 import java.util.StringTokenizer;
-import java.util.Arrays;
 import java.util.jar.Attributes;
 import java.util.jar.JarFile;
 import java.util.jar.Manifest;
@@ -38,18 +38,16 @@
 import javax.management.MalformedObjectNameException;
 import javax.management.ObjectName;
 
-
 import org.apache.geronimo.client.AppClientContainer;
 import org.apache.geronimo.client.StaticJndiContextPlugin;
 import org.apache.geronimo.common.DeploymentException;
 import org.apache.geronimo.deployment.DeploymentContext;
-import org.apache.geronimo.deployment.xmlbeans.XmlBeansUtil;
 import org.apache.geronimo.deployment.service.ServiceConfigBuilder;
 import org.apache.geronimo.deployment.util.DeploymentUtil;
 import org.apache.geronimo.deployment.util.NestedJarFile;
-import org.apache.geronimo.deployment.xmlbeans.XmlBeansUtil;
 import org.apache.geronimo.deployment.xbeans.DependencyType;
 import org.apache.geronimo.deployment.xbeans.GbeanType;
+import org.apache.geronimo.deployment.xmlbeans.XmlBeansUtil;
 import org.apache.geronimo.gbean.GBeanData;
 import org.apache.geronimo.gbean.GBeanInfo;
 import org.apache.geronimo.gbean.GBeanInfoBuilder;
@@ -84,7 +82,6 @@
 import org.apache.geronimo.xbeans.j2ee.MessageDestinationType;
 import org.apache.xmlbeans.XmlException;
 import org.apache.xmlbeans.XmlObject;
-import org.apache.xmlbeans.XmlCursor;
 
 
 /**
@@ -119,7 +116,7 @@
                                   ServiceReferenceBuilder serviceReferenceBuilder,
                                   ConfigurationStore store,
                                   Repository repository,
-                                  Kernel kernel) throws DeploymentException {
+                                  Kernel kernel) {
         this.defaultClientParentId = defaultClientParentId == null? Collections.EMPTY_LIST:
Arrays.asList(defaultClientParentId);
         this.defaultServerParentId = defaultServerParentId == null? Collections.EMPTY_LIST:
Arrays.asList(defaultServerParentId);
         this.corbaGBeanObjectName = corbaGBeanObjectName;
@@ -351,6 +348,7 @@
                             clientParentId,
                             kernel,
                             clientApplicationName,
+                            null,
                             transactionContextManagerObjectName,
                             connectionTrackerObjectName,
                             null,

Modified: geronimo/trunk/modules/connector-builder/src/test/org/apache/geronimo/connector/deployment/ConnectorModuleBuilderTest.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/connector-builder/src/test/org/apache/geronimo/connector/deployment/ConnectorModuleBuilderTest.java?rev=374054&r1=374053&r2=374054&view=diff
==============================================================================
--- geronimo/trunk/modules/connector-builder/src/test/org/apache/geronimo/connector/deployment/ConnectorModuleBuilderTest.java
(original)
+++ geronimo/trunk/modules/connector-builder/src/test/org/apache/geronimo/connector/deployment/ConnectorModuleBuilderTest.java
Wed Feb  1 03:50:54 2006
@@ -179,7 +179,7 @@
             kernel.startGBean(configurationManagerName);
 
             rarFile = DeploymentUtil.createJarFile(new File(basedir, "target/test-ear-noger.ear"));
-            EARConfigBuilder configBuilder = new EARConfigBuilder(defaultParentId, null,
connectionTrackerName, null, null, null, null, null, ejbReferenceBuilder, null, new ConnectorModuleBuilder(defaultParentId,
defaultMaxSize, defaultMinSize, defaultBlockingTimeoutMilliseconds, defaultidleTimeoutMinutes,
defaultXATransactionCaching, defaultXAThreadCaching, repository, kernel), resourceReferenceBuilder,
null, serviceReferenceBuilder, kernel);
+            EARConfigBuilder configBuilder = new EARConfigBuilder(defaultParentId, null,
null, connectionTrackerName, null, null, null, null, null, ejbReferenceBuilder, null, new
ConnectorModuleBuilder(defaultParentId, defaultMaxSize, defaultMinSize, defaultBlockingTimeoutMilliseconds,
defaultidleTimeoutMinutes, defaultXATransactionCaching, defaultXAThreadCaching, repository,
kernel), resourceReferenceBuilder, null, serviceReferenceBuilder, kernel);
             File tempDir = null;
             try {
                 tempDir = DeploymentUtil.createTempDir();
@@ -349,6 +349,7 @@
                         connectionTrackerName,
                         null,
                         null,
+                        null,
                         null, new RefContext(ejbReferenceBuilder,
                                 moduleBuilder,
                                 serviceReferenceBuilder, kernel));
@@ -553,8 +554,9 @@
     }
 
     protected void setUp() throws Exception {
+        super.setUp();
         configurationManagerName = new ObjectName(":j2eeType=ConfigurationManager,name=Basic");
-        defaultParentId = new URI[] {new URI("org/apache/geronimo/Server")};
+        defaultParentId = new URI[]{new URI("org/apache/geronimo/Server")};
     }
 
     private abstract class InstallAction {

Modified: geronimo/trunk/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder.java?rev=374054&r1=374053&r2=374054&view=diff
==============================================================================
--- geronimo/trunk/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder.java
(original)
+++ geronimo/trunk/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder.java
Wed Feb  1 03:50:54 2006
@@ -72,7 +72,7 @@
 import org.apache.xmlbeans.XmlObject;
 
 /**
- * @version $Rev$ $Date$
+ * @version $Rev: 6509 $ $Date$
  */
 public class EARConfigBuilder implements ConfigurationBuilder {
 
@@ -89,6 +89,7 @@
     private final ServiceReferenceBuilder serviceReferenceBuilder;
 
     private final List defaultParentId;
+    private final ObjectName transactionManagerObjectName;
     private final ObjectName transactionContextManagerObjectName;
     private final ObjectName connectionTrackerObjectName;
     private final ObjectName transactionalTimerObjectName;
@@ -96,7 +97,7 @@
     private final ObjectName corbaGBeanObjectName;
 
 
-    public EARConfigBuilder(URI[] defaultParentId, ObjectName transactionContextManagerObjectName,
ObjectName connectionTrackerObjectName, ObjectName transactionalTimerObjectName, ObjectName
nonTransactionalTimerObjectName, ObjectName corbaGBeanObjectName, Repository repository, ModuleBuilder
ejbConfigBuilder, EJBReferenceBuilder ejbReferenceBuilder, ModuleBuilder webConfigBuilder,
ModuleBuilder connectorConfigBuilder, ResourceReferenceBuilder resourceReferenceBuilder, ModuleBuilder
appClientConfigBuilder, ServiceReferenceBuilder serviceReferenceBuilder, Kernel kernel) {
+    public EARConfigBuilder(URI[] defaultParentId, ObjectName transactionManagerObjectName,
ObjectName transactionContextManagerObjectName, ObjectName connectionTrackerObjectName, ObjectName
transactionalTimerObjectName, ObjectName nonTransactionalTimerObjectName, ObjectName corbaGBeanObjectName,
Repository repository, ModuleBuilder ejbConfigBuilder, EJBReferenceBuilder ejbReferenceBuilder,
ModuleBuilder webConfigBuilder, ModuleBuilder connectorConfigBuilder, ResourceReferenceBuilder
resourceReferenceBuilder, ModuleBuilder appClientConfigBuilder, ServiceReferenceBuilder serviceReferenceBuilder,
Kernel kernel) {
         this.kernel = kernel;
         this.repository = repository;
         this.defaultParentId = defaultParentId == null ? Collections.EMPTY_LIST : Arrays.asList(defaultParentId);
@@ -108,6 +109,7 @@
         this.connectorConfigBuilder = connectorConfigBuilder;
         this.appClientConfigBuilder = appClientConfigBuilder;
         this.serviceReferenceBuilder = serviceReferenceBuilder;
+        this.transactionManagerObjectName = transactionManagerObjectName;
         this.transactionContextManagerObjectName = transactionContextManagerObjectName;
         this.connectionTrackerObjectName = connectionTrackerObjectName;
         this.transactionalTimerObjectName = transactionalTimerObjectName;
@@ -180,7 +182,6 @@
         GerApplicationType gerApplication = null;
         try {
             // load the geronimo-application.xml from either the supplied plan or from the
earFile
-            GerApplicationDocument gerApplicationDoc = null;
             XmlObject rawPlan = null;
             try {
                 if (planFile != null) {
@@ -295,6 +296,7 @@
                         applicationInfo.getParentId(),
                         kernel,
                         applicationInfo.getApplicationName(),
+                        transactionManagerObjectName,
                         transactionContextManagerObjectName,
                         connectionTrackerObjectName,
                         transactionalTimerObjectName,
@@ -357,11 +359,7 @@
             if (ConfigurationModuleType.EAR == applicationType) {
                 GBeanData gbeanData = new GBeanData(earContext.getApplicationObjectName(),
J2EEApplicationImpl.GBEAN_INFO);
                 try {
-                    String originalSpecDD = applicationInfo.getOriginalSpecDD();
-                    if (originalSpecDD == null) {
-                        originalSpecDD = "Synthetic EAR";
-                    }
-                    gbeanData.setAttribute("deploymentDescriptor", originalSpecDD);
+                    gbeanData.setAttribute("deploymentDescriptor", applicationInfo.getOriginalSpecDD());
                 } catch (Exception e) {
                     throw new DeploymentException("Error initializing J2EEApplication managed
object");
                 }
@@ -699,6 +697,7 @@
     static {
         GBeanInfoBuilder infoFactory = GBeanInfoBuilder.createStatic(EARConfigBuilder.class,
NameFactory.CONFIG_BUILDER);
         infoFactory.addAttribute("defaultParentId", URI[].class, true, true);
+        infoFactory.addAttribute("transactionManagerObjectName", ObjectName.class, true);
         infoFactory.addAttribute("transactionContextManagerObjectName", ObjectName.class,
true);
         infoFactory.addAttribute("connectionTrackerObjectName", ObjectName.class, true);
         infoFactory.addAttribute("transactionalTimerObjectName", ObjectName.class, true);
@@ -720,6 +719,7 @@
 
         infoFactory.setConstructor(new String[]{
             "defaultParentId",
+            "transactionManagerObjectName",
             "transactionContextManagerObjectName",
             "connectionTrackerObjectName",
             "transactionalTimerObjectName",

Modified: geronimo/trunk/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/EARContext.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/EARContext.java?rev=374054&r1=374053&r2=374054&view=diff
==============================================================================
--- geronimo/trunk/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/EARContext.java
(original)
+++ geronimo/trunk/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/EARContext.java
Wed Feb  1 03:50:54 2006
@@ -34,7 +34,7 @@
 import org.apache.geronimo.security.deployment.SecurityConfiguration;
 
 /**
- * @version $Rev$ $Date$
+ * @version $Rev: 6509 $ $Date$
  */
 public class EARContext extends DeploymentContext implements NamingContext {
     private final ObjectName domainObjectName;
@@ -55,8 +55,9 @@
     private final Map contextIDToPermissionsMap = new HashMap();
     private ObjectName jaccManagerName;
     private SecurityConfiguration securityConfiguration;
+    private final ObjectName transactionManagerObjectName;
 
-    public EARContext(File baseDir, URI id, ConfigurationModuleType moduleType, List parentID,
Kernel kernel, String j2eeApplicationName, ObjectName transactionContextManagerObjectName,
ObjectName connectionTrackerObjectName, ObjectName transactedTimerName, ObjectName nonTransactedTimerName,
ObjectName corbaGBeanObjectName, RefContext refContext) throws MalformedObjectNameException,
DeploymentException {
+    public EARContext(File baseDir, URI id, ConfigurationModuleType moduleType, List parentID,
Kernel kernel, String j2eeApplicationName, ObjectName transactionManagerObjectName, ObjectName
transactionContextManagerObjectName, ObjectName connectionTrackerObjectName, ObjectName transactedTimerName,
ObjectName nonTransactedTimerName, ObjectName corbaGBeanObjectName, RefContext refContext)
throws MalformedObjectNameException, DeploymentException {
         super(baseDir, id, moduleType, parentID, kernel);
         j2eeContext = new J2eeContextImpl(getDomain(), getServer(), j2eeApplicationName ==
null ? NameFactory.NULL : j2eeApplicationName, NameFactory.J2EE_MODULE, NameFactory.NULL,
null, null);
         domainObjectName = NameFactory.getDomainName(null, j2eeContext);
@@ -68,6 +69,7 @@
             applicationObjectName = null;
         }
 
+        this.transactionManagerObjectName = transactionManagerObjectName;
         this.transactionContextManagerObjectName = transactionContextManagerObjectName;
         this.connectionTrackerObjectName = connectionTrackerObjectName;
         this.transactedTimerName = transactedTimerName;
@@ -98,6 +100,10 @@
 
     public ObjectName getApplicationObjectName() {
         return applicationObjectName;
+    }
+
+    public ObjectName getTransactionManagerObjectName() {
+        return transactionManagerObjectName;
     }
 
     public ObjectName getTransactionContextManagerObjectName() {

Modified: geronimo/trunk/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/EJBModule.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/EJBModule.java?rev=374054&r1=374053&r2=374054&view=diff
==============================================================================
--- geronimo/trunk/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/EJBModule.java
(original)
+++ geronimo/trunk/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/EJBModule.java
Wed Feb  1 03:50:54 2006
@@ -22,14 +22,18 @@
 import java.util.List;
 import java.io.IOException;
 
+import javax.management.ObjectName;
+
 import org.apache.xmlbeans.XmlObject;
 import org.apache.geronimo.kernel.config.ConfigurationModuleType;
 import org.apache.geronimo.deployment.DeploymentContext;
 
 /**
- * @version $Rev$ $Date$
+ * @version $Rev: 6509 $ $Date$
  */
 public class EJBModule extends Module {
+    private ObjectName moduleCmpEngineName;
+
     public EJBModule(boolean standAlone, URI configId, List parentId, JarFile moduleFile,
String targetPath, XmlObject specDD, XmlObject vendorDD, String originalSpecDD) {
         super(standAlone, configId, parentId, moduleFile, targetPath, specDD, vendorDD, originalSpecDD,
null);
     }
@@ -40,6 +44,14 @@
 
     public void addClass(URI location, String fqcn, byte[] bytes, DeploymentContext context)
throws IOException, URISyntaxException {
         context.addClass(location, fqcn, bytes, true);
+    }
+
+    public ObjectName getModuleCmpEngineName() {
+        return moduleCmpEngineName;
+    }
+
+    public void setModuleCmpEngineName(ObjectName moduleCmpEngineName) {
+        this.moduleCmpEngineName = moduleCmpEngineName;
     }
 }
 

Modified: geronimo/trunk/modules/j2ee-builder/src/test/org/apache/geronimo/j2ee/deployment/EARConfigBuilderTest.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/j2ee-builder/src/test/org/apache/geronimo/j2ee/deployment/EARConfigBuilderTest.java?rev=374054&r1=374053&r2=374054&view=diff
==============================================================================
--- geronimo/trunk/modules/j2ee-builder/src/test/org/apache/geronimo/j2ee/deployment/EARConfigBuilderTest.java
(original)
+++ geronimo/trunk/modules/j2ee-builder/src/test/org/apache/geronimo/j2ee/deployment/EARConfigBuilderTest.java
Wed Feb  1 03:50:54 2006
@@ -53,7 +53,7 @@
 import org.apache.geronimo.kernel.jmx.JMXUtil;
 
 /**
- * @version $Rev$ $Date$
+ * @version $Rev: 6687 $ $Date$
  */
 public class EARConfigBuilderTest extends TestCase {
     private static final File basedir = new File(System.getProperty("basedir", System.getProperty("user.dir")));
@@ -83,7 +83,8 @@
     private static final Map portMap = null;
 
     protected void setUp() throws Exception {
-        defaultParentId = new URI[] {new URI("org/apache/geronimo/Server")};
+        super.setUp();
+        defaultParentId = new URI[]{new URI("org/apache/geronimo/Server")};
     }
 
     public static Test suite() throws Exception {
@@ -243,7 +244,7 @@
         kernel.loadGBean(configurationManagerData, getClass().getClassLoader());
         kernel.startGBean(configurationManagerName);
 
-        EARConfigBuilder configBuilder = new EARConfigBuilder(defaultParentId, transactionManagerObjectName,
connectionTrackerObjectName, transactionalTimerObjectName, nonTransactionalTimerObjectName,
null, null, ejbConfigBuilder, ejbConfigBuilder, webConfigBuilder, connectorConfigBuilder,
resourceReferenceBuilder, appClientConfigBuilder, serviceReferenceBuilder, kernel);
+        EARConfigBuilder configBuilder = new EARConfigBuilder(defaultParentId, transactionManagerObjectName,
transactionManagerObjectName, connectionTrackerObjectName, transactionalTimerObjectName, nonTransactionalTimerObjectName,
null, null, ejbConfigBuilder, ejbConfigBuilder, webConfigBuilder, connectorConfigBuilder,
resourceReferenceBuilder, appClientConfigBuilder, serviceReferenceBuilder, kernel);
 
         File tempDir = null;
         try {
@@ -257,7 +258,7 @@
     }
 
     public void testBadEJBJARConfiguration() throws Exception {
-        EARConfigBuilder configBuilder = new EARConfigBuilder(defaultParentId, transactionManagerObjectName,
connectionTrackerObjectName, transactionalTimerObjectName, nonTransactionalTimerObjectName,
null, null, ejbConfigBuilder, ejbConfigBuilder, webConfigBuilder, connectorConfigBuilder,
resourceReferenceBuilder, appClientConfigBuilder, serviceReferenceBuilder, null);
+        EARConfigBuilder configBuilder = new EARConfigBuilder(defaultParentId, transactionManagerObjectName,
transactionManagerObjectName, connectionTrackerObjectName, transactionalTimerObjectName, nonTransactionalTimerObjectName,
null, null, ejbConfigBuilder, ejbConfigBuilder, webConfigBuilder, connectorConfigBuilder,
resourceReferenceBuilder, appClientConfigBuilder, serviceReferenceBuilder, null);
 
         File tempDir = null;
         try {
@@ -275,7 +276,7 @@
     }
 
     public void testBadWARConfiguration() throws Exception {
-        EARConfigBuilder configBuilder = new EARConfigBuilder(defaultParentId, transactionManagerObjectName,
connectionTrackerObjectName, transactionalTimerObjectName, nonTransactionalTimerObjectName,
null, null, ejbConfigBuilder, ejbConfigBuilder, webConfigBuilder, connectorConfigBuilder,
resourceReferenceBuilder, appClientConfigBuilder, serviceReferenceBuilder, null);
+        EARConfigBuilder configBuilder = new EARConfigBuilder(defaultParentId, transactionManagerObjectName,
transactionManagerObjectName, connectionTrackerObjectName, transactionalTimerObjectName, nonTransactionalTimerObjectName,
null, null, ejbConfigBuilder, ejbConfigBuilder, webConfigBuilder, connectorConfigBuilder,
resourceReferenceBuilder, appClientConfigBuilder, serviceReferenceBuilder, null);
 
         File tempDir = null;
         try {
@@ -293,7 +294,7 @@
     }
 
     public void testBadRARConfiguration() throws Exception {
-        EARConfigBuilder configBuilder = new EARConfigBuilder(defaultParentId, transactionManagerObjectName,
connectionTrackerObjectName, transactionalTimerObjectName, nonTransactionalTimerObjectName,
null, null, ejbConfigBuilder, ejbConfigBuilder, webConfigBuilder, connectorConfigBuilder,
resourceReferenceBuilder, appClientConfigBuilder, serviceReferenceBuilder, null);
+        EARConfigBuilder configBuilder = new EARConfigBuilder(defaultParentId, transactionManagerObjectName,
transactionManagerObjectName, connectionTrackerObjectName, transactionalTimerObjectName, nonTransactionalTimerObjectName,
null, null, ejbConfigBuilder, ejbConfigBuilder, webConfigBuilder, connectorConfigBuilder,
resourceReferenceBuilder, appClientConfigBuilder, serviceReferenceBuilder, null);
 
         File tempDir = null;
         try {
@@ -311,7 +312,7 @@
     }
 
     public void testBadCARConfiguration() throws Exception {
-        EARConfigBuilder configBuilder = new EARConfigBuilder(defaultParentId, transactionManagerObjectName,
connectionTrackerObjectName, transactionalTimerObjectName, nonTransactionalTimerObjectName,
null, null, ejbConfigBuilder, ejbConfigBuilder, webConfigBuilder, connectorConfigBuilder,
resourceReferenceBuilder, appClientConfigBuilder, serviceReferenceBuilder, null);
+        EARConfigBuilder configBuilder = new EARConfigBuilder(defaultParentId, transactionManagerObjectName,
transactionManagerObjectName, connectionTrackerObjectName, transactionalTimerObjectName, nonTransactionalTimerObjectName,
null, null, ejbConfigBuilder, ejbConfigBuilder, webConfigBuilder, connectorConfigBuilder,
resourceReferenceBuilder, appClientConfigBuilder, serviceReferenceBuilder, null);
 
         File tempDir = null;
         try {
@@ -329,7 +330,7 @@
     }
 
     public void testNoEJBDeployer() throws Exception {
-        EARConfigBuilder configBuilder = new EARConfigBuilder(defaultParentId, transactionManagerObjectName,
connectionTrackerObjectName, transactionalTimerObjectName, nonTransactionalTimerObjectName,
null, null, null, null, webConfigBuilder, connectorConfigBuilder, resourceReferenceBuilder,
appClientConfigBuilder, serviceReferenceBuilder, null);
+        EARConfigBuilder configBuilder = new EARConfigBuilder(defaultParentId, transactionManagerObjectName,
transactionManagerObjectName, connectionTrackerObjectName, transactionalTimerObjectName, nonTransactionalTimerObjectName,
null, null, null, null, webConfigBuilder, connectorConfigBuilder, resourceReferenceBuilder,
appClientConfigBuilder, serviceReferenceBuilder, null);
 
         File tempDir = null;
         try {
@@ -345,7 +346,7 @@
     }
 
     public void testNoWARDeployer() throws Exception {
-        EARConfigBuilder configBuilder = new EARConfigBuilder(defaultParentId, transactionManagerObjectName,
connectionTrackerObjectName, transactionalTimerObjectName, nonTransactionalTimerObjectName,
null, null, ejbConfigBuilder, null, null, connectorConfigBuilder, resourceReferenceBuilder,
appClientConfigBuilder, serviceReferenceBuilder, null);
+        EARConfigBuilder configBuilder = new EARConfigBuilder(defaultParentId, transactionManagerObjectName,
transactionManagerObjectName, connectionTrackerObjectName, transactionalTimerObjectName, nonTransactionalTimerObjectName,
null, null, ejbConfigBuilder, null, null, connectorConfigBuilder, resourceReferenceBuilder,
appClientConfigBuilder, serviceReferenceBuilder, null);
 
         File tempDir = null;
         try {
@@ -361,7 +362,7 @@
     }
 
     public void testNoConnectorDeployer() throws Exception {
-        EARConfigBuilder configBuilder = new EARConfigBuilder(defaultParentId, transactionManagerObjectName,
connectionTrackerObjectName, transactionalTimerObjectName, nonTransactionalTimerObjectName,
null, null, ejbConfigBuilder, null, webConfigBuilder, null, resourceReferenceBuilder, appClientConfigBuilder,
serviceReferenceBuilder, null);
+        EARConfigBuilder configBuilder = new EARConfigBuilder(defaultParentId, transactionManagerObjectName,
transactionManagerObjectName, connectionTrackerObjectName, transactionalTimerObjectName, nonTransactionalTimerObjectName,
null, null, ejbConfigBuilder, null, webConfigBuilder, null, resourceReferenceBuilder, appClientConfigBuilder,
serviceReferenceBuilder, null);
 
         File tempDir = null;
         try {

Modified: geronimo/trunk/modules/naming/src/java/org/apache/geronimo/naming/enc/EnterpriseNamingContext.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/naming/src/java/org/apache/geronimo/naming/enc/EnterpriseNamingContext.java?rev=374054&r1=374053&r2=374054&view=diff
==============================================================================
--- geronimo/trunk/modules/naming/src/java/org/apache/geronimo/naming/enc/EnterpriseNamingContext.java
(original)
+++ geronimo/trunk/modules/naming/src/java/org/apache/geronimo/naming/enc/EnterpriseNamingContext.java
Wed Feb  1 03:50:54 2006
@@ -17,24 +17,53 @@
 
 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$
+ * @version $Rev: 6682 $ $Date$
  */
 public final class EnterpriseNamingContext extends AbstractReadOnlyContext {
     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/trunk/modules/transaction/src/java/org/apache/geronimo/transaction/context/TransactionContextManager.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/transaction/src/java/org/apache/geronimo/transaction/context/TransactionContextManager.java?rev=374054&r1=374053&r2=374054&view=diff
==============================================================================
--- geronimo/trunk/modules/transaction/src/java/org/apache/geronimo/transaction/context/TransactionContextManager.java
(original)
+++ geronimo/trunk/modules/transaction/src/java/org/apache/geronimo/transaction/context/TransactionContextManager.java
Wed Feb  1 03:50:54 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/trunk/modules/transaction/src/java/org/apache/geronimo/transaction/context/UserTransactionImpl.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/transaction/src/java/org/apache/geronimo/transaction/context/UserTransactionImpl.java?rev=374054&r1=374053&r2=374054&view=diff
==============================================================================
--- geronimo/trunk/modules/transaction/src/java/org/apache/geronimo/transaction/context/UserTransactionImpl.java
(original)
+++ geronimo/trunk/modules/transaction/src/java/org/apache/geronimo/transaction/context/UserTransactionImpl.java
Wed Feb  1 03:50:54 2006
@@ -32,7 +32,7 @@
  * This adds the ability to enable or disable the operations depending on
  * the lifecycle of the EJB instance.
  *
- * @version $Rev$ $Date$
+ * @version $Rev: 6682 $ $Date$
  */
 public class UserTransactionImpl implements UserTransaction, Serializable {
     private final ThreadLocal state = new StateThreadLocal();
@@ -44,6 +44,11 @@
 
     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