fr.dyade.aaa.jndi2.distributed

Class ReplicationManager

Implemented Interfaces:
LifeCycleListener, java.io.Serializable, UpdateListener

public class ReplicationManager
extends RequestManager
implements UpdateListener

See Also:
Serialized Form

Field Summary

static String
INIT_REQUEST_TABLE
static String
SERVER_LIST
static String
SYNC_REQUEST_TABLE
static String
WRITE_REQUEST_TABLE

Constructor Summary

ReplicationManager(short[] serverIds)

Method Summary

void
agentInitialize(boolean firstTime)
protected void
changeOwner(ChangeOwnerRequest request)
protected void
createSubcontext(CreateSubcontextRequest request)
protected AgentId
getRootOwnerId()
Overrides the JndiServer behavior.
protected JndiReply
invokeOwner(AgentId owner, RequestContext reqCtx)
Overrides the JndiServer behavior.
protected JndiReply
onMissingContext(MissingContextException mce, RequestContext reqCtx)
In a centralized JNDI server a missing context shows that the naming data are unconsistent.
protected JndiReply
onMissingRecord(MissingRecordException mre, RequestContext reqCtx)
In a centralized JNDI server a missing record shows that the name asked by the JNDI request doesn't exist.
void
onUpdate(UpdateEvent event)

Methods inherited from class fr.dyade.aaa.jndi2.server.RequestManager

agentFinalize, agentInitialize, changeOwner, createSubcontext, getId, getRootOwnerId, getServerImpl, invoke, invokeAdminRequest, invokeOwner, invokeReadRequest, invokeWriteRequest, onMissingContext, onMissingRecord, readBag, sendTo, setContainer, writeBag

Field Details

INIT_REQUEST_TABLE

public static final String INIT_REQUEST_TABLE


SERVER_LIST

public static final String SERVER_LIST


SYNC_REQUEST_TABLE

public static final String SYNC_REQUEST_TABLE


WRITE_REQUEST_TABLE

public static final String WRITE_REQUEST_TABLE

Constructor Details

ReplicationManager

public ReplicationManager(short[] serverIds)

Method Details

agentInitialize

public void agentInitialize(boolean firstTime)
            throws Exception
Specified by:
agentInitialize in interface LifeCycleListener
Overrides:
agentInitialize in interface RequestManager


changeOwner

protected void changeOwner(ChangeOwnerRequest request)
            throws NamingException
Overrides:
changeOwner in interface RequestManager


createSubcontext

protected void createSubcontext(CreateSubcontextRequest request)
            throws NamingException
Overrides:
createSubcontext in interface RequestManager


getRootOwnerId

protected AgentId getRootOwnerId()
Overrides the JndiServer behavior.
Overrides:
getRootOwnerId in interface RequestManager


invokeOwner

protected JndiReply invokeOwner(AgentId owner,
                                RequestContext reqCtx)
Overrides the JndiServer behavior. Send a JNDI request to the owner (JNDI server). Waits for the asynchronous reply.
Overrides:
invokeOwner in interface RequestManager


onMissingContext

protected JndiReply onMissingContext(MissingContextException mce,
                                     RequestContext reqCtx)
In a centralized JNDI server a missing context shows that the naming data are unconsistent. So it throws an error. A subclass may override this behavior in order to try to resolve the missing context.
Overrides:
onMissingContext in interface RequestManager

Parameters:
mce - the missing context exception
reqCtx - the JNDI request context that raised the exception.

Returns:
the JNDI reply. May be null if the resolution is asynchronous.


onMissingRecord

protected JndiReply onMissingRecord(MissingRecordException mre,
                                    RequestContext reqCtx)
In a centralized JNDI server a missing record shows that the name asked by the JNDI request doesn't exist. So the NameNotFoundException is directly forwarded to the client. A subclass may override this behavior in order to try to resolve the missing record.
Overrides:
onMissingRecord in interface RequestManager

Parameters:
mre - the missing context exception
reqCtx - the JNDI request context that raised the exception.

Returns:
the JNDI reply. May be null if the resolution is asynchronous.


onUpdate

public void onUpdate(UpdateEvent event)
Specified by:
onUpdate in interface UpdateListener


Copyright B) 2004 Scalagent - All rights reserved