[jboss-cvs] JBossAS SVN: r73726 - trunk/server/src/main/org/jboss/web/deployers.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Tue May 27 23:40:17 EDT 2008


Author: anil.saldhana at jboss.com
Date: 2008-05-27 23:40:17 -0400 (Tue, 27 May 2008)
New Revision: 73726

Modified:
   trunk/server/src/main/org/jboss/web/deployers/AbstractWarDeployer.java
   trunk/server/src/main/org/jboss/web/deployers/WebModule.java
   trunk/server/src/main/org/jboss/web/deployers/WebModuleMBean.java
Log:
JBAS-5488: Inject PolicyRegistration instance into the web container

Modified: trunk/server/src/main/org/jboss/web/deployers/AbstractWarDeployer.java
===================================================================
--- trunk/server/src/main/org/jboss/web/deployers/AbstractWarDeployer.java	2008-05-28 03:39:09 UTC (rev 73725)
+++ trunk/server/src/main/org/jboss/web/deployers/AbstractWarDeployer.java	2008-05-28 03:40:17 UTC (rev 73726)
@@ -664,6 +664,13 @@
          ServiceInjectionValueMetaData injectionValue = new ServiceInjectionValueMetaData(deployment.getSecurityManagementName());
          attr.setValue(injectionValue);
          attrs.add(attr);
+         
+         ServiceAttributeMetaData attrPR = new ServiceAttributeMetaData();
+         attrPR.setName("PolicyRegistration");
+         ServiceInjectionValueMetaData injectionValuePR = new ServiceInjectionValueMetaData(deployment.getPolicyRegistrationName());
+         attrPR.setValue(injectionValuePR);
+         attrs.add(attrPR);
+         
          webModule.setAttributes(attrs);
 
          // Dependencies...Still have old jmx names here

Modified: trunk/server/src/main/org/jboss/web/deployers/WebModule.java
===================================================================
--- trunk/server/src/main/org/jboss/web/deployers/WebModule.java	2008-05-28 03:39:09 UTC (rev 73725)
+++ trunk/server/src/main/org/jboss/web/deployers/WebModule.java	2008-05-28 03:40:17 UTC (rev 73726)
@@ -26,6 +26,7 @@
 import org.jboss.logging.Logger;
 import org.jboss.metadata.web.jboss.JBossWebMetaData;
 import org.jboss.security.ISecurityManagement;
+import org.jboss.security.authorization.PolicyRegistration;
 import org.jboss.web.WebApplication;
 
 /** A container service used to introduce war dependencies. This service is
@@ -62,6 +63,15 @@
    }  
 
    /**
+    * Set the PolicyRegistration instance
+    * @param policyRegistration the policy registration instance
+    */
+   public void setPolicyRegistration(PolicyRegistration policyRegistration)
+   {
+	 deployment.setPolicyRegistration(policyRegistration);   
+   }
+   
+   /**
     * Set the securityManagement.
     * 
     * @param securityManagement the securityManagement.

Modified: trunk/server/src/main/org/jboss/web/deployers/WebModuleMBean.java
===================================================================
--- trunk/server/src/main/org/jboss/web/deployers/WebModuleMBean.java	2008-05-28 03:39:09 UTC (rev 73725)
+++ trunk/server/src/main/org/jboss/web/deployers/WebModuleMBean.java	2008-05-28 03:40:17 UTC (rev 73726)
@@ -22,10 +22,12 @@
 package org.jboss.web.deployers;
 
 import org.jboss.security.ISecurityManagement;
+import org.jboss.security.authorization.PolicyRegistration;
   
 
 /** The standard mbean service interface for the WebModule
  * @author Scott.Stark at jboss.org
+ * @author Anil.Saldhana at redhat.com
  * @version $Revison:$
  */
 public interface WebModuleMBean
@@ -35,5 +37,6 @@
    public void stop() throws Exception;
    public void destroy() throws Exception; 
 
+   public void setPolicyRegistration(PolicyRegistration policyRegistration);
    public void setSecurityManagement(ISecurityManagement securityManagement);
 }




More information about the jboss-cvs-commits mailing list