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.  [ 2 posts ] 
Author Message
 Post subject: Setting the read only hint on JDBC connection
PostPosted: Thu Jul 27, 2006 2:28 pm 
Newbie

Joined: Tue Feb 07, 2006 10:43 am
Posts: 3
Hibernate version:3.1.1

Name and version of the database you are using: MySql 5.0.22

Jdbc driver:mysql connecter 3.1.13

I'm attemptiong to set up a slave mysql server in our satellite office to improve performance of database reads.
As instructed by mysql Connector I have supplied com.mysql.jdbc.ReplicationDriver as the driver class name in spring.
When readOnly is set to true on the provided connections provided it will connect to the slave instead of the master.

I easily added the read only hint to the Transaction however this is not getting carried on to the JDBC connection

I am unable to see at this point how to have Hibernate give this hint to the connection.

How can I set up hibernate to provide the readOnly hint to the JDBC Connection?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jul 28, 2006 4:18 am 
Regular
Regular

Joined: Wed May 05, 2004 3:41 pm
Posts: 118
Location: New Jersey,USA
You can access the Connection object and set the readOnly property. A similar post is at :

http://forum.hibernate.org/viewtopic.php?t=962639&highlight=


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