RE: Class loading question (with aspectj)

2009-09-04 Thread neo anderson
nds. It is interesting for me to understand more on how it works. Thanks again for your reply. Caldarale, Charles R wrote: > >> From: neo anderson [mailto:javadeveloper...@yahoo.co.uk] >> Subject: Re: Class loading question (with aspectj) >> >> I do not put the same c

RE: Class loading question (with aspectj)

2009-09-04 Thread Caldarale, Charles R
> From: neo anderson [mailto:javadeveloper...@yahoo.co.uk] > Subject: Re: Class loading question (with aspectj) > > I do not put the same class i.e. TapestryFilter.java in both location > (WEB-INF/classes and WEB-INF/lib). A .java file is not a class file. > The way how I

Re: Class loading question (with aspectj)

2009-09-04 Thread neo anderson
I do not put the same class i.e. TapestryFilter.java in both location (WEB-INF/classes and WEB-INF/lib). The way how I test is by copying TapestryFilter.java to another foler under WEB-INF/classes and renaming it to another name e.g. MyTapestryFilter.java. Then configure web.xml to use MyTapes

Re: Class loading question (with aspectj)

2009-09-04 Thread Mark Thomas
neo anderson wrote: > I read the document at > http://tomcat.apache.org/tomcat-6.0-doc/class-loader-howto.html and have a > question. What is the class loading order if the classes are located under > /WEB-INF/classes/ and /WEB-INF/lib/ respectively? The search order is always: /WEB-INF/classes /

Re: Class loading question

2006-05-23 Thread Black Buddha
Gentlemen, thank you very much for the poking and prodding: it pointed me in the right direction. I solved the problem by modifying the code I wrote to fetch the class bytes: instead of doing a URL.openStream() I changed it to do a URL.openConnection() then disabled the use of the URLConnection c

Re: Class loading question

2006-05-23 Thread Black Buddha
Tried it: and antiResourceLocking as well (both set to true). Its very curious: antiResourceLocking does what it seems like it should do: extracts all referenced resource files into work\Catalina\localhost\test\loader\org\blah\blah\blah However, antiJARLocking doesn't seem to do anything expl

Re: Class loading question

2006-05-23 Thread Filip Hanik - Dev Lists
http://tomcat.apache.org/tomcat-5.5-doc/config/context.html look for "antiJARLocking" is that what you are after? Filip Black Buddha wrote: Actually, I looked at that and its a little odder than that. I use the Eclipse compiler, and when its locating import dependencies it uses a chunk of c

Re: Class loading question

2006-05-23 Thread Black Buddha
Actually, I looked at that and its a little odder than that. I use the Eclipse compiler, and when its locating import dependencies it uses a chunk of code like this to retrieve the bytes for a specific class: InputStream is; try{ String resourceName = className.replace('.', '/') + ".class";

RE: Class loading question

2006-05-23 Thread Peter Crowther
> From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED] > interesting, are you saying that the handle is not closed > when you call stream.close()? There's some noise on this at: http://forum.java.sun.com/thread.jspa?threadID=609458&messageID=3355532 Still haven't found the entry in the bug

RE: Class loading question

2006-05-23 Thread Peter Crowther
> From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED] > interesting, are you saying that the handle is not closed > when you call stream.close()? Yes - although my Google-fu is failing me and I can no longer find the entry in Sun's bug database that told me this (for 1.4) and almost caused m

Re: Class loading question

2006-05-22 Thread Filip Hanik - Dev Lists
its not a good solution, as a VM tuning parameter is -XX:DisableExplicitGC or something like that. vineesh kumar wrote: Dear Peter, > - Ensure a garbage collection before the files need to be deleted - can > be difficult, as System.GC() is only a hint (as I found out when I ran > into this

Re: Class loading question

2006-05-22 Thread vineesh kumar
Dear Peter, > - Ensure a garbage collection before the files need to be deleted - can > be difficult, as System.GC() is only a hint (as I found out when I ran > into this under somewhat different circumstances); With java 1.5.0_04, I think it's possible to force the gc to run manually.

Re: Class loading question

2006-05-22 Thread Filip Hanik - Dev Lists
interesting, are you saying that the handle is not closed when you call stream.close()? Peter Crowther wrote: From: Black Buddha [mailto:[EMAIL PROTECTED] even after I've stopped the webapp Tomcat still holds an open file handle to the generated library files Welcome to a JVM bug. The

Re: Class loading question

2006-05-22 Thread Black Buddha
Peter, thank you very much. I will search for a separate solution. Femi. On 5/22/06, Peter Crowther <[EMAIL PROTECTED]> wrote: > From: Black Buddha [mailto:[EMAIL PROTECTED] > even after I've stopped the webapp Tomcat still > holds an open file handle to the generated library files Welcome t

RE: Class loading question

2006-05-22 Thread Peter Crowther
> From: Black Buddha [mailto:[EMAIL PROTECTED] > even after I've stopped the webapp Tomcat still > holds an open file handle to the generated library files Welcome to a JVM bug. The essence is that: - File stream objects in the JVM hold onto the file handle. - The handle is closed only when th