geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject svn commit: r497284 - in /geronimo/server/trunk: configs/openejb/src/plan/ modules/geronimo-openejb-builder/src/test/java/org/apache/geronimo/openejb/deployment/ modules/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/
Date Thu, 18 Jan 2007 01:44:37 GMT
Author: dain
Date: Wed Jan 17 17:44:36 2007
New Revision: 497284

URL: http://svn.apache.org/viewvc?view=rev&rev=497284
Log:
Got deployment a bit farther

Modified:
    geronimo/server/trunk/configs/openejb/src/plan/plan.xml
    geronimo/server/trunk/modules/geronimo-openejb-builder/src/test/java/org/apache/geronimo/openejb/deployment/EjbModuleBuilderTest.java
    geronimo/server/trunk/modules/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/OpenEjbSystemGBean.java

Modified: geronimo/server/trunk/configs/openejb/src/plan/plan.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/configs/openejb/src/plan/plan.xml?view=diff&rev=497284&r1=497283&r2=497284
==============================================================================
--- geronimo/server/trunk/configs/openejb/src/plan/plan.xml (original)
+++ geronimo/server/trunk/configs/openejb/src/plan/plan.xml Wed Jan 17 17:44:36 2007
@@ -20,7 +20,11 @@
 
 <module xmlns="http://geronimo.apache.org/xml/ns/deployment-${geronimoSchemaVersion}">
 
-    <gbean name="OpenEjbSystem" class="org.apache.geronimo.openejb.OpenEjbSystemGBean"/>
+    <gbean name="OpenEjbSystem" class="org.apache.geronimo.openejb.OpenEjbSystemGBean">
+        <reference name="TransactionManager">
+            <name>TransactionManager</name>
+        </reference>        
+    </gbean>
 
 <!--
     <gbean name="StatelessEjbContainer" class="org.apache.openejb.slsb.DefaultStatelessEjbContainerGBean">

Modified: geronimo/server/trunk/modules/geronimo-openejb-builder/src/test/java/org/apache/geronimo/openejb/deployment/EjbModuleBuilderTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-openejb-builder/src/test/java/org/apache/geronimo/openejb/deployment/EjbModuleBuilderTest.java?view=diff&rev=497284&r1=497283&r2=497284
==============================================================================
--- geronimo/server/trunk/modules/geronimo-openejb-builder/src/test/java/org/apache/geronimo/openejb/deployment/EjbModuleBuilderTest.java
(original)
+++ geronimo/server/trunk/modules/geronimo-openejb-builder/src/test/java/org/apache/geronimo/openejb/deployment/EjbModuleBuilderTest.java
Wed Jan 17 17:44:36 2007
@@ -61,5 +61,7 @@
         // configure the application
         EjbJarInfo ejbJarInfo = openEjbSystem.configureApplication(ejbModule);
 
+        openEjbSystem.createEjbJar(ejbJarInfo, classLoader);
+
     }
 }

Modified: geronimo/server/trunk/modules/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/OpenEjbSystemGBean.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/OpenEjbSystemGBean.java?view=diff&rev=497284&r1=497283&r2=497284
==============================================================================
--- geronimo/server/trunk/modules/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/OpenEjbSystemGBean.java
(original)
+++ geronimo/server/trunk/modules/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/OpenEjbSystemGBean.java
Wed Jan 17 17:44:36 2007
@@ -20,6 +20,7 @@
 import java.io.IOException;
 
 import javax.naming.NamingException;
+import javax.transaction.TransactionManager;
 
 import org.apache.openejb.alt.config.ConfigurationFactory;
 import org.apache.openejb.alt.config.ClientModule;
@@ -28,6 +29,8 @@
 import org.apache.openejb.assembler.classic.ContainerInfo;
 import org.apache.openejb.assembler.classic.ClientInfo;
 import org.apache.openejb.assembler.classic.EjbJarInfo;
+import org.apache.openejb.assembler.classic.TransactionServiceInfo;
+import org.apache.openejb.assembler.dynamic.PassthroughFactory;
 import org.apache.openejb.spi.ContainerSystem;
 import org.apache.openejb.Container;
 import org.apache.openejb.OpenEJBException;
@@ -42,9 +45,21 @@
     private final ConfigurationFactory configurationFactory;
     private final Assembler assembler;
 
-    public OpenEjbSystemGBean() {
+    public OpenEjbSystemGBean(TransactionManager transactionManager) throws OpenEJBException
{
+        if (transactionManager == null) throw new NullPointerException("transactionManager
is null");
+        
         configurationFactory = new ConfigurationFactory();
         assembler = new Assembler();
+
+        TransactionServiceInfo transactionServiceInfo = new TransactionServiceInfo();
+        PassthroughFactory.add(transactionServiceInfo, transactionManager);
+        try {
+            transactionServiceInfo.id = "Default Transaction Manager";
+            transactionServiceInfo.serviceType = "TransactionManager";
+            assembler.createTransactionManager(transactionServiceInfo);
+        } finally {
+            PassthroughFactory.remove(transactionServiceInfo);
+        }
         GeronimoThreadContextListener.init();
     }
 
@@ -83,6 +98,8 @@
 
     static {
         GBeanInfoBuilder infoBuilder = GBeanInfoBuilder.createStatic(OpenEjbSystemGBean.class);
+        infoBuilder.addReference("TransactionManager", TransactionManager.class);
+        infoBuilder.setConstructor(new String[] {"TransactionManager"});
         GBEAN_INFO = infoBuilder.getBeanInfo();
     }
 



Mime
View raw message