> I am trying to install Turbine on the Orion server
> (http://www.orionserver.com/) and I having some progress, but...

Oh Gawd...yet another server...(without source no less)...

> I having some progress until I hit the next problem.
> 
> I think the reason for that is: Class.forName() is using the global system
> class loader to load the class, in a server environment there usually some
> special ClassLoader to enable class reloading.

Please note, I'm an expert on classloaders. I have spent MANY hours
dealing with implementations of them.

Possibly. But this works just fine for Apache JServ which *does* have its
own custom classloader. Class.forName() actually uses the classloader
that you are currently calling that code within. If the class is not
found in that classloader, then most custom classloader implementations
will attempt to find the class in the system classloader first and then
the custom classloader. I think that this issue is a problem in the
classloader for Orion or your configuration of Orion.

You should post the exception that you are seeing, you didn't specify if
this is just an issue with ClassNotFoundExceptions.

> Turbine class and other are loaded correctly with the servlet class loader,
> But Class.forName() break this logic as it goes directly to the Global
> system class loader.

Right. In that case, what should happen is this:

Class.forName() is called in the scope of orion's custom classloader. The
systemclassloader is then asked to find the class. When it can't find it,
then the custom class loader should attempt to find the class. It sounds
like this part is what isn't happening and is a bug in the orion
classloader.

> I guess it is possible to hide the problem by modify the server classpath
> but this is a dirty hack :(

No....the problem is with the classloader implementation within orion
since I know that this works in other servlet engines including
Weblogic's and Apache JServ's.
 
> I know the Class.forName()  is the corner stone of Turbine but I think this
> should be changed to a more server friendly class loading. I guess the load
> class code become to long now and should be hidden somewhere like a  util
> method.

Wrong. Saying Turbine isn't "server friendly" is wrong and a bit silly
considering that it works just fine with all the other servlet engines out
there, including the reference implementation servlet engine (Tomcat).
This is most definitely a bad bug in Orion.

> I am not familiar with Turbine code and I am not sure what is the right
> approach here, or if this is a problem. What do you think?

Tell the people who make Orion to fix their broken classloader. This is a
prime example of why people shouldn't write closed source servlet engines.

-jon


------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Problems?:           [EMAIL PROTECTED]

Reply via email to