-->
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: Rac configuration in hibernate
PostPosted: Wed Aug 14, 2013 1:20 am 
Newbie

Joined: Fri Jan 25, 2013 3:25 am
Posts: 5
Hi all,

Any body please tell me the step by step process to connect to RAC(oracle 11g) through hibernate.
I am also using DBCP connection pool.

Thanks in Advance.


Top
 Profile  
 
 Post subject: Re: Rac configuration in hibernate
PostPosted: Wed Aug 14, 2013 5:06 am 
Senior
Senior

Joined: Tue Oct 28, 2008 10:39 am
Posts: 196
In our JBoss-Datasource:

<connection-url>jdbc:oracle:thin:@(description=(address_list=(address=(host=xx-db1)(protocol=tcp)(port=1521))(address=(host=xx-db2)(protocol=tcp)(port=1521))(load_balance=yes)(failover=yes))(connect_data=(service_name=XX.YY.ZZ)))</connection-url>


Top
 Profile  
 
 Post subject: Re: Rac configuration in hibernate
PostPosted: Wed Aug 14, 2013 5:49 am 
Newbie

Joined: Fri Jan 25, 2013 3:25 am
Posts: 5
Dear CDillinger.

Thanks for your reply.

In hibernate configuration file i modified mu url like below
<property name="connection.url">jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=host1)(PORT=1521))(ADDRESS=(PROTOCOL=TCP)(HOST=host2)(PORT=1521)))(LOAD_BALANCE=yes)(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)))</property>

So i can able to create session.
But when i am trying to begin transaction it throwing an exception like "can not open connection".

But at the same time my sample jdbc program is working fine with the above url pattern with out using hibernate.


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.