[jboss-user] [JBoss Microcontainer] - ClassLoading delegation

Ales Justin do-not-reply at jboss.com
Sun May 16 09:21:24 EDT 2010

Ales Justin [http://community.jboss.org/people/alesj] replied to the discussion

"ClassLoading delegation"

To view the discussion, visit: http://community.jboss.org/message/543283#543283

> > But why exactly do you need to change classloader before dispatch?
> > 
> > I must admit I don't see a valid reason, but it's true it's been a while since I did web apps ...
> Well, the whole history then.. I'm doing a portlet that is a dynamic Portlet Bridge. It can be configured to show any existing web app deployed along with it in the same JBoss. That's for the dispatch.
> For that I need to "inject" JBoss Portlet Bridge libs/classes/configs in the application's classpath, so everything loaded by application should look also in the container's classpath. That's for the delegation.
> The problem is as described in my first post, I can't do an actually delegation.. Today I got it working by moving some jars to $JBOSS_CONF/lib which obviously isn't a good solution.
I see.

I guess you could somehow super hack it with your approach -- changing the TCCL,
but that's not the way it should be done. ;-)

Why it doesn't work in JBossAS by default is b/c each .war is placed into its own domain, which then gets child-first lookup notion.
So, all you need to do in order to make this work is for all web apps that you want them to share resources to be in the same domain.
Which is why your jar move makes this work -- the common resources can be fund in common default domain.
> I've been talking to Wesley Hales from JBoss Portlet Bridge too, maybe he can give you some insight (I believe you don't mess with portlets a lot  ;) )
Well, I'm sharing an office with Marko (JBoss Portal core dev), so why don't the three of you decide what exactly you need to achieve,
and I'll make sure Marko makes that a reality with MC's CL, instead of us two playing forums ping-pong.


Reply to this message by going to Community

Start a new discussion in JBoss Microcontainer at Community

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20100516/d35c0141/attachment.html 

More information about the jboss-user mailing list