-->
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: proper place for Oracle annoyance fix
PostPosted: Fri Jul 03, 2009 9:27 am 
Newbie

Joined: Fri Jul 03, 2009 9:18 am
Posts: 2
I'm trying to find the right place to add some code to deal with an Oracle annoyance in a seam/ejb web app.

I've got some columns of type "TIMEZONE WITH LOCAL TIMESTAMP" and because of this I need to call setSessionTimezone on the underlying OracleConnection (mentioned in docs here) to set the connection's timezone to TimeZone.getDefault().getID() (way to go setting appropriate defaults Oracle...)

For now we've got a Hibernate interceptor jumping through hoops to do this (jndi lookup to get and ejb, persistence context is injected into ejb which then uses it to dig out the Oracle Connection) in the onPrepareStatement callback, but this seems like the wrong place to be doing this.

What I'm looking for is a place to do this that will get called once when a connection is being opened/prepared for use by a request, and wouldn't need an ejb or seam component to dig out the connection from a persistence context. So do you have any suggestions as to where this kind of code can be placed?


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.