Does anyone have any suggestions on this one?
----- Forwarded by Adam R Esterline/msi on 11/14/00 04:53 PM -----
Amit Likhyani
<amit@greathi To: [EMAIL PROTECTED]
lls.com> cc:
Subject: Re: Can't get initial context
from a different machine
11/14/00
02:44 PM
Adam,
Thanks for trying to help me with this. I must just be dense. I have
included my client code, my java
policy file and my deploy.properties file. Maybe you can see what I am
doing wrong.
Amit
PS Thanks again
#
#Tue Oct 17 18:09:39 CDT 2000
ejipt.storeName=default
ejipt.loginSessionHomeName=default.LoginSessionHome
ejipt.users=spender1\:pass;spender2\:pass;saver1\:pass;saver2\:pass;chief\:pass
ejipt.userHomeName=default.UserHome
#ejipt.classServer.host=localhost
ejipt.roleHomeName=default.RoleHome
ejipt.roles=spender\:spender1,spender2,chief;saver\:saver1,saver2,chief
ejipt.ejbJars=ConsumerMasterNoDBEJB.jar,ConsumerMasterEJB.jar,sample1a_ejb.jar
import CRUD.*;
import java.rmi.*;
import java.util.*;
import javax.ejb.*;
import javax.naming.*;
import java.io.*;
public class DoesNotWork {
static
{
System.setSecurityManager(new RMISecurityManager());
}
private Context _context = null;
public DoesNotWork() {}
public ConsumerMaster getConsumerMaster() {
ConsumerMaster consumerMaster = null;
Properties properties = new Properties();
properties.setProperty( Context.INITIAL_CONTEXT_FACTORY,
"allaire.ejipt.ContextFactory");
properties.setProperty( Context.PROVIDER_URL,
"ejipt://172.16.16.221:2323");
properties.setProperty(Context.SECURITY_PRINCIPAL, "spender1" );
properties.setProperty(Context.SECURITY_CREDENTIALS, "pass" );
try
{
_context = new InitialContext(properties);
ConsumerMasterHome home = ( ConsumerMasterHome )_context.lookup(
"CRUD.ConsumerMasterHome" );
consumerMaster = ( ConsumerMaster ) home.create();
}
catch (AuthenticationException authentication)
{
System.out.println( authentication );
}
catch (Exception e)
{
System.out.println( e );
throw new RuntimeException("Failed to connect to server");
}
finally {
}
return consumerMaster;
}
public static void main(String[] args) {
DoesNotWork junk = new DoesNotWork();
ConsumerMaster consumerMaster = junk.getConsumerMaster();
}
}
grant {
permission java.security.AllPermission;
permission java.net.SocketPermission "172.16.16.221:2323", "connect";
};
------------------------------------------------------------------------------
Archives: http://www.egroups.com/group/jrun-interest/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/jrun_talk
or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the
body.