|
Project Wonder 2.0 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object er.extensions.ERXObjectStoreCoordinatorPool
This class implements EOF stack pooling including EOF stack synchronizing.
It provides a special ERXEC.Factory in order to work without any changes in existing
applications. The number of EOObjectStoreCoordinators can be set with the
system Property er.extensions.ERXObjectStoreCoordinatorPool.maxCoordinators
.
Each Session will become one EOObjectStoreCoordinator and the method
newEditingContext
will always return an EOEditingContext
with the same EOObjectStoreCoordinator
for the same WOSession
.
This first release uses round-robin pooling, future versions might use better algorithms
to decide which EOObjectStoreCoordinator
will be used for the next new
WOSession
.
The code is tested in a heavy multithreaded application
and afawk no deadlock occures, neither in EOF nor directly in Java.
Nested Class Summary | |
static class |
ERXObjectStoreCoordinatorPool.MultiOSCFactory
This class uses different EOF stack when creating new EOEditingContexts. |
Field Summary | |
protected static ERXObjectStoreCoordinatorPool |
_pool
|
Method Summary | |
EOObjectStore |
currentRootObjectStore()
returns the session related EOObjectStoreCoordinator. |
static void |
initialize()
Creates the singleton and registers the multi factory. |
EOObjectStore |
nextObjectStore()
Lazy initialises the objectStores and then returns the next one, this is based on round robin. |
void |
sessionDidCreate(NSNotification n)
checks if the new Session has already a EOObjectStoreCoordinator assigned, if not it assigns a EOObjectStoreCoordinator to the session. |
void |
sessionDidTimeout(NSNotification n)
Removes the timed out session from the internal array. |
protected String |
sessionID()
|
EOSharedEditingContext |
sharedEditingContextForObjectStore(EOObjectStore os)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static ERXObjectStoreCoordinatorPool _pool
Method Detail |
public static void initialize()
public void sessionDidCreate(NSNotification n)
n
- WOSession.SessionDidCreateNotification
public void sessionDidTimeout(NSNotification n)
n
- WOSession.SessionDidTimeOutNotification
protected String sessionID()
public EOObjectStore currentRootObjectStore()
public EOObjectStore nextObjectStore()
public EOSharedEditingContext sharedEditingContextForObjectStore(EOObjectStore os)
|
Last updated: Do, Dez 9, 2004 12:46 PM CET | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |