[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [equinox-dev] getResources in Servlet.init() - returns a resourcetwice

It might be a consequence of bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=149860.
Still please enter a bug report.


"Kaegi, Simon" <Simon.Kaegi@xxxxxxxxxx>
Sent by: equinox-dev-bounces@xxxxxxxxxxx

07/11/2006 09:18 AM

Please respond to
Equinox development mailing list <equinox-dev@xxxxxxxxxxx>

"Ravindar Reddy" <rroopreddy@xxxxxxxxx>, "Equinox development mailing list" <equinox-dev@xxxxxxxxxxx>
RE: [equinox-dev] getResources in Servlet.init() - returns a        resourcetwice

Hi Ravi,
That's definitely a bug; duplicates hsould be filtered. Please open a report.

From: equinox-dev-bounces@xxxxxxxxxxx [mailto:equinox-dev-bounces@xxxxxxxxxxx] On Behalf Of Ravindar Reddy
Tuesday, July 11, 2006 1:42 AM
Equinox development mailing list
[equinox-dev] getResources in Servlet.init() - returns a resourcetwice

The following code snippet is used to get a single resource URL that is packaged in the bundle jar. This code returns a single URL when invoked from BundleAcivator.activate() but returns two URLs when invoked from Servlet.init(). I printed out the classloader classes from these two invocations. I attached the test bundle to duplicate the issue. The BundleProxyClassLoader in servlet case is returning one through parent loader and one for 'this' loader. This seems like bug but I could be wrong. I am using the 3.2 release bundles for this test

       ClassLoader cl = Thread.currentThread().getContextClassLoader();
       Enumeration urls = cl.getResources("META-INF/helloworld.txt");
       System.out.println("Resources in bundle with classloader :" + cl);
       while(urls.hasMoreElements()) {
           URL url = "">            System.out.println(url);

==> Output from BundleAcivator.activate()
Resources in bundle with classloader :org.eclipse.core.runtime.internal.adaptor.ContextFinder@17494c8

==> Output from Servlet.init()
Resources in servlet with classloader :org.eclipse.equinox.servlet.bridge.http.internal.ServletRegistration$BundleProxyClassLoader@c0f1ec

-Ravi R

     This message may contain privileged and/or confidential information.  If you have received this e-mail in error or are not the intended recipient, you may not use, copy, disseminate or distribute it; do not open any attachments, delete it immediately from your system and notify the sender promptly by e-mail that you have done so.  Thank you. _______________________________________________
equinox-dev mailing list