|
Re: Attempting to connect to EJB fails
|
Posted: Mar 21, 2003 8:36 PM
|
|
When you start the JVM with no security manager installed, RMI won't load classes remotely. It looks like that's what your problem is.
I don't create a security manager in SuiteRunner, so you should be able to install one in your test code. For example, you could put this code in the constructor of your main Suite :
if (System.getSecurityManager() == null) {
System.setSecurityManager(new RMISecurityManager());
}
You'll have to specify a policy file when you start SuiteRunner, as in:
java -Djava.security.policy=policy.all -jar suiterunner.jar myrecipe.srj
A nice tutorial on RMISecurityManager is here:
http://gethelp.devx.com/techtips/java_pro/10MinuteSolutions/10min0500.asp
I haven't tried this. If you get this to work, please post again here.
Thanks.
|
|