• 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: Connection Pooling problems
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Connection Pooling problems


  • Subject: Re: Connection Pooling problems
  • From: Tim Kliewer <email@hidden>
  • Date: Thu, 10 Feb 2011 17:39:37 -0800

Hi All,

I have no solution to this issue yet.
Let me give some more details.

The sequence does exist.  It works fine when the connection broker is not enabled.

In either case, there are several select statements that work fine, as expected, before a new EO needs to be created.
Its only when the connection broker is enabled that a null connection is used when performing the SQL: 
SELECT Product_SEQ.NEXTVAL FROM DUAL.  My example only shows it for Product, but I have noticed it with other Entities.

I suspect this is an ORACLE specific WO code issue when getting new primary keys.
I have implemented another connectionPooling solution using the stock ProjectWonder connectionBroker, but I would prefer getting this working properly!

I will continue to investigate on my own as time permits, but if someone has a solution, I'll gladly learn from their knowledge!

TNK


On Feb 3, 2011, at 3:06 PM, Tim Kliewer wrote:

Using WO 5.4.3
Project Wonder - HEAD as of Feb 3
Setting and console out below:

I'm attempting to enable connection pooling in one of my groups applications.
We are successfully using OSC pooling.  We need other connections for (Oracle) stored procedures and I would prefer to use connections we already have from the pool, if we can turn that feature on.

I have set the properties according to notes I have seen on this list and documents on the wiki.
I have ensured that every editing context we request uses the ERXEC.newEditingContext method, but I am checking yet again.

My trouble is an exception thrown when attempting to use the checked-out connection.  I have traced this to a call on a null Connection object. When I have seen this before, it was because the EC was generated by "new EOEditingContext()".  
Does anyone have another tip to find this "disconnect"?

TNK

Property settings:
# Implement database connection pooling
# Testing ERXObjectStoreCoordinatorPool at 3 connections
er.extensions.ERXObjectStoreCoordinatorPool.maxCoordinators = 3

er.extensions.ERXJDBCAdaptor.className=er.extensions.jdbc.ERXJDBCAdaptor
er.extensions.ERXJDBCAdaptor.useConnectionBroker = true

IndigoDB.DBMinConnections=1
IndigoDB.DBMaxConnections=5

dbMinConnectionsGLOBAL=1
dbMaxConnectionsGLOBAL=5


console output:
68830 [To /0:0:0:0:0:0:0:1%0:60086] DEBUG NSLog  -  === Begin Internal Transaction
68830 [To /0:0:0:0:0:0:0:1%0:60086] DEBUG NSLog  -  evaluateExpression: <com.webobjects.jdbcadaptor.OraclePlugIn$OracleExpression: "SELECT Product_SEQ.NEXTVAL FROM DUAL" withBindings: >
68830 [To /0:0:0:0:0:0:0:1%0:60086] INFO er.transaction.adaptor.Exceptions  - Database Exception occured: java.lang.NullPointerException
68834 [To /0:0:0:0:0:0:0:1%0:60086] DEBUG NSLog  -  === Rollback Internal Transaction
E. 2011/02/03 13:51:00. null
java.lang.NullPointerException
at com.webobjects.jdbcadaptor.JDBCChannel._bindInputVariablesWithBindingsAndExecute(JDBCChannel.java:268)
at com.webobjects.jdbcadaptor.JDBCChannel._evaluateExpression(JDBCChannel.java:337)
at com.webobjects.jdbcadaptor.JDBCChannel.evaluateExpression(JDBCChannel.java:296)
at er.extensions.jdbc.ERXJDBCAdaptor$Channel.evaluateExpression(ERXJDBCAdaptor.java:236)
at com.webobjects.jdbcadaptor.JDBCChannel._fetchRowsForSQLExpressionAndAttributes(JDBCChannel.java:562)
at com.webobjects.jdbcadaptor.OraclePlugIn._newPrimaryKey(OraclePlugIn.java:472)
at com.webobjects.jdbcadaptor.OraclePlugIn.newPrimaryKeys(OraclePlugIn.java:438)
at er.extensions.jdbc.ERXJDBCAdaptor$Channel.primaryKeysForNewRowsWithEntity(ERXJDBCAdaptor.java:214)
at com.webobjects.eoaccess.EODatabaseContext._batchNewPrimaryKeysWithEntity(EODatabaseContext.java:5728)
at com.webobjects.eoaccess.EODatabaseContext.prepareForSaveWithCoordinator(EODatabaseContext.java:5711)
at com.webobjects.eocontrol.EOObjectStoreCoordinator.saveChangesInEditingContext(EOObjectStoreCoordinator.java:370)
at com.webobjects.eocontrol.EOEditingContext.saveChanges(EOEditingContext.java:3192)
at er.extensions.eof.ERXEC._saveChanges(ERXEC.java:1085)
at er.extensions.eof.ERXEC.saveChanges(ERXEC.java:1007)



Tim Kliewer
WWBI Software Engineering
 Apple, Sacramento Operations
MS: 204-50 Tel: (916) 399-5101
2911 Laguna Blvd Cell: (916) 717-8748
Elk Grove, CA 95758 E-mail: email@hidden



Tim Kliewer
WWBI Software Engineering
 Apple, Sacramento Operations
MS: 204-50 Tel: (916) 399-5101
2911 Laguna Blvd Cell: (916) 717-8748
Elk Grove, CA 95758 E-mail: email@hidden



 _______________________________________________
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: 
 >Connection Pooling problems (From: Tim Kliewer <email@hidden>)

  • Prev by Date: Re: Malformed Cookies and WO
  • Next by Date: Re: Malformed Cookies and WO
  • Previous by thread: Connection Pooling problems
  • Next by thread: [D2W] Conditionally changing property level components
  • Index(es):
    • Date
    • Thread