views:

343

answers:

1

http://localhost:8080/rtsclient/loginform.faces Url jnp://localhost:1099 Application Server Type jboss40 Datasource jdbc/ilogDataSource User rtsAdmin Password rtsAdmin

The above is for jboss. Now i have deployed RTS onto Sun Application Server. And i want to configure the jndi such that. My RTS client can actually access it.

How do i go about this? I asked this question here

http://forums.ilog.com/brms/index.php?topic=803.0

i know it is quite specific. But how to do it generally in sun application server?

+1  A: 

I think creating a jndi.properties file in your project root with the following should be enough.

org.omg.CORBA.ORBInitialHost=localhost
org.omg.CORBA.ORBInitialPort=1099
java.naming.security.principal=rtsAdmin
java.naming.security.credentials=rtsAdmin

There are also a few other things configurable if you need to

java.naming.provider.url=...
java.naming.factory.initial=...
java.naming.factory.initial=com.sun.enterprise.naming.SerialInitContextFactory
java.naming.factory.url.pkgs=com.sun.enterprise.naming
java.naming.factory.state=com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl

A less flexible method is also available. On startup provide the needed values to the InitialContext()-constructor as a Hashmap

Properties prop = new Properties();
prop.put(Context. ...., "...");
e.g.
prop.put(Context.SECURITY_PRINCIPAL, "rtsAdmin");
prop.put(Context.SECURITY_CREDENTIALS, "rtsAdmin");
InitialContext context = new InitialContext(prop);

Check here what you can set via the constructor

jitter