public class ERXObjectStoreCoordinatorPool extends Object
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
.Modifier and Type | Class and Description |
---|---|
static class |
ERXObjectStoreCoordinatorPool.MultiOSCFactory
This class uses different EOF stack when creating new EOEditingContexts.
|
Constructor and Description |
---|
ERXObjectStoreCoordinatorPool(int maxObjectStoreCoordinators)
Creates a new ERXObjectStoreCoordinatorPool.
|
Modifier and Type | Method and Description |
---|---|
static ERXObjectStoreCoordinatorPool |
_pool() |
com.webobjects.eocontrol.EOObjectStore |
currentRootObjectStore()
returns the session related EOObjectStoreCoordinator.
|
protected com.webobjects.eocontrol.EOObjectStore |
currentThreadObjectStore()
Returns the object store for the current thread (or requests one and sets it if there isn't one).
|
static void |
initialize()
Creates the singleton and registers the multi factory.
|
static void |
initializeIfNecessary()
Calls initialize() if the required system properties exist.
|
com.webobjects.eocontrol.EOObjectStore |
nextObjectStore()
Lazy initialises the objectStores and then returns the next one,
this is based on round robin.
|
void |
sessionDidCreate(com.webobjects.foundation.NSNotification n)
checks if the new Session has already a EOObjectStoreCoordinator assigned,
if not it assigns a EOObjectStoreCoordinator to the session.
|
void |
sessionDidTimeout(com.webobjects.foundation.NSNotification n)
Removes the timed out session from the internal array.
|
protected String |
sessionID() |
com.webobjects.eocontrol.EOSharedEditingContext |
sharedEditingContextForObjectStore(com.webobjects.eocontrol.EOObjectStore os) |
public ERXObjectStoreCoordinatorPool(int maxObjectStoreCoordinators)
public static ERXObjectStoreCoordinatorPool _pool()
public static void initializeIfNecessary()
public static void initialize()
public void sessionDidCreate(com.webobjects.foundation.NSNotification n)
n
- WOSession.SessionDidCreateNotification
public void sessionDidTimeout(com.webobjects.foundation.NSNotification n)
n
- WOSession.SessionDidTimeOutNotification
protected String sessionID()
public com.webobjects.eocontrol.EOObjectStore currentRootObjectStore()
protected com.webobjects.eocontrol.EOObjectStore currentThreadObjectStore()
public com.webobjects.eocontrol.EOObjectStore nextObjectStore()
public com.webobjects.eocontrol.EOSharedEditingContext sharedEditingContextForObjectStore(com.webobjects.eocontrol.EOObjectStore os)
Copyright © 2002 – 2020 Project Wonder.