-->
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: Making Hibernate retry on node failure with Oracle FCF
PostPosted: Thu Feb 05, 2009 12:04 pm 
Newbie

Joined: Wed Apr 05, 2006 5:58 pm
Posts: 13
I'm working on an Oracle 11g RAC. We're going to start using FCF. It's my understanding, that in order to make a node failure invisible to the application, the application must detect that the node failed while the application is doing work on the connection, and retry its work. When it gets a new connection from the pool, it will be from a good node because the bad node's connections will have been reaped.

Of course, I'd like to implement this so that it's invisible to the actual application code. My first thought was to write a custom implementation of Session. This custom implementation would delegate work to the normal SessionImpl, but wrap calls in a try{} catch{} and if it detects a connecton problem, it would reconnect the session (getting a good connection) open a transaction (when necessary) and re-execute the method. However, it would appear that I would need to create my own SessionFactory implementation to get my session implementation that knows how to retry. Additionally, I would need to resolve the fact that AnnotationConfiguration generates SessionFactoryImpl's, and I would want it to generate my new implementation that can generating my retrying session implementation.

An alternative approach would be to avoid writing implementations of hibernate interfaces, but use AOP to grab the exceptions, and retry as appropriate.

I'm looking for any information about recommended strategies for handling the retry when using hibernate. I'd also be interested in hearing other approaches, or if there is a better way to do my first approach.

Thank you
Greg


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.