geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ga...@apache.org
Subject svn commit: r982034 - in /geronimo/server/trunk/plugins/openejb: geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbDeploymentBuilder.java geronimo-openejb/src/main/java/org/apache/geronimo/openejb/EjbDeployment.java
Date Tue, 03 Aug 2010 20:55:26 GMT
Author: gawor
Date: Tue Aug  3 20:55:26 2010
New Revision: 982034

URL: http://svn.apache.org/viewvc?rev=982034&view=rev
Log:
expose UserTransaction in ejbs

Modified:
    geronimo/server/trunk/plugins/openejb/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbDeploymentBuilder.java
    geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/EjbDeployment.java

Modified: geronimo/server/trunk/plugins/openejb/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbDeploymentBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/openejb/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbDeploymentBuilder.java?rev=982034&r1=982033&r2=982034&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/openejb/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbDeploymentBuilder.java
(original)
+++ geronimo/server/trunk/plugins/openejb/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbDeploymentBuilder.java
Tue Aug  3 20:55:26 2010
@@ -68,6 +68,7 @@ import org.apache.openejb.jee.ResourceRe
 import org.apache.openejb.jee.SecurityIdentity;
 import org.apache.openejb.jee.SessionBean;
 import org.apache.openejb.jee.SessionType;
+import org.apache.openejb.jee.TransactionType;
 import org.apache.openejb.jee.oejb3.EjbDeployment;
 import org.apache.xbean.finder.ClassFinder;
 import org.osgi.framework.Bundle;
@@ -424,7 +425,10 @@ public class EjbDeploymentBuilder {
         gbean.setReferencePattern("ApplicationJndi", applicationJndiName);
         gbean.setAttribute("moduleContextMap", module.getJndiScope(JndiScope.module));
         gbean.setAttribute("componentContextMap", module.getJndiScope(JndiScope.comp));
-
+        
+        gbean.setReferencePattern("TransactionManager", earContext.getTransactionManagerName());
+        gbean.setAttribute("beanManagedTransactions", bean.getTransactionType() == TransactionType.BEAN);
+        
         //
         // Process resource refs
         //

Modified: geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/EjbDeployment.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/EjbDeployment.java?rev=982034&r1=982033&r2=982034&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/EjbDeployment.java
(original)
+++ geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/EjbDeployment.java
Tue Aug  3 20:55:26 2010
@@ -35,6 +35,7 @@ import org.apache.geronimo.gbean.annotat
 import org.apache.geronimo.gbean.annotation.ParamReference;
 import org.apache.geronimo.gbean.annotation.ParamSpecial;
 import org.apache.geronimo.gbean.annotation.SpecialAttributeType;
+import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
 import org.apache.geronimo.j2ee.jndi.ApplicationJndi;
 import org.apache.geronimo.kernel.Kernel;
 import org.apache.geronimo.management.EJB;
@@ -103,7 +104,8 @@ public class EjbDeployment implements EJ
                          @ParamAttribute(name = "unshareableResources") Set<String>
unshareableResources,
                          @ParamAttribute(name = "applicationManagedSecurityResources") Set<String>
applicationManagedSecurityResources,
                          @ParamReference(name = "TrackedConnectionAssociator") TrackedConnectionAssociator
trackedConnectionAssociator,
-                         @ParamReference(name = "TransactionManager") GeronimoTransactionManager
transactionManager,
+                         @ParamReference(name = "TransactionManager", namingType = NameFactory.JTA_RESOURCE)
GeronimoTransactionManager transactionManager,
+                         @ParamAttribute(name = "beanManagedTransactions") boolean beanManagedTransactions,
                          @ParamReference(name = "OpenEjbSystem") OpenEjbSystem openEjbSystem,
                          @ParamSpecial(type = SpecialAttributeType.kernel) Kernel kernel)
throws LoginException, NamingException {
         this.objectName = objectName;
@@ -123,8 +125,8 @@ public class EjbDeployment implements EJ
         }
         this.defaultSubject = defaultRole == null ? runAsSource.getDefaultSubject() : runAsSource.getSubjectForRole(defaultRole);
         this.runAs = runAsSource.getSubjectForRole(runAsRole);
-        this.componentContext = EnterpriseNamingContext.livenReferences(compContext, transactionManager,
kernel, classLoader, bundle, "comp/");
-        this.moduleContext = EnterpriseNamingContext.livenReferences(moduleJndi, transactionManager,
kernel, classLoader, bundle, "module/");
+        this.componentContext = EnterpriseNamingContext.livenReferences(compContext, (beanManagedTransactions)
? transactionManager : null, kernel, classLoader, bundle, "comp/");
+        this.moduleContext = EnterpriseNamingContext.livenReferences(moduleJndi, null, kernel,
classLoader, bundle, "module/");
         this.applicationContext = applicationJndi.getApplicationContext();
         this.globalContext = applicationJndi.getGlobalContext();
         this.unshareableResources = unshareableResources;



Mime
View raw message