469,160 Members | 1,742 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,160 developers. It's quick & easy.

JBoss: Scoped beans & Remote classloader issue


In a JBoss 3.2.4 server, I have deployed several enterprise javabeans
(each as a separate .jar, not in an .ear bundle). These beans are
completely self-contained, as they include all their needed
dependencies inside the jar files (and have a reference to them in the
Class-Path entry in their MANIFEST.MF).

The problem shows when I want these beans to be scoped, this is, to
have their own classloader inside JBoss and not use the unified
classloader so that each bean does not see the others' classes,
something very important for my software architecture. For this, I set
in the jboss.xml file of each of my ejb .jar files the following:

<loader-repository>some.dot.com:loader=[some unique

And in the jboss-service.xml file I enable CallByValue for the EJB

....and with this I get the results I expected. The problem is, I need
some of my ejbs to return to the web tier classes of which this web
tier only has an interface (not the real implementations, which may
vary). This means that, when the web tier receives the data, it should
ask JBoss for the concrete implementation of the class via Remote
Class Loading. For this, I have set in jboss-service.xml:

<mbean code="org.jboss.web.WebService"
<attribute name="Port">8083</attribute>
<attribute name="DownloadServerClasses">true</attribute>
<attribute name="Host">${jboss.bind.address}</attribute>
<attribute name="BindAddress">${jboss.bind.address}</attribute>
Which made remote classloading work perfectly before I scoped my ejbs,
and which now simply makes JBoss return a ClassNotFoundException when
tomcat asks for the implementation class.

I supose this means that the remote classloader cannot access the
ejbs' concrete classloaders now they're not unified but... Can this
behaviour be changed? Can I configure it some way so that I can do
remote classloading with scoped beans?

Jul 17 '05 #1
0 2025

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Hal Vaughan | last post: by
reply views Thread by Bernard Koninckx | last post: by
reply views Thread by Bernard Koninckx | last post: by
10 posts views Thread by Nikita A. Visnevski | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.