my dog learned polymorphism*
The moose likes JBoss/WildFly and the fly likes dynamic class loading Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » JBoss/WildFly
Reply locked New topic

dynamic class loading

maha laxmi
Ranch Hand

Joined: Sep 23, 2005
Posts: 68
i have war (in this JSP TagHandler class trying to look up EJB business method that is in ear deployed in node2 instance) deployed in jboss/node1 instance..

ear deployed in jboss/node2 instance..

in theWAR i have added only home and remote interfaces in WEB/classes at client side .(Do i need other custom classes which are using by EJB in WAR);

how do i enable dynamic class loading at client side;i am using jboss-4.0.2;if i enable dynamic class loading do i still need to drop home and remote interfaces and custom classes at client side.

in run.bat at client side.. what steps shouild i take to enable dynamic class loading to look up classses at server side.

set JBOSS_CLASSPATH=C:/jboss-4.0.2/client/jbossall-client.jar

Hashtable contextProperty = new java.util.Hashtable();
contextProperty.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
contextProperty.put(Context.PROVIDER_URL, "jnp://localhost:1099");

InitialContext context = new InitialContext(contextProperty);
DocumentSessionHome home = (DocumentSessionHome)context.lookup("DocumentSessionBean");
DocumentSession doc =(DocumentSession)home.create();
Paul Sturrock

Joined: Apr 14, 2004
Posts: 10336

Please don't cross post. Since you've already got an answer over there I'll close this post.

JavaRanch FAQ HowToAskQuestionsOnJavaRanch
I agree. Here's the link:
subject: dynamic class loading
Similar Threads
long post IBM.158
Reference to component or home interface in session facade? Which one is better?
dynamic class loading
Packaging and Class Loaders
How to get Remote and Home classes imports in Client Code