Re: PostgresqlPlugIn useBundledJdbcInfo
Re: PostgresqlPlugIn useBundledJdbcInfo
- Subject: Re: PostgresqlPlugIn useBundledJdbcInfo
- From: Johann Werner <email@hidden>
- Date: Tue, 04 Sep 2012 11:35:51 +0200
You should make a pull request :-)
Am 04.09.2012 um 11:10 schrieb Benoit Havret <email@hidden>:
> Hi!
>
> I'm using Postgres, recently I started using ERXModelGroup to set connections dictionaries for my eomodels. Looking at the connections in Postgres I noticed several IDDLE IN TRANSACTION connections while I had specified useBundledJdbcInfo=true in dbConnectURLGLOBAL
>
> My dbConnectURLGLOBAL looks like this
> dbConnectURLGLOBAL=jdbc:postgresql://localhost/databese?useBundledJdbcInfo=true&useUnicode=false&characterEncoding=UTF-8
>
>
> Looking around in PostgresqlPlugIn.java I found the cause in method shouldUseBundledJdbcInfo()
>
> shouldUseBundledJdbcInfo = url.toLowerCase().matches(".*(\\?|\\?.*&)" + PostgresqlPlugIn.QUERY_STRING_USE_BUNDLED_JDBC_INFO.toLowerCase() + "=(true|yes)(\\&|$)");
>
> The regex is only works for urls having one parameter (useBundledJdbcInfo)
>
>
> I replaced it by a matcher and voila!
> Matcher matcher = Pattern.compile(PostgresqlPlugIn.QUERY_STRING_USE_BUNDLED_JDBC_INFO.toLowerCase() + "=(true|yes)").matcher(url.toLowerCase());
> shouldUseBundledJdbcInfo = matcher.find();
>
>
> Bonne journée
>
>
>
> Benoit Havret
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden