This is something I discovered in porting our applications in a standalone tomcat 
4.1.27 to the tomcat 5 embedded in JBoss 3.2.5

Previously we loaded property files using:

this.getClass().getResourceAsStream(fileName)

ie getting the class loader from the current class.  What I found is that this didnt 
work in Tomcat/JBoss I needed to instead do 

Thread.currentThread ().getContextClassLoader ().getResourceAsStream(fileName)

which works fine.  I appreciate this isn't a clusterable way to load resources but 
thats not an issue for us today.

Hope this tip saves someone some time.  I couldn't find it mentioned anywhere.
Lindsay Smith

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3848135#3848135

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3848135


-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM. 
Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to