I have a Session Bean. sun-ejb-jar.xml :
.....
<ejb>
<ejb-name>SSFBean</ejb-name>
<jndi-name>ejb/SSFBean</jndi-name>
<ior-security-config>
<transport-config>
<integrity>REQUIRED</integrity>
<confidentiality>REQUIRED</confidentiality>
<establish-trust-in-target>SUPPORTED</establish-trust-in-target>
<establish-trust-in-client>NONE</establish-trust-in-client>
</transport-config>
<as-context>
<auth-method>USERNAME_PASSWORD</auth-method>
<realm>default</realm>
<required>true</required>
</as-context>
<sas-context>
<caller-propagation>NONE</caller-propagation>
</sas-context>
</ior-security-config>
</ejb>
.....
And Client EJB:
Properties properties = new Properties();
properties.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.cosnaming.CNCtxFactory");
properties.put(Context.PROVIDER_URL, "iiop://localhost:3820");
properties.put(Context.SECURITY_AUTHENTICATION, "simple");
properties.put(Context.SECURITY_PRINCIPAL, "manager");
properties.put(Context.SECURITY_CREDENTIALS, "manager");
try {
Context context = new InitialContext(properties);//properties
Object object = context.lookup("ejb/SSFBean");
SSFRemoteHome home =
(SSFRemoteHome)PortableRemoteObject.narrow(object, SSFRemoteHome.class);
SSFRemote ssf = home.create();
int sum = ssf.sum(2, 3);
On RUN:
Exception : "Cannot connect to ORB"
It would be great if someone could help me!