Hi all
I have seen quite a bit of discussion on the issue of Dynamic classloading
I have spent several days trying to do it myself...but NO BANANA
On the client side I have jboss-client in the class path and also
jnp-client in that directory. I do not have my Ejb home & remote interfaces
on the client classpath
Here's my client code. Please anybody help...
//////////////////////////////////////////////////////////////////////
// Start of Dynamictest
//////////////////////////////////////////////////////////////////////
import java.util.*;
import java.io.*;
import javax.naming.*;
import com.argiley.ejb.cmp.contracting.*;
import java.rmi.RemoteException;
import javax.ejb.EJBException;
import javax.ejb.CreateException;
import java.sql.SQLException;
import javax.rmi.PortableRemoteObject;
import java.rmi.RMISecurityManager;
import javax.naming.spi.*;
import java.net.URL;
import java.net.URLClassLoader;
import java.rmi.server.RMIClassLoader;
public class Dynamictest{
public Dynamictest(){
try{
System.setSecurityManager(new RMISecurityManager());
Reference ref = new Reference
("com.argiley.ejb.cmp.contracting.SKILLSHome", new StringRefAddr
("URL","jnp://dev_client4:1099/SKILLSHome"),
"org.jnp.interfaces.jnp.jnpURLContextFactory", "http://dev_client4:8083/");
System.out.println("Factoryclasslocation " +
ref.getFactoryClassLocation());
System.out.println("Factoryclassname " +
ref.getFactoryClassName());
Object homeref = NamingManager.getObjectInstance(ref, null,
null, null);
SKILLSHome home = (SKILLSHome)PortableRemoteObject.narrow(ref,
SKILLSHome.class);
SKILLS skills = home.create();
System.out.println("Commencing Test 4444");
skills.setSKILLSCATEGORYID(new Integer(1));
skills.setSKILL("TESTFROMTESTJBOSS 79842");
System.out.println("Test SUCCESfully Completed");
}catch(NoClassDefFoundError noe){
noe.printStackTrace();
System.out.println("NoClassDefFoundError " +noe.getMessage());
}catch(SQLException se){
System.out.println("NamingException " +se.getMessage());
}catch(CreateException ce){
System.out.println("NamingException " +ce.getMessage());
}catch(RemoteException re){
System.out.println("NamingException " +re.getMessage());
}catch(NamingException ne){
System.out.println("NamingException " +ne.getMessage());
}catch(Exception ex){
ex.printStackTrace();
System.out.println("Exception " +ex.getMessage());
}
}
public static void main(String args[]){
Dynamictest t = new Dynamictest();
}
}
//////////////////////////////////////////////////////////////////////
// End of Dynamictest
//////////////////////////////////////////////////////////////////////
This is a really cool aspect of JBoss and I would like to dig deeper into
this capability... But I first need to get this simple test working
PLEASE HELP
Ivanhoe Abrahams
Email : [EMAIL PROTECTED]
______________________________________________________________________
Ernst & Young South Africa - http://www.ey.com/southafrica
WARNING: this e-mail contains confidential information and any
unauthorised use or interception is illegal.
If this e-mail is not intended for you, you may not copy, distribute
or disclose the contents to anyone nor
take any action in reliance on the content. If you receive this in
error, please contact the sender and
delete the material from any computer.
--
--------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
List Help?: [EMAIL PROTECTED]