On Saturday 01 December 2001 04:20, Scott M Stark wrote: > No, I don't see the java:comp context for this standalone war. The > AbstractWebContainer.parseWebAppDescriptors is not being called > as part of the deploy so the ENC is not getting created. There is some > integration problem between Jetty and the AbstractWebContainer for > a single war I'll look into. >
I dit some traceback and it appears that AbstractWebContainer subclass (org.jboss.jetty.JettyService) is not calling WebDescriptorParser.parseWebAppDescriptors(). The call to parseWebAppDescriptors() is being made from within org.jboss.jetty.JBossWebApplicationContext.JBossSXSecurityHandler.start() method, which is not called since no JBossSXSecurityHandler instance is ever created. The JBossWebApplicationContext.getSecurityHandler() is never called. It's true. I have not yet configured the security in my app. But it should work nevertheless. Why is parsing done in JBossSXSecurityHandler's start() method? Because the start() method is called with the correct thread's contextClassLoader? If it is different than thread's contextClassLoader when performDeploy is called then it should be the child of it as it is asserted in the "sanity check" being made in JBossSXSecurityHandler.start() method. So I made a test and moved the parseWebAppDescriptors() call from the JBossSXSecurityHandler.start() method to the org.jboss.jetty.Jetty.deploy() method, just before JBossWebApplicationContext.start() method is called. It works. Peter Here are the diffs: Index: JBossWebApplicationContext.java =================================================================== RCS file: /cvsroot/jboss/contrib/jetty/src/main/org/jboss/jetty/JBossWebApplicationContext.java,v retrieving revision 1.4 diff -c -r1.4 JBossWebApplicationContext.java *** JBossWebApplicationContext.java 2001/11/28 01:22:25 1.4 --- JBossWebApplicationContext.java 2001/12/01 15:46:02 *************** *** 117,125 **** } // Parse descriptors and set up the JNDI environment ! Element webAppDD = _webApp.getWebApp(); ! Element jbossDD = _webApp.getJbossWeb(); ! _descriptorParser.parseWebAppDescriptors(loader, webAppDD, jbossDD); // Add the JBoss security realm String realmName = getRealm(); --- 117,125 ---- } // Parse descriptors and set up the JNDI environment ! // Element webAppDD = _webApp.getWebApp(); ! // Element jbossDD = _webApp.getJbossWeb(); ! // _descriptorParser.parseWebAppDescriptors(loader, webAppDD, jbossDD); // Add the JBoss security realm String realmName = getRealm(); *************** *** 246,248 **** --- 246,249 ---- return path.substring("jar:file:".length(),path.length()-(resource.length()+2)); } } + Index: Jetty.java =================================================================== RCS file: /cvsroot/jboss/contrib/jetty/src/main/org/jboss/jetty/Jetty.java,v retrieving revision 1.24 diff -c -r1.24 Jetty.java *** Jetty.java 2001/11/29 01:21:29 1.24 --- Jetty.java 2001/12/01 15:46:02 *************** *** 204,209 **** --- 204,213 ---- _log.info("no jboss-web.xml found"); } + // + // delegate parsing of some elements to descriptorParser + descriptorParser.parseWebAppDescriptors(cl, wa.getWebApp(), wa.getJbossWeb()); + // finally start the app app.start(); *************** *** 287,289 **** --- 291,294 ---- url.substring(index, url.length()); } } + _______________________________________________ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development