org.apache.jackrabbit.core
Class XAWorkspace

java.lang.Object
  extended by org.apache.jackrabbit.core.WorkspaceImpl
      extended by org.apache.jackrabbit.core.XAWorkspace
All Implemented Interfaces:
Workspace, JackrabbitWorkspace, EventStateCollectionFactory

public class XAWorkspace
extends WorkspaceImpl

Workspace extension that works in an XA environment.


Field Summary
 
Fields inherited from class org.apache.jackrabbit.core.WorkspaceImpl
hierMgr, lockMgr, obsMgr, queryManager, rep, session, stateMgr, wspConfig
 
Constructor Summary
protected XAWorkspace(WorkspaceConfig wspConfig, SharedItemStateManager stateMgr, RepositoryImpl rep, SessionImpl session)
          Protected constructor.
 
Method Summary
protected  LocalItemStateManager createItemStateManager(SharedItemStateManager shared)
          Create the persistent item state manager on top of the shared item state manager.
protected  InternalXAResource getXAResourceBegin()
          Returns an internal XAResource that is used at the beginning of the resources chain in XASessionImpl.init().
protected  InternalXAResource getXAResourceEnd()
          Returns an internal XAResource that is used at the end of the resources chain in XASessionImpl.init().
 
Methods inherited from class org.apache.jackrabbit.core.WorkspaceImpl
clone, copy, copy, createEventStateCollection, createWorkspace, createWorkspace, getAccessibleWorkspaceNames, getConfig, getHierarchyManager, getImportContentHandler, getItemStateManager, getLockManager, getName, getNamespaceRegistry, getNodeTypeManager, getObservationManager, getQueryManager, getSession, importXML, move, restore, sanityCheck
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XAWorkspace

protected XAWorkspace(WorkspaceConfig wspConfig,
                      SharedItemStateManager stateMgr,
                      RepositoryImpl rep,
                      SessionImpl session)
Protected constructor.

Parameters:
wspConfig - The workspace configuration
stateMgr - The shared item state manager
rep - The repository
session - The session
Method Detail

createItemStateManager

protected LocalItemStateManager createItemStateManager(SharedItemStateManager shared)
Create the persistent item state manager on top of the shared item state manager. May be overridden by subclasses.

Overrides:
createItemStateManager in class WorkspaceImpl
Parameters:
shared - shared item state manager
Returns:
local item state manager

getXAResourceBegin

protected InternalXAResource getXAResourceBegin()
Returns an internal XAResource that is used at the beginning of the resources chain in XASessionImpl.init(). This resource will lock the workspace on prepare.

Returns:
an internal XAResource

getXAResourceEnd

protected InternalXAResource getXAResourceEnd()
Returns an internal XAResource that is used at the end of the resources chain in XASessionImpl.init(). This resource will unlock the workspace on commit or on rollback.

Returns:
an internal XAResource


Copyright © 2004-2007 The Apache Software Foundation. All Rights Reserved.