Dev. env. question relating to classloaders

Tony Field <[email protected]> Fri, 9 Jun 2006 13:14:48 -0400
Newsgroups gmane.text.xml.resin.user
Message-ID <[email protected]>
Hi -
I have a question regarding classloader order within the webapp.

<executive summary>
Given this classloader configuration in resin.conf's <web-app- 
default> tag:
	<class-loader>
		<tree-loader path="${server.rootDirectory}/ext-webapp" />
		<compiling-loader path="WEB-INF/classes2" />
		<compiling-loader path="WEB-INF/classes1" />
		<compiling-loader path="WEB-INF/classes" />
		<library-loader path="WEB-INF/lib" />
	</class-loader>
Can I have classes in jar files in WEB-INF/lib as well as in one of  
my above WEB-INF/classes* folders, and rely on Resin to read only the  
version of the class in WEB-INF/classes*, or will it read them from / 
lib too?
</executive summary>


<the whole story>
I work on a large web application that has multiple supported  
versions - so I have to have multiple development environments  
floating around.  I usually have one global resin.home and a  
server.root for each version.

When I create a dev environment, I basically run our webapp installer  
which creates a war file and deploys it, along with a bunch of other  
files.  The war file is over 100MB so re-deploying it while testing  
is not really high on my wish list.

Our product contains quite a few jars.  It's broken into jars by  
component, but also because we have some classes in a COM package  
(this is an OLD product!) and the rest in a "com" package.  COM/com  
issues have given us enough headaches already...

I develop using IntelliJ IDEA, and its "make" functionality is really  
nice and fast - it saves me having to recompile all of our code,  
which takes a few minutes  even on my top of the line laptop.  I  
usually just "make" my files into segregated directories then run an  
ant script to bundle up my classes into the jar files and move them  
into my webapp (which is running through IDEA as a straight java  
application, not through the plugin, which is just weird).

Finally, on to my question.  I'd like to be able to "make" my classes  
directly into my webapp's WEB-INF/classes folder (and I'd set it up  
so I compile my COM classes into WEB-INF/classes2, registering the  
classloader in resin.conf for the default-web-app's classloader).  If  
I do this, do I have to remove my corresponding jar file from my WEB- 
INF/lib folder?  I'm trying to streamline the process of setting up a  
development environment that works efficiently for me.
</the whole story>


Thanks very much!
Tony Field