• 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
Re: ERXJDBCConnectionAnalyser and Connections Exhausted!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ERXJDBCConnectionAnalyser and Connections Exhausted!


  • Subject: Re: ERXJDBCConnectionAnalyser and Connections Exhausted!
  • From: Farrukh Ijaz <email@hidden>
  • Date: Thu, 28 Oct 2010 21:17:25 +0300

Hi Chuck,

I have changed the code and am using ERXJDBCConnectionBroker to test the database connectivity and it's serving the purpose very well.

Thanks,

Farrukh

Sent from my iPad

On 28-Oct-2010, at 8:01 PM, Chuck Hill <email@hidden> wrote:

> I wrote it to debug a failure to connect so this was never a concern - the JVM exited right after this.  It was NOT intended to be used how you are using it.  It is intended to debug configuration issues.
>
> Closing this connection is non-trivial.
>
> For what I think this is doing, you would be better off making a simple fetch of an entity that you know is there.
>
>
> Chuck
>
>
> On Oct 28, 2010, at 5:38 AM, Farrukh Ijaz wrote:
>
>> Hi Gurus,
>>
>> How can I release the JDBC connection that is hooked by ERXJDBCConnectionAnalyser class?
>>
>> I've defined following properties:
>>
>> er.extensions.ERXJDBCAdaptor.useConnectionBroker = true
>>
>> dbMinConnectionsGLOBAL=1
>> dbMaxConnectionsGLOBAL=5
>> dbMaxCheckoutGLOBAL=600
>> dbDebugLevelGLOBAL=3
>>
>> I've following code being called one of my direct actions for testing purpose:
>>
>> public WOActionResults monitorAction() {
>>    NSMutableDictionary<String, String> dictStatus = new NSMutableDictionary<String, String>();
>>    for (EOModel m : EOModelGroup.defaultGroup().models()) {
>>        ERXJDBCConnectionAnalyzer ca = new ERXJDBCConnectionAnalyzer(m);
>>        try {
>>            ca.testConnection();
>>            dictStatus.put(m.name(), "OK");
>>        } catch (Throwable t) {
>>            dictStatus.put(m.name(), "Error: " + t.getMessage());
>>        }
>>    }
>>    WOComponent page = pageWithName(Monitor.class.getName());
>>    page.takeValueForKey(dictStatus, "dictStatus");
>>    return page;
>> }
>>
>> If I set the useConnectionBroker property to "false", it works okay. Otherwise I get following exception.
>>
>> er.transaction.adaptor.ConnectionAnalyzer (ERXJDBCConnectionAnalyzer.java:84)  - Checking JDBC connection with information {minConnections = "1"; ... ... ... ... ... ...
>> 2010-10-28 15:33:39,297 INFO  XXXXXXXX[-:12345 0] er.transaction.adaptor.ConnectionAnalyzer (ERXJDBCConnectionAnalyzer.java:105)  - Trying to create JDBCAdaptor...
>> 2010-10-28 15:33:39,297 INFO  XXXXXXXX[-:12345 0] er.transaction.adaptor.ConnectionAnalyzer (ERXJDBCConnectionAnalyzer.java:115)  - Successfully created adaptor er.extensions.jdbc.ERXJDBCAdaptor
>> 2010-10-28 15:33:39,298 INFO  XXXXXXXX[-:12345 0] er.transaction.adaptor.ConnectionAnalyzer (ERXJDBCConnectionAnalyzer.java:126)  - Trying to create plugin...
>> 2010-10-28 15:33:39,298 INFO  XXXXXXXX[-:12345 0] er.transaction.adaptor.ConnectionAnalyzer (ERXJDBCConnectionAnalyzer.java:131)  - Created plugin com.webobjects.jdbcadaptor.PostgresqlPlugIn
>> 2010-10-28 15:33:39,298 INFO  XXXXXXXX[-:12345 0] er.transaction.adaptor.ConnectionAnalyzer (ERXJDBCConnectionAnalyzer.java:170)  - Trying to load JDBC driver org.postgresql.Driver...
>> 2010-10-28 15:33:39,299 INFO  XXXXXXXX[-:12345 0] er.transaction.adaptor.ConnectionAnalyzer (ERXJDBCConnectionAnalyzer.java:183)  - Successfully loaded JDBC driver org.postgresql.Driver
>> 2010-10-28 15:33:39,299 INFO  XXXXXXXX[-:12345 0] er.transaction.adaptor.ConnectionAnalyzer (ERXJDBCConnectionAnalyzer.java:192)  - JDBC driver and plugin are loaded, trying to connect...
>> 2010-10-28 15:33:41,299 WARN  XXXXXXXX[-:12345 0] er.extensions.jdbc.ERXJDBCConnectionBroker (ERXJDBCConnectionBroker.java:368)  - Connections Exhausted! Will wait and try again in loop 0
>> 2010-10-28 15:33:43,300 WARN  XXXXXXXX[-:12345 0] er.extensions.jdbc.ERXJDBCConnectionBroker (ERXJDBCConnectionBroker.java:368)  - Connections Exhausted! Will wait and try again in loop 1
>> 2010-10-28 15:33:45,301 WARN  XXXXXXXX[-:12345 0] er.extensions.jdbc.ERXJDBCConnectionBroker (ERXJDBCConnectionBroker.java:368)  - Connections Exhausted! Will wait and try again in loop 2
>>
>> How can I enforce ERXJDBCConnectionAnalyser to release connection?
>>
>> Thanks,
>>
>> Farrukh
>> _______________________________________________
>> 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
>
> --
> Chuck Hill             Senior Consultant / VP Development
>
> Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems.
> http://www.global-village.net/products/practical_webobjects
>
>
>
>
>
>
>
 _______________________________________________
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

References: 
 >ERXJDBCConnectionAnalyser and Connections Exhausted! (From: Farrukh Ijaz <email@hidden>)
 >Re: ERXJDBCConnectionAnalyser and Connections Exhausted! (From: Chuck Hill <email@hidden>)

  • Prev by Date: attribute conversion
  • Next by Date: parent component content modification
  • Previous by thread: Re: ERXJDBCConnectionAnalyser and Connections Exhausted!
  • Next by thread: Session times out even though I am doing auto refresh?
  • Index(es):
    • Date
    • Thread