Hi,
my problem:
On the same server, there a 2 different apps. I use just one client, that I change to get a reference to a Bean of application 1 or application 2.
When the client wants to get the ref of a bean of the first app (Object object = initialContext.lookup("spielkonfiguration")) it throws this Exception:
javax.naming.CommunicationException [Root exception is java.lang.ClassNotFoundException: com.mspsn.genps.spielkonfigurationHome (no security manager: RMI class loader disabled)]
But when I change it to get a ref onto a bean of the second app, it works perfectly.
How can it be? I think the deploymentdiscriptors are not the reasen. I postet them already here:
http://www.jboss.org/index.html?module=bb&op=viewtopic&t=48341
What else could be the reason?
Regards
Frank
public class Client {
public static void main (String[] args) throws Exception {
Hashtable env = new Hashtable();
TeamBuilderSessionBeanHome teamBuilderSessionBeanHome;
TeamBuilderSessionBean teamBuilderSessionBean;
// env.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
// env.put(Context.PROVIDER_URL, "192.168.1.1");
// env.put(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces");
// get HomeObject for teamBuilderSession
try {
Context initialContext = new InitialContext();
Object object = initialContext.lookup("spielkonfiguration"); // lookup of a SessionBean
// Object object = initialContext.lookup("teamBuilderSessionBean"); // lookup of a SessionBean
// teamBuilderSessionBeanHome = (TeamBuilderSessionBeanHome) PortableRemoteObject.narrow(object, TeamBuilderSessionBeanHome.class);
} catch (Exception e) {
System.err.println("Client: Couldn't get homeObject for TeamBuilder! Messege was: "+e.getMessage());
throw new Exception("Client: Couldn't get homeObject for team! Messege was: "+e.getMessage());
}
// create new teamBuilderSession and within this step also the new team
/*
try {
teamBuilderSessionBean= teamBuilderSessionBeanHome.create(args[0]);
} catch (Exception e) {
throw new Exception(e.getMessage());
}
*/
}