geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r930763 - in /geronimo/server/trunk/plugins/openejb/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment: EjbDeploymentBuilder.java EjbModuleBuilder.java EjbRefBuilder.java SecurityBuilder.java
Date Sun, 04 Apr 2010 22:37:46 GMT
Author: djencks
Date: Sun Apr  4 22:37:45 2010
New Revision: 930763

URL: http://svn.apache.org/viewvc?rev=930763&view=rev
Log:
GERONIMO-4360 mdb security inflow and fixing jndi some more.

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-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbModuleBuilder.java
    geronimo/server/trunk/plugins/openejb/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbRefBuilder.java
    geronimo/server/trunk/plugins/openejb/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/SecurityBuilder.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=930763&r1=930762&r2=930763&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
Sun Apr  4 22:37:45 2010
@@ -198,11 +198,11 @@ public class EjbDeploymentBuilder {
         SecurityConfiguration securityConfiguration = (SecurityConfiguration) earContext.getSecurityConfiguration();
         if (securityConfiguration != null) {
             GBeanData gbean = getEjbGBean(enterpriseBean.getEjbName());
+            SecurityBuilder securityBuilder = new SecurityBuilder();
+            Collection<Permission> allPermissions = new HashSet<Permission>();
             if (enterpriseBean instanceof RemoteBean) {
                 RemoteBean remoteBean = (RemoteBean) enterpriseBean;
 
-                SecurityBuilder securityBuilder = new SecurityBuilder();
-                Collection<Permission> allPermissions = new HashSet<Permission>();
 
                 securityBuilder.addToPermissions(allPermissions,
                         remoteBean.getEjbName(),
@@ -260,17 +260,17 @@ public class EjbDeploymentBuilder {
                             ejbModule.getClassLoader());
                 }
 
-                securityBuilder.addEjbTimeout(remoteBean, ejbModule, allPermissions);
+            }
+            securityBuilder.addEjbTimeout(enterpriseBean, ejbModule, allPermissions);
 
-                String defaultRole = securityConfiguration.getDefaultRole();
-                securityBuilder.addComponentPermissions(defaultRole,
-                        allPermissions,
-                        ejbModule.getEjbJar().getAssemblyDescriptor(),
-                        enterpriseBean.getEjbName(),
-                        remoteBean.getSecurityRoleRef(),
-                        componentPermissions);
+            String defaultRole = securityConfiguration.getDefaultRole();
+            securityBuilder.addComponentPermissions(defaultRole,
+                    allPermissions,
+                    ejbModule.getEjbJar().getAssemblyDescriptor(),
+                    enterpriseBean.getEjbName(),
+                    enterpriseBean.getSecurityRoleRef(),
+                    componentPermissions);
 
-            }
             // RunAs subject
             SecurityIdentity securityIdentity = enterpriseBean.getSecurityIdentity();
             if (securityIdentity != null && securityIdentity.getRunAs() != null)
{

Modified: geronimo/server/trunk/plugins/openejb/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbModuleBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/openejb/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbModuleBuilder.java?rev=930763&r1=930762&r2=930763&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/openejb/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbModuleBuilder.java
(original)
+++ geronimo/server/trunk/plugins/openejb/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbModuleBuilder.java
Sun Apr  4 22:37:45 2010
@@ -493,7 +493,7 @@ public class EjbModuleBuilder implements
         GeronimoEjbJarType geronimoEjbJarType = (GeronimoEjbJarType) ejbModule.getEjbModule().getAltDDs().get("geronimo-openejb.xml");
 
         // We must set all mapped name references back to null or Geronimo will blow up
-        unmapReferences(ejbJar, geronimoEjbJarType);
+//        unmapReferences(ejbJar, geronimoEjbJarType);
 
         // create a xmlbeans version of the ejb-jar.xml file, because the jndi code is coupled
based on xmlbeans objects
         EjbJarType ejbJarType = XmlUtil.convertToXmlbeans(ejbJar);

Modified: geronimo/server/trunk/plugins/openejb/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbRefBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/openejb/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbRefBuilder.java?rev=930763&r1=930762&r2=930763&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/openejb/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbRefBuilder.java
(original)
+++ geronimo/server/trunk/plugins/openejb/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbRefBuilder.java
Sun Apr  4 22:37:45 2010
@@ -103,9 +103,9 @@ public class EjbRefBuilder extends Abstr
 
     public void buildNaming(XmlObject specDD, XmlObject plan, Module module, Map componentContext)
throws DeploymentException {
         // skip ejb modules... they have alreayd been processed
-        if (module.getType() == ConfigurationModuleType.EJB) {
-            return;
-        }
+//        if (module.getType() == ConfigurationModuleType.EJB) {
+//            return;
+//        }
 
         // map the refs declared in the vendor plan, so we can match them to the spec references
         Map<String, GerEjbRefType> refMap = mapEjbRefs(plan);

Modified: geronimo/server/trunk/plugins/openejb/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/SecurityBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/openejb/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/SecurityBuilder.java?rev=930763&r1=930762&r2=930763&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/openejb/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/SecurityBuilder.java
(original)
+++ geronimo/server/trunk/plugins/openejb/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/SecurityBuilder.java
Sun Apr  4 22:37:45 2010
@@ -33,16 +33,15 @@ import javax.ejb.TimedObject;
 import javax.ejb.Timer;
 import javax.security.jacc.EJBMethodPermission;
 import javax.security.jacc.EJBRoleRefPermission;
-
 import org.apache.geronimo.common.DeploymentException;
 import org.apache.geronimo.security.jacc.ComponentPermissions;
 import org.apache.openejb.jee.AssemblyDescriptor;
+import org.apache.openejb.jee.EnterpriseBean;
 import org.apache.openejb.jee.ExcludeList;
 import org.apache.openejb.jee.MessageDrivenBean;
 import org.apache.openejb.jee.Method;
 import org.apache.openejb.jee.MethodPermission;
 import org.apache.openejb.jee.NamedMethod;
-import org.apache.openejb.jee.RemoteBean;
 import org.apache.openejb.jee.SecurityRoleRef;
 import org.apache.openejb.jee.SessionBean;
 
@@ -279,7 +278,7 @@ public class SecurityBuilder {
         return result;
     }
 
-    public void addEjbTimeout(RemoteBean remoteBean, EjbModule ejbModule, Collection<Permission>
permissions) throws DeploymentException {
+    public void addEjbTimeout(EnterpriseBean remoteBean, EjbModule ejbModule, Collection<Permission>
permissions) throws DeploymentException {
         NamedMethod timeout = null;
         if (remoteBean instanceof SessionBean) {
             timeout = ((SessionBean) remoteBean).getTimeoutMethod();



Mime
View raw message