-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: [HowTo] Configure JNDI for an another application server
PostPosted: Sun Feb 26, 2012 4:51 pm 
Newbie

Joined: Fri Feb 24, 2012 1:00 pm
Posts: 2
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


Top
 Profile  
 
 Post subject: Re: [HowTo] Configure JNDI for an another application server
PostPosted: Fri May 25, 2012 3:05 pm 
Newbie

Joined: Fri May 25, 2012 1:58 pm
Posts: 3
Hi,

I saw your post about configuring JNDI. Did you find an answer to this? I have the same question and was wondering if you could please help me with this: viewtopic.php?f=1&t=1015607

Many thanks
Anu


Top
 Profile  
 
 Post subject: Re: [HowTo] Configure JNDI for an another application server
PostPosted: Fri Jun 22, 2012 9:59 am 
Newbie

Joined: Fri May 25, 2012 1:58 pm
Posts: 3
Hi jamess1

Thanks.. can you please share the solution. Thanks a bunch!

A


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.