Hello Jose,
while I was experimenting with classloaders in JSF, I had success
with Thread.get / setContextClassloader.
The Problem will then be to get hold of every Thread before JSF loads
classes. I wrote a Filter to wrap the Classloader of every requests
Thread and a ContextListener for the startup of the webapp.
I hope there are better ways to do it, so I am too interested if
someone else has a better approach.
(Apart from that probably most appserver have (a non portable) way to
define classloaders.
Imre Oßwald
On 25.06.2007, at 13:20, Freire, Jose Luis ((PT - Lisbon)) wrote:
> I’m doing some experimental work to run JSF in an OSGI environment
> and I’m trying a new approach since I’m finding that it’s very hard
> to make JSF a OSGI Bundle, so I’m going for smaller steps.
>
>
>
> What is the best way to extend JSF classloader (if one exists…) ?
>
>
>
> José Freire
> Consulting - Financial Services Industry
> Deloitte & Touche, Quality Firm, S.A.
>
>
> Main: +(351) 21 042 25 00
> Fax: +(351) 21 042 29 50
> jfreire_at_deloitte.pt
> www.deloitte.com/pt
>
> Deloitte
> Edifício Atrium Saldanha
> Praça Duque de Saldanha, 1 - 7º
> 1050-094 Lisboa
> Portugal
>
>
>
>
> *Disclaimer:*
> Deloitte refers to one or more of Deloitte Touche Tohmatsu, a Swiss
> Verein, its member firms, and their respective subsidiaries and
> affiliates. As a Swiss Verein (association), neither Deloitte
> Touche Tohmatsu nor any of its member firms has any liability for
> each other's acts or omissions. Each of the member firms is a
> separate and independent legal entity operating under the names
> "Deloitte," "Deloitte & Touche," "Deloitte Touche Tohmatsu," or
> other related names. Services are provided by the member firms or
> their subsidiaries or affiliates and not by the Deloitte Touche
> Tohmatsu Verein.
> Privileged/Confidential Information may be contained in this
> message. If you are not the addressee indicated in this message (or
> responsible for delivery of the message to such person), you may
> not copy or deliver this message to anyone. In such case, you
> should destroy this message and kindly notify the sender by reply
> email. Please advise immediately if you or your employer do not
> consent to Internet email for messages of this kind. Opinions,
> conclusions and other information in this message that do not
> relate to the official business of my firm shall be understood as
> neither given nor endorsed by it.
>