I do not know about other HttpService implementations but Pax Web sets
the TCCL prior invoking the servlet/filter/listeners/jsps to the class
loader that registered them and resets the TCCL back to the value it
was before invocation.

If you have a struts app you can give it a try very easily following
the sample I made for Wicket Example or Spring Petclinic:
http://wiki.ops4j.org/confluence/x/oANN

The examples takes Wicket war without any change (without adding osgi
metatdata) and it works out of the box using Pax Web Extender and Pax
WAR url handler to add the osgi headers on the fly. You do not have to
use the war url handler if your artifacts are already osgi-fied.
For Spring Petclinic some modifications are required but is due to
some limitations that Spring has while discovering Controllers
automatically.

HTH,
Alin

On Fri, Jun 13, 2008 at 8:23 PM, Paul Benedict <[EMAIL PROTECTED]> wrote:
> In a discussions about this, we were looking at what Commons Digester does:
> http://commons.apache.org/digester/commons-digester-1.8/docs/api/org/apache/commons/digester/Digester.html#getUseContextClassLoader()
>
> It appears you can direct Digester to what ClassLoader should be used.
>
> We just have to figure out how to do that in Struts. What would it mean to
> configure Struts in an OSGi container? It's typically configured in web.xml
> -- does that have any bearing? Spring Framework supplies a bunch of OSGified
> JEE libraries. So I hope to learn from them some tips. If anyone else has an
> idea, I'd like to hear.
>
> Paul
>
> On Fri, Jun 13, 2008 at 12:01 PM, Saminda Abeyruwan <[EMAIL PROTECTED]>
> wrote:
>
>> Hi All,
>>
>> Thank you for your help to clarify the TCCL issue. I really appreciate
>> this.
>>
>> Would Felix  provide an extension point to set the TCCL we wanted to use.
>> (ex: instance of ContextFinder). Since the  classloader delegation is
>> handle
>> within the framework, I am wondering is it possible to change the default
>> behaviour as wanted.
>>
>> Thank you!
>>
>> Saminda
>>
>>
>>
>> >
>> > there's also the "ContextFinder" classloader implementation from the
>> > Equinox project, which you can set as your TCCL and it will try to find
>> > the right classloader based on the current call stack - although like the
>> > bytecode weaving solution, it's not 100% foolproof...
>> >
>> > note the OSGi specification does not mandate a specific TCCL setting
>> >
>> >
>> >
>>
>>
>> --
>> Saminda Abeyruwan
>>
>> Senior Software Engineer
>> WSO2 Inc. - www.wso2.org
>>
>



-- 
Alin Dreghiciu
http://www.ops4j.org - New Energy for OSS Communities - Open
Participation Software.
http://www.qi4j.org - New Energy for Java - Domain Driven Development.
http://malaysia.jayway.net - New Energy for Projects - Great People
working on Great Projects at Great Places

Reply via email to