[jboss-user] [EJB3] - classloading and remote access in ejb3

Jure Lodrant do-not-reply at jboss.com
Wed Nov 10 05:21:10 EST 2010


Jure Lodrant [http://community.jboss.org/people/lodrantj] created the discussion

"classloading and remote access in ejb3"

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

--------------------------------------------------------------
Hi guys

I love the dynamic classloading features of Java but it seems sometimes love is not enough, I'm lacking knowledge about it. Here it goes:

I'm using JBPM 3.2 in my EJB3 / web based app. JBPM is hidden in EJB3 layer. Now, I'd like to make a clear separation between everything process related on one side and the web part on the other. So I figured I'd just add some GUI content generating classes into the jbpm par archive, dynamically load them through a par classloader and simply send them as Class objects to the client. That was the theory.

So far, of course, it doesn't work. I simple get an exception on Class.newInstance call on the client. 

On the second ran, I tried to call Class.newInstance inside the EJB and return the Object to the client as an implementation of a known interface. All I got was ClassNotFoundExceptions.

Now, before I dig any further, the question: Do I have I shot here, or am I just plain lurking in the impossible land?

It's basically down to this: Can a remote EJB expose a method returning an interface, of which the implementing class is dynamically evaluated and - this is vital - is not present on the client?

Please, advise!

Thank you..

Jure
--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/570450#570450]

Start a new discussion in EJB3 at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2029]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20101110/3972b4a8/attachment-0001.html 


More information about the jboss-user mailing list