[EJB 3.0 Users] - How to load classes dynamically in EJB3 on JBoss 4.2.2 at Ru
by samuelpaulc
Hi All,
My application is a SWT application on the client side and an EJB3 on JBoss 4.2.2 on the server side.
Users(from client) can upload jars containing classes that are copied onto the JBoss server machine to a known directory.
The classes within the newly uploaded jars have to be loaded,instantiated and a known method has to be called on them.
We have enforced upon the user to implement our base interfaces in their classes so that we can call any new jars that are uploaded at runtime without shutting down and bringing up JBoss.
I am getting a NullPointerException when I try to load the class dynamically(using URLClassLoader)
We have tried using URLClassLoader but the loaded class is not visible at runtime.
Also tried to load class using UnifiedClassLoader3 but am not sure I did the right way.
Please suggest the best possible way to do this ASAP.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4262444#4262444
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4262444
16 years, 6 months
[Installation, Configuration & Deployment] - Multiple JBoss instances vs. one "big" JBoss with different
by icordoba
hello,
I start this thread to get opinions on which is the best approach when needing to deploy multiple different applications in the same server.
I've been using JBoss for years starting with version 3. During this time I've used a couple of JBoss instances with scope class loading, even though docs state that disabling unified class loading and enabling marshaning (CallByValue?) is CPU consuming.
I am migrating now to JBoss 5.1 and have decided to test keeping unified class loading and starting multiple JBoss'es in differennt localhost IPs. (I cannot deploy different applications in the same instance as I have many version conflicts. I use multiple versions of my own EJB3 component library)
These JBoss will need less memory than the previous one and only JBoss. Of course, they are faster now.
is this approach right? I use MacOS and its Java VM, while not specially fast, it is suppoused to handle memory sharing between different java instances.
Maybe there is a different approach for deploying different apps in the same server... as far as I know there is no way to enable isolated class loading without enabling "CallByValue"... is there?
Thanks for any advice/experiences.
Ignacio
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4262443#4262443
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4262443
16 years, 6 months