You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Jiří Mareš <Ji...@svt.cz> on 2005/01/26 10:08:37 UTC
DBCP: DBCPConnectionProvider in Hibernate
Hi,
I have big problem with the DBCP connection provider for Hibernate, because the provider is not propagating the value of
the parameter "hibernate.dbcp.accessToUnderlyingConnectionAllowed" into the pool?
--
Jiří Mareš (mailto:Jiri.Mares@svt.cz)
ČSAD SVT Praha, s.r.o. (http://www.svt.cz)
Czech Republic
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org
Re: DBCP: DBCPConnectionProvider in Hibernate
Posted by Dirk Verbeeck <di...@pandora.be>.
I have implemented my own DBCPConnectionProvider as an example how to
integrate DBCP with Hibernate. It supports all DBCP features. You can
find the source here:
http://wiki.apache.org/jakarta-commons/DBCP/Hibernate
It is not part of the official Apache DBCP release but it had some
independent testing. Let me know it works for you.
-- Dirk
Jiří Mareš wrote:
>
> Hi,
>
> I have big problem with the DBCP connection provider for Hibernate,
> because the provider is not propagating the value of the parameter
> "hibernate.dbcp.accessToUnderlyingConnectionAllowed" into the pool?
>
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org
Re: DBCP: DBCPConnectionProvider in Hibernate
Posted by Jiří Mareš <Ji...@svt.cz>.
Just for inspiration, here is fragment of my new configure method:
...
// Finally, we create the PoolingDriver itself,
// passing in the object pool we created.
ds = new PoolingDataSource(connectionPool);
// ---- HERE BEGINS MY CODE ----
if (props.getProperty("hibernate.dbcp.accessToUnderlyingConnectionAllowed") != null) {
// We'll set up the accessToUnderlyingConnectionAllowed property
boolean allows = PropertiesHelper.getBoolean("hibernate.dbcp.accessToUnderlyingConnectionAllowed", props, false);
if (allows) {
log.info("DBCP allows access to underlying connection");
} else {
log.info("DBCP doesn't allow access to underlying connection");
}
((PoolingDataSource) ds).setAccessToUnderlyingConnectionAllowed(allows);
}
// ---- HERE ENDS MY CODE ----
....
Jiří Mareš wrote:
>
>
> Hi,
>
> I have big problem with the DBCP connection provider for Hibernate,
> because the provider is not propagating the value of the parameter
> "hibernate.dbcp.accessToUnderlyingConnectionAllowed" into the pool?
>
--
Jiří Mareš (mailto:Jiri.Mares@svt.cz)
ČSAD SVT Praha, s.r.o. (http://www.svt.cz)
Czech Republic
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org
Re: DBCP: DBCPConnectionProvider in Hibernate
Posted by David Graham <gr...@yahoo.com>.
Hibernate has officially deprecated support for DBCP and will remove it in
a future release. They suggest using C3P0 or Proxool instead. C3P0 has
worked great for me.
http://sourceforge.net/projects/c3p0
http://proxool.sourceforge.net/
David
--- Jiří Mareš <Ji...@svt.cz> wrote:
>
> Hi,
>
> I have big problem with the DBCP connection provider for Hibernate,
> because the provider is not propagating the value of
> the parameter "hibernate.dbcp.accessToUnderlyingConnectionAllowed" into
> the pool?
>
> --
> Jiří Mareš (mailto:Jiri.Mares@svt.cz)
> ČSAD SVT Praha, s.r.o. (http://www.svt.cz)
> Czech Republic
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>
>
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org