-->
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.  [ 8 posts ] 
Author Message
 Post subject: no JNDI name configured - But not a problem
PostPosted: Tue Aug 03, 2004 6:03 pm 
Beginner
Beginner

Joined: Fri Jan 16, 2004 4:58 pm
Posts: 37
After I insert a new record I get

INFO: no JNDI name configured

But this, as INFO implies, isn't causing a problem. I am just curious as to what this is referring to.

Thanks.

_________________
Gregg Bolinger
Javaranch Sheriff
Weblog


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 03, 2004 6:08 pm 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
You didn't set a JNDI name for the SessionFactory, see the documentation.

_________________
JAVA PERSISTENCE WITH HIBERNATE
http://jpwh.org
Get the book, training, and consulting for your Hibernate team.


Top
 Profile  
 
 Post subject: Ok, but....
PostPosted: Tue Aug 03, 2004 6:30 pm 
Beginner
Beginner

Joined: Fri Jan 16, 2004 4:58 pm
Posts: 37
Well, In my hibernate.cfg.xml I have the following line:

Code:
<property name="connection.datasource">java:comp/env/jdbc/anykey</property>


Is this not the same thing? The only part I can find about binding a JNDI name in the docs is when it talks about the Hibernate Datasource Properties. BTW, I have read the Hibernate Reference Documentation. But if I am missing something in the documentation maybe you could specify which part of the documentation you are referring to.

Thanks.

_________________
Gregg Bolinger
Javaranch Sheriff
Weblog


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 03, 2004 11:43 pm 
Beginner
Beginner

Joined: Tue Jul 20, 2004 1:53 am
Posts: 43
Location: India
Most likely. he is referring to this part of the documentation.

_________________
Thanks,
Binil Thomas


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 03, 2004 11:52 pm 
Beginner
Beginner

Joined: Fri Jan 16, 2004 4:58 pm
Posts: 37
binil wrote:
Most likely. he is referring to this part of the documentation.


Yeah, I read that. But also notice it doesn't say how to do what it suggest doing. It would appear to me that this is something set in the hibernate.properties file however, I am not using one. So this is why it is unlcear to me what Christian and the documentation are talking about.

Thanks for the info though.

_________________
Gregg Bolinger
Javaranch Sheriff
Weblog


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 04, 2004 12:11 am 
Beginner
Beginner

Joined: Tue Jul 20, 2004 1:53 am
Posts: 43
Location: India
In section 3.8 of the manual, please notice the line :
Code:
    <!-- a SessionFactory instance listed as /jndi/name -->
    <session-factory name="java:comp/env/hibernate/SessionFactory">


Hibernate SessionFactory would be bound to the specified JNDI name. This is useful when Hibernate is used within a container.

I could'nt get this working well though. :(

Please see these FAQ entries.

_________________
Thanks,
Binil Thomas


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 04, 2004 12:16 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 3:00 pm
Posts: 1816
Location: Austin, TX
Well the message and the documentation pointed at state it pretty clearly, I think. But just to reiterate (since I have nothing better to do):

The Hibernate SessionFactory has the ability to bind itself into JNDI so that the application can later reference it from there. In order to do so, one would set the "hibernate.session_factory_name" config property.

P.S., in case you did not know/realize: every config option available in the properties file is also available in the xml config via the <property/> element. This one even has a shortcut: <session-factory name="wherever/in/the/hell/you/want/this/to/show/up/in/jndi">


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 04, 2004 8:49 am 
Beginner
Beginner

Joined: Fri Jan 16, 2004 4:58 pm
Posts: 37
Ok, all clear now. Thanks.

_________________
Gregg Bolinger
Javaranch Sheriff
Weblog


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 8 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.