-->
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: Hibernate configuration for weblogic server
PostPosted: Mon Mar 07, 2005 5:51 am 
Newbie

Joined: Sat Mar 05, 2005 7:11 am
Posts: 3
Read the rules before posting!
http://www.hibernate.org/ForumMailingli ... AskForHelp

Hibernate version:
Hibernate 3.0rc1

Mapping documents:

The hibernate properties given include:

# hibernate.c3p0.timeout (in seconds) hibernate.c3p0.idle_test_period(in seconds)
hibernate.c3p0.max_size 100
hibernate.c3p0.min_size 10

#The seconds a Connection can remain pooled but unused before being discarded. Zero means idle connections never expire
hibernate.c3p0.timeout 0

#The size of c3p0's PreparedStatement cache. Zero means statement caching is turned off.
hibernate.c3p0.max_statements 0

#If idle_test_period is greater than 0, c3p0 will test all idle, pooled but unchecked-out connections, every this number of seconds.
hibernate.c3p0.idle_test_period 100
hibernate.c3p0.acquire_increment 1
#DEPRECATED
#hibernate.c3p0.validate false

#For use inside an application server, you should almost always configure Hibernate to obtain connections from an application server Datasource registered in JNDI.
#datasource JNDI name.
hibernate.connection.datasource = java:/comp/env/jdbc/test
#The classname of a TransactionFactory to use with Hibernate Transaction API (defaults to JDBCTransactionFactory).
hibernate.transaction.factory_class = org.hibernate.transaction.JTATransactionFactory

#The classname of a TransactionManagerLookup - required when JVM-level caching is enabled in a JTA environment
hibernate.transaction.manager_lookup_class org.hibernate.transaction.WeblogicTransactionManagerLookup

Code between sessionFactory.openSession() and session.close():

Full stack trace of any exception that occurs:

Name and version of the database you are using:

Oracle 9i
The generated SQL (show_sql=true):

Debug level Hibernate log excerpt:


Top
 Profile  
 
 Post subject:
PostPosted: Tue Mar 08, 2005 1:22 pm 
Regular
Regular

Joined: Tue Jan 11, 2005 8:55 pm
Posts: 53
If you are trying to use Weblogic (or any other application server), you need to:

1. Set up a JNDI datasource in Weblogic. So use the Weblogic console to set the datasource and JDBC connection.

2. You need to tell Hibernate where this datasource is and the JNDI name where a JTA User Transaction can be obtained. So modify the hibernate config file and specify:
a. Specify JNDI datasource connection
b. Specify Transaction Management Property
c. Specify Transaction Factory class


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 03, 2005 1:27 pm 
Newbie

Joined: Tue May 03, 2005 1:13 pm
Posts: 1
Hello,

I have the same question, and after reading your answer

- I've created a JNDI datasource in weblo
- Using xdoclet, I created my hibernateconfig.xml with the weblogic datasource

"<!-- a SessionFactory instance listed as /jndi/name -->
<session-factory>
<!-- properties -->
<property name="connection.datasource">java:/jdbc/MyConnectionPoolDS
</property>
<property name="dialect">net.sf.hibernate.dialect.Oracle9Dialect
</property>
..."

How to specify the transaction factory and management property with xdoclet?

I have this error :
"SEVERE: Could not find datasource: java:/jdbc/MyConnectionPoolDS"

Thanx


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:
cron
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.