User: starksm
Date: 01/05/11 12:06:26
Modified: tomcat/src/main/org/jboss/tomcat
ContextClassLoaderInterceptor.java TomcatEntry.java
Log:
Updated the tomcat 3.2.1 integration mbean to use the new AbstractWebContainer
mbean and added support for integrated security across web/ejb applications.
Revision Changes Path
1.6 +9 -3
contrib/tomcat/src/main/org/jboss/tomcat/ContextClassLoaderInterceptor.java
Index: ContextClassLoaderInterceptor.java
===================================================================
RCS file:
/cvsroot/jboss/contrib/tomcat/src/main/org/jboss/tomcat/ContextClassLoaderInterceptor.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- ContextClassLoaderInterceptor.java 2000/12/21 16:29:48 1.5
+++ ContextClassLoaderInterceptor.java 2001/05/11 19:06:25 1.6
@@ -17,7 +17,7 @@
*
* @author <a href="mailto:[EMAIL PROTECTED]">Rickard �berg</a>
* @author <a href="mailto:[EMAIL PROTECTED]">Sebastien Alborini</a>
- * @version $Revision: 1.5 $
+ * @version $Revision: 1.6 $
*/
public class ContextClassLoaderInterceptor
extends BaseInterceptor
@@ -25,8 +25,14 @@
public void contextInit( Context context)
throws TomcatException
{
-
((AdaptiveClassLoader)context.getServletLoader().getParentLoader()).setParent(Thread.currentThread().getContextClassLoader());
-
Thread.currentThread().setContextClassLoader(((ClassLoader)context.getServletLoader().getClassLoader()));
+ ClassLoader tcl = Thread.currentThread().getContextClassLoader();
+ AdaptiveClassLoader acl = (AdaptiveClassLoader)
context.getServletLoader().getParentLoader();
+ acl.setParent(tcl);
+ ClassLoader scl = (ClassLoader) context.getServletLoader().getClassLoader();
+ Thread.currentThread().setContextClassLoader(scl);
+System.out.println("ContextClassLoaderInterceptor, tcl="+tcl);
+System.out.println("ContextClassLoaderInterceptor, acl="+acl);
+System.out.println("ContextClassLoaderInterceptor, scl="+scl);
}
}
1.3 +9 -1 contrib/tomcat/src/main/org/jboss/tomcat/TomcatEntry.java
Index: TomcatEntry.java
===================================================================
RCS file: /cvsroot/jboss/contrib/tomcat/src/main/org/jboss/tomcat/TomcatEntry.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- TomcatEntry.java 2001/02/20 15:29:00 1.2
+++ TomcatEntry.java 2001/05/11 19:06:25 1.3
@@ -79,6 +79,14 @@
public ServletContext addContext( String ctxPath, URL docRoot )
{
+ Context ctx = addRawContext(ctxPath, docRoot);
+ ServletContext servletCtx = null;
+ if( ctx != null )
+ servletCtx = ctx.getFacade();
+ return servletCtx;
+ }
+ public Context addRawContext( String ctxPath, URL docRoot )
+ {
// tomcat supports only file-based contexts
if( ! "file".equals( docRoot.getProtocol()) ) {
// log( "addContext() invalid docRoot: " + docRoot );
@@ -95,7 +103,7 @@
m_contextMgr.addContext( ctx );
if (m_facadeMgr == null)
m_facadeMgr = ctx.getFacadeManager();
- return ctx.getFacade();
+ return ctx;
} catch( Exception ex ) {
ex.printStackTrace();
}
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development