geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject cvs commit: incubator-geronimo/modules/core/src/java/org/apache/geronimo/xml/deployment GeronimoEjbJarLoader.java GeronimoJ2EELoader.java
Date Sun, 18 Jan 2004 21:16:25 GMT
adc         2004/01/18 13:16:25

  Modified:    modules/core/src/java/org/apache/geronimo/xml/deployment
                        GeronimoEjbJarLoader.java GeronimoJ2EELoader.java
  Log:
  Additional deployment information
  
  Revision  Changes    Path
  1.15      +4 -1      incubator-geronimo/modules/core/src/java/org/apache/geronimo/xml/deployment/GeronimoEjbJarLoader.java
  
  Index: GeronimoEjbJarLoader.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/core/src/java/org/apache/geronimo/xml/deployment/GeronimoEjbJarLoader.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- GeronimoEjbJarLoader.java	19 Nov 2003 11:07:57 -0000	1.14
  +++ GeronimoEjbJarLoader.java	18 Jan 2004 21:16:25 -0000	1.15
  @@ -166,6 +166,7 @@
               mdbs[i].setMessagingType(LoaderUtil.getChildContent(root, "messaging-type"));
               mdbs[i].setTransactionType(LoaderUtil.getChildContent(root, "transaction-type"));
               mdbs[i].setActivationConfig(loadActivationConfig(LoaderUtil.getChild(root,
"activation-config")));
  +            mdbs[i].setBeanSecurity(GeronimoJ2EELoader.loadBeanSecurity(root));
           }
           return mdbs;
       }
  @@ -193,6 +194,7 @@
               sessions[i].setServiceEndpoint(LoaderUtil.getChildContent(root, "service-endpoint"));
               sessions[i].setSessionType(LoaderUtil.getChildContent(root, "session-type"));
               sessions[i].setTransactionType(LoaderUtil.getChildContent(root, "transaction-type"));
  +            sessions[i].setBeanSecurity(GeronimoJ2EELoader.loadBeanSecurity(root));
           }
           return sessions;
       }
  @@ -223,6 +225,7 @@
               entities[i].setUpdate(GeronimoEjbJarLoader.loadQueries(update));
               Element[] call = LoaderUtil.getChildren(root, "call");
               entities[i].setCall(GeronimoEjbJarLoader.loadQueries(call));
  +            entities[i].setBeanSecurity(GeronimoJ2EELoader.loadBeanSecurity(root));
           }
           return entities;
       }
  
  
  
  1.9       +32 -1     incubator-geronimo/modules/core/src/java/org/apache/geronimo/xml/deployment/GeronimoJ2EELoader.java
  
  Index: GeronimoJ2EELoader.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/core/src/java/org/apache/geronimo/xml/deployment/GeronimoJ2EELoader.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- GeronimoJ2EELoader.java	19 Nov 2003 07:45:46 -0000	1.8
  +++ GeronimoJ2EELoader.java	18 Jan 2004 21:16:25 -0000	1.9
  @@ -70,6 +70,8 @@
   import org.apache.geronimo.deployment.model.geronimo.j2ee.Role;
   import org.apache.geronimo.deployment.model.geronimo.j2ee.Realm;
   import org.apache.geronimo.deployment.model.geronimo.j2ee.Principal;
  +import org.apache.geronimo.deployment.model.geronimo.j2ee.DefaultPrincipal;
  +import org.apache.geronimo.deployment.model.geronimo.j2ee.BeanSecurity;
   import org.w3c.dom.Element;
   
   /**
  @@ -213,11 +215,30 @@
   
           J2EELoader.loadDescribable(s, security);
   
  +        security.setDefaultPrincipal(loadDefaultPrincipal(s));
           security.setRoleMappings(loadRoleMappings(s));
   
  +        String useEjbContextHandler = LoaderUtil.getAttribute(s, "use-context-handler");
  +        if (useEjbContextHandler != null) {
  +            security.setUseContextHandler(useEjbContextHandler.equalsIgnoreCase("true"));
  +        }
  +
           return security;
       }
   
  +    public static DefaultPrincipal loadDefaultPrincipal(Element e) {
  +        Element dp = LoaderUtil.getChild(e, "default-principal");
  +
  +        DefaultPrincipal defaultPrincipal = new DefaultPrincipal();
  +        J2EELoader.loadDescribable(dp, defaultPrincipal);
  +        defaultPrincipal.setRealmName(LoaderUtil.getAttribute(dp, "realm-name"));
  +
  +        Element p = LoaderUtil.getChild(dp, "principal");
  +        defaultPrincipal.setPrincipal(loadPrincipal(p, new Principal()));
  +
  +        return defaultPrincipal;
  +    }
  +
       public static RoleMappings loadRoleMappings(Element e) {
           Element rm = LoaderUtil.getChild(e, "role-mappings");
   
  @@ -279,5 +300,15 @@
           principal.setClassName(LoaderUtil.getAttribute(e, "class"));
   
           return principal;
  +    }
  +    public static BeanSecurity loadBeanSecurity(Element e) {
  +        Element bs = LoaderUtil.getChild(e, "bean-security");
  +
  +        if (bs == null) return null;
  +
  +        BeanSecurity beanSecurity = new BeanSecurity();
  +        beanSecurity.setUseIdentity(LoaderUtil.getBoolean(bs, "use-identity"));
  +
  +        return beanSecurity;
       }
   }
  
  
  

Mime
View raw message