ERXObjectStoreCoordinator and database channels
ERXObjectStoreCoordinator and database channels
- Subject: ERXObjectStoreCoordinator and database channels
- From: Jarosław Barcewicz <email@hidden>
- Date: Fri, 17 Apr 2009 16:38:59 +0200
Hi,
I have application that allows user to make searches over database that
can last for few minutes. Using WOLongResponsePage user can see some
time counting :D when his query is executed. Query is custom created and
fired by EOUtilities.rawRowsForSQL. Problem is, that new user (new
session just created) cannot log in even see start page.
I've tried some solutions passed here. One that works is to create
ERXObjectStoreCoordinator per session. This works, but when I was
testing it simulating many users (about 100) database connection pool
ends and application still wanted to create new ones. In session
constructor I use:
ERXObjectStoreCoordinator objectStoreCoordinator = new
ERXObjectStoreCoordinator();
EOEditingContext editingContext = ERXEC.newEditingContext();
setDefaultEditingContext(editingContext)
If I don't create ERXObjectStoreCoordinator, new user with new session
cannot use db during database channel is occupied by searching thread
and new db channel is not created. I thought that database connections
are created when all from pool are busy, when some are free - session
uses them. How to manage such situation, maybe I misunderstand something?
I tried to follow the instruction of Miguel Arroz from
http://terminalapp.net/dr-optimistic-locking/ but setting
er.extensions.ERXObjectStoreCoordinatorPool.maxCoordinators to some
value changes nothing.
Could you explain me how to use, in simplest case,
ERXObjectStoreCoordinatorPool, ERXObjectStoreCoordinator and
ERXObjectStoreCoordinatorSynchronizer? I can't figure out how to use
them together.
Thanks in advance, :D
Jarek
--
Jaroslaw Barcewicz
Software Developer
Power Media S.A.
http://www.power.com.pl
District Court for Wroclaw-Fabryczna
KRS: 0000281947
NIP: PL-898-16-47-572
Capital stock: 640 000 PLN
_______________________________________________
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