PostgresqlPlugIn useBundledJdbcInfo
PostgresqlPlugIn useBundledJdbcInfo
- Subject: PostgresqlPlugIn useBundledJdbcInfo
- From: Benoit Havret <email@hidden>
- Date: Tue, 04 Sep 2012 11:10:15 +0200
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
|
_______________________________________________
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