• 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: ERXObjectStoreCoordinator and database channels
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ERXObjectStoreCoordinator and database channels


  • Subject: Re: ERXObjectStoreCoordinator and database channels
  • From: Chuck Hill <email@hidden>
  • Date: Fri, 17 Apr 2009 10:10:34 -0700


On Apr 17, 2009, at 7:38 AM, Jarosław Barcewicz wrote:

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.

If you are dispatching requests concurrently, they should at least be able to get to the start page. But that won't be of any benefit.



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)

Yes, that can have bad results with memory usage and database connection usage.



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?

The above code automatically creates new ones. You will probably be better off creating a pool for the long running searches and leave the normal session processing untouched.



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.

Does you Application extend ERXApplication and Session extend ERXSession?




Could you explain me how to use, in simplest case, ERXObjectStoreCoordinatorPool, ERXObjectStoreCoordinator and ERXObjectStoreCoordinatorSynchronizer? I can't figure out how to use them together.

I don't use those, but managing a simple pool yourself for the long running searches might be easier. Even if you use ERXObjectStoreCoordinatorPool, you are still going to want a new EOF stack for the long searches. You should probably concentrate on that problem first.



Chuck



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


-- 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: 
 >ERXObjectStoreCoordinator and database channels (From: JarosÅ‚aw Barcewicz <email@hidden>)

  • Prev by Date: JavaClient: does the eomodel file need to be included with the client app?
  • Next by Date: Re: Multiple instances of WOA's deployed as WAR's
  • Previous by thread: ERXObjectStoreCoordinator and database channels
  • Next by thread: AjaxModalContainer help...
  • Index(es):
    • Date
    • Thread