-->
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: PreparedStatement caching with nonstandard connection pool?
PostPosted: Tue Mar 01, 2005 4:40 pm 
Newbie

Joined: Thu Jan 06, 2005 4:25 pm
Posts: 12
Location: Redwood City, CA
Hi,

My question involves the caching of prepared statements, which always seems like something of a mystery.

Here's the background: My workgroup has never used either an O/R mapping tool or a J2EE container. We write JDBC, and we have a custom built connection pool that does not conform to any standard JDBC interface. Since no other connection pool was available in my environment and since I wanted to introduce Hibernate with a minimum of disruption, I modified the custom pool to implement the Hibernate ConnectionProvider interface, and passed it to Hibernate as a data source.

Here's the rub: my custom pool caches prepared statements, and it has explicit functions for getting and saving prepared statements. Obviously Hibernate isn't calling these functions since it doesn't know about them.

Does this mean that there is no caching of prepared statements? I have long assumed that this happened automatically at the level of the JDBC driver; I use Oracle, and have a fairly recent version of the thin driver in my environment. I've never seen anyone explicitly cache prepared statements before, so I figured that this was simply handled automatically by the JDBC driver. But I suppose it could be that it is normally handled by a J2EE container's connection pool, the benefits of which aren't available to me in this situation.

Any feedback would be appreciated, thanks.

Frank


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.