FileDocCategorySizeDatePackage
DistributedReadOnlyBeanService.javaAPI DocGlassfish v2 API4933Fri May 04 22:33:12 BST 2007com.sun.ejb.spi.distributed

DistributedReadOnlyBeanService

public interface DistributedReadOnlyBeanService
DistributedReadOnlyBeanService defines the methods that can be used to implement a distributed ReadOnly beans. An instance of ReadOnlyBeanRefreshEventHandler is used to handle requests received from other server instances. An instance of DistributedReadOnlyBeanNotifier is used to notify other server instances.
author
Mahesh Kannan
see
ReadOnlyBeanRefreshEventHandler

Fields Summary
Constructors Summary
Methods Summary
public voidaddReadOnlyBeanRefreshEventHandler(long ejbID, java.lang.ClassLoader loader, ReadOnlyBeanRefreshEventHandler handler)
Called from ReadOnlyBeanContainer to register itself as a ReadOnlyBeanRefreshEventHandler.

param
ejbID the ejbID that uniquely identifies the container
param
loader the class loader that will be used to serialize/de-serialize the primary key
param
handler The handler that is responsible for correctly refresing the state of a RO bean

public voidhandleRefreshAllRequest(long ejbID)
Called from the DistributedReadOnlyBeanNotifier when it receives a (remote) request to refresh all RO beans

param
ejbID the ejbID that uniquely identifies the container

public voidhandleRefreshRequest(long ejbID, byte[] pkData)
Called from the DistributedReadOnlyBeanNotifier when it receives a (remote) request to refresh a RO bean

param
ejbID the ejbID that uniquely identifies the container
param
pk the primary key to be refreshed

public voidnotifyRefresh(long ejbID, java.lang.Object pk)
Called by the container after it has refreshed the RO bean

param
ejbID the ejbID that uniquely identifies the container
param
pk the primary key to be refreshed

public voidnotifyRefreshAll(long ejbID)
Called by the container after it has refreshed all RO beans

param
ejbID the ejbID that uniquely identifies the container

public voidremoveReadOnlyBeanRefreshEventHandler(long ejbID)
Called from ReadOnlyBeanContainer to unregister itself as a ReadOnlyBeanRefreshEventHandler. Typically called during undeployment.

param
ejbID

public voidsetDistributedReadOnlyBeanNotifier(DistributedReadOnlyBeanNotifier notifier)
This is typically done during appserver startup time. One of the LifeCycle listeners will create an instance of DistributedReadOnlyBeanNotifier and register that instance with DistributedReadOnlyBeanService

param
notifier the notifier who is responsible for notifying refresh event(s) to other instances