-->
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.  [ 1 post ] 
Author Message
 Post subject: Various questions
PostPosted: Mon Sep 04, 2006 9:52 am 
Newbie

Joined: Fri Aug 04, 2006 6:09 am
Posts: 18
Hi,

apologies for the seeming randomness of my questions but I have succesfully integrated Hibernate into my app and there were a bunch of questions i had but no one to ask and I was not able to find it in the docs:

Here's my hibernate.cfg.xml file:


Code:
<hibernate-configuration>
   <session-factory>
      <property name="hibernate.connection.driver_class">
         oracle.jdbc.driver.OracleDriver
      </property>
      <property name="hibernate.connection.password">@db.password@</property>
      <property name="hibernate.connection.url">
         jdbc:oracle:thin:@@db.servername@:@db.port@:@db.sid@
      </property>
      <property name="hibernate.connection.username">@db.username@</property>
      <property name="hibernate.default_schema">
         APP_DATA
      </property>
      <property name="hibernate.dialect">
         org.hibernate.dialect.OracleDialect
      </property>
      <property name="hibernate.show_sql">true</property>
      <property name="hibernate.jdbc.fetch_size">50</property>
      <property name="hibernate.connection.pool_size">0</property>

      <!-- mapping files -->
      <mapping resource="com/acme/ifst/domain/Country.hbm.xml" />
      <mapping resource="com/acme/ifst/domain/Occupation.hbm.xml" />
      <mapping resource="com/acme/ifst/domain/Industry.hbm.xml" />
      <mapping resource="com/acme/ifst/domain/HoldMail.hbm.xml"/>
      <mapping resource="com/acme/ifst/domain/DocumentType.hbm.xml"/>
      <mapping resource="com/acme/ifst/domain/PartyType.hbm.xml"/>
   </session-factory>
</hibernate-configuration>


1. Is the connection pooling OFF from Hibernates perspective? I need it to be because pooling is done at a driver level. I read there was an internal connection pool that could be used in no other one was specified.
2. The hibernate.jdbc.fetch_size value affects how many rows are returned in each db round trip? So if i want to 200 rows and the value is 50, there will be 4 round trips?
3. Do i need to explicitly turn auto-commit OFF? I am using Spring's HibernateTransactionManager.
4. Is there some way to dynamically find the class mapping files instead of declaring them?
5. How do I enable caching? And more importantly, flush the cache programmatically whenever i need to?

Thanks

R


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

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.