<so-fucking-jet-lagged> Ok, I understand. I think this is a safe call for now as we really need that DR1 to be public. I will look into the issue closely with Jan from Jetty as I believe they are keen on dumping class loading madness on our lap.
Class loading is one of the toughest problems in Java, one of the best features too... The only thing is that when you say "don't deploy any subcomponents of war" do you mean that you don't even look for jars/sars or that you don't look for web-inf/classes stuff? marcf PS: and yes class.forName really is a pain in the ass :) |-----Original Message----- |From: [EMAIL PROTECTED] |[mailto:[EMAIL PROTECTED]]On Behalf Of Scott |M Stark |Sent: Thursday, February 21, 2002 12:46 AM |To: [EMAIL PROTECTED] |Subject: [JBoss-dev] Why add anything from a war to the JBoss classpath | | |To fix the current problems with class loading in wars I |have dropped the parsing of war subcomponents by the |MainDeployer. The problem was that the jars found in |wars were being broken out and loaded as deployment units |and added to the JBoss ServiceLibraries. The WEB-INF/classes |directory was not added correctly. When a class in the some.jar |(WEB-INF/lib/some.jar) tried to load a class from |WEB-INF/classes using Marc's favorite Class.forName(String), |this foreced used of the JBoss classloader for the some.jar |subdeployment and this knew nothing about WEB-INF/classes |and so failed. | |Instead of heading further into the abyss and also adding the |WEB-INF/classes to the ServiceLibraries, I don't want to |deploy any subcomponents of wars. Let the servlet container |handle this. In addition to their own WEB-INF/classes |reload semantics, they also have to deal with the recommended |non-standard classloader behavior defined in the 2.3 servlet |spec: | |<servlet-2.3 spec> |SRV.9.7.2 Web Application Classloader |The classloader that a container uses to load a servlet in a WAR must allow |the |developer to load any resources contained in library JARs within the WAR |following normal J2SE semantics using getResource. It must not allow theWAR |to |override J2SE or Java servlet API classes. It is further recommended that |the loader |not allow servlets in theWAR access to the web container's implementation |classes. |It is recommended also that the application class loader be implemented so |that classes and resources packaged within the WAR are loaded in preference |to |classes and resources residing in container-wide library JARs. |</servlet-2.3 spec> | |The only downside to throwing out the parsing of the war subcomponents |is the potential loss of jar manifest classpaths. The servlet container is |supposed to handle this as well so this needs to be tested. | |xxxxxxxxxxxxxxxxxxxxxxxx |Scott Stark |Chief Technology Officer |JBoss Group, LLC |xxxxxxxxxxxxxxxxxxxxxxxx | | | |_______________________________________________ |Jboss-development mailing list |[EMAIL PROTECTED] |https://lists.sourceforge.net/lists/listinfo/jboss-development _______________________________________________ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
