Re: [jboss-user] [JBoss Microcontainer] - ClassLoading delegation
by Ales Justin
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
[http://community.jboss.org/message/543283#543283]
Start a new discussion in JBoss Microcontainer at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
15 years, 11 months
Re: [jboss-user] [JBoss Microcontainer] - ClassLoading delegation
by rafael liu
rafael liu [http://community.jboss.org/people/rafaelliu] replied to the discussion
"ClassLoading delegation"
To view the discussion, visit: http://community.jboss.org/message/543280#543280
--------------------------------------------------------------
> Who's they?
>
> Where and how exactly are you running this?
"they" are my applications. It's all in JBoss.
> Re-reading this, this actually doesn't look like the hierarchy you described.
>
> It's more of a delegation model, then actual parent-child hierarchy.
Probably "delegation" is a batter word, because I already has the 2 classloaders references. I want to write a third classloader that would load classes from a classloader and "fail over" to the other classloader.
> 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'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 ;) )
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/543280#543280]
Start a new discussion in JBoss Microcontainer at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
15 years, 11 months