• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
PostgresqlPlugIn useBundledJdbcInfo
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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



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

  • Follow-Ups:
    • Re: PostgresqlPlugIn useBundledJdbcInfo
      • From: Johann Werner <email@hidden>
  • Prev by Date: Re: Question about ERPDFWrapper
  • Next by Date: I try again
  • Previous by thread: Re: I try again
  • Next by thread: Re: PostgresqlPlugIn useBundledJdbcInfo
  • Index(es):
    • Date
    • Thread