logo       

Re: ThreadPool name bug?: msg#00034

java.jetty.general

Subject: Re: ThreadPool name bug?

Greg,

It looks like the changes you made to the ThreadPool about a month ago
have some issues with any classloader that doesn't define a Package
object for the class (eg. getPackage() returns null).

Reading the API definition for getPackage() tends to indicate that it
is valid for the Class to return null for getPackage() however this
break the new ThreadPool.

See following for change in question:
http://cvs.sourceforge.net/viewcvs.py/jetty/Jetty/src/org/mortbay/util/ThreadPool.java?r1=1.36&r2=1.37


API definition:
/**
* Gets the package for this class. The class loader of this class is used
* to find the package. If the class was loaded by the bootstrap class
* loader the set of packages loaded from CLASSPATH is searched to find the
* package of the class. Null is returned if no package object was created
* by the class loader of this class.
*
* <p> Packages have attributes for versions and specifications only if the
* information was defined in the manifests that accompany the classes, and
* if the class loader created the package instance with the attributes
* from the manifest.
*
* @return the package of the class, or null if no package
* information is available from the archive or codebase.
*/
public Package getPackage()




Our usecase?

We use classworlds (classworlds.codehaus.org) to launch our jetty
server and application from a single jar. At present classworlds
doesn't return a Package object (CLASSWORLDS-1 issue in
jira.codehaus.org) - although it will one day.


This isn't urgent as I'll just revert back to 5.0.RC2 for the time
being. It'll be a while before classworlds and maven are all patched
up to define a Package, and in my opinion, Jetty should work without
getPackage() defined irregardless.

Keep up the good work! Jetty is great!

Cheers,

Ben


-------------------------------------------------------
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. 24. Go here: http://sf.net/ppc_contest.php


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise