[jboss-cvs] JBossAS SVN: r58203 - trunk/tomcat/src/main/org/jboss/web/tomcat/tc6/deployers
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Wed Nov 8 13:23:32 EST 2006
Author: anil.saldhana at jboss.com
Date: 2006-11-08 13:23:31 -0500 (Wed, 08 Nov 2006)
New Revision: 58203
Modified:
trunk/tomcat/src/main/org/jboss/web/tomcat/tc6/deployers/TomcatDeployer.java
Log:
Add a override setter for defaultSecurityDomain which needs to be generically fixed for setter injection in the base class as well as bind the tomcat authenticators into jndi such that Tomcat can pick them up in JBossContextConfig
Modified: trunk/tomcat/src/main/org/jboss/web/tomcat/tc6/deployers/TomcatDeployer.java
===================================================================
--- trunk/tomcat/src/main/org/jboss/web/tomcat/tc6/deployers/TomcatDeployer.java 2006-11-08 18:21:56 UTC (rev 58202)
+++ trunk/tomcat/src/main/org/jboss/web/tomcat/tc6/deployers/TomcatDeployer.java 2006-11-08 18:23:31 UTC (rev 58203)
@@ -34,6 +34,8 @@
import javax.management.NotificationListener;
import javax.management.ObjectInstance;
import javax.management.ObjectName;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
import javax.security.jacc.PolicyContext;
import org.apache.catalina.Lifecycle;
@@ -301,8 +303,14 @@
public void setUseJK(boolean useJK)
{
this.useJK = useJK;
- }
+ }
+ //Temporary - remove it once the base class setter injection works
+ public void setDefaultSecurityDomain(String defaultSecurityDomain)
+ {
+ super.setDefaultSecurityDomain(defaultSecurityDomain);
+ }
+
public boolean getDeleteWorkDirOnContextDestroy()
{
return deleteWorkDirOnContextDestroy;
@@ -493,6 +501,22 @@
}
}
}
+
+ //Set up the authenticators in JNDI such that they can be configured for web apps
+ InitialContext ic = new InitialContext();
+ try
+ {
+ ic.bind("TomcatAuthenticators", this.authenticators);
+ }
+ catch(NamingException ne)
+ {
+ if(log.isTraceEnabled())
+ log.trace("Binding Authenticators to JNDI failed",ne);
+ }
+ finally
+ {
+ try{ ic.close();}catch(NamingException nee){}
+ }
// Register the web container JACC PolicyContextHandlers
HttpServletRequestPolicyContextHandler handler = new HttpServletRequestPolicyContextHandler();
More information about the jboss-cvs-commits
mailing list