Hello everyone,
Currently I work with these tools :
Glassfish 3.1.1
Hibernate 4.0.1 Final
I try to configure JNDI in the configuration file
hibernate.cfg.xml that I can retrieve a DataSource from an another application server. To do this, I would like to change my JNDI environment.
The issue is that I can't change the JNDI environment (InitialContext). It's always local host.
I try many things like :
Code:
<session-factory>
<!-- Database connection settings -->
<property name="connection.datasource">jdbc/projetProg</property>
<property name="java.naming.factory.initial">com.sun.enterprise.naming.SerialInitContextFactory</property>
<property name="java.naming.factory.url.pkgs">com.sun.enterprise.naming</property>
<property name="java.naming.factory.state">com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl</property>
<property name="jndi.org.omg.CORBA.ORBInitialHost">192.168.1.2</property>
<property name="jndi.org.omg.CORBA.ORBInitialPort">3700</property>
<property name="connection.username">****</property>
<property name="connection.password">****</property>
<!-- SQL dialect -->
<property name="dialect">org.hibernate.dialect.Oracle10gDialect</property>
<!-- Echo all executed SQL to stdout -->
<property name="show_sql">true</property>
<mapping resource="conf/person.hbm.xml"/>
</session-factory>
Or again
Code:
<property name="connection.datasource">jdbc/projetProg</property>
<property name="jndi.url">iiop://192.168.1.2:3700/</property>
Anyone for a solution?
Thank you.
GeiserA