com.ibm.websphere.sdo.mediator.ejb
Interface MediatorAdapter
- public interface MediatorAdapter
Three passes are made over DataGraph Log passing changed DataObjects to the applyChange method.
In pass 1 new DataObjects are passed. Adapter should create the EJB instance and set the cmp fields. CMRs that reference EJBs that have not been created yet must be deferred to pass 2.
In pass 2 new and updated DataObjects are passed. CMRs deferred from pass 1 can be set at this time.
In pass 3 deleted DataObjects are passed.
Adapter return true if it has processed the change and return false to have the mediator process the change.
Field Summary
Modifier and Type | Field and Description |
---|---|
|
CREATE
Pass 1 to handle creation of new EJBs.
|
|
REMOVE
Pass 3 to handle EJB removal.
|
|
UPDATE
Pass 2 to handle update of cmp fields and ejb relationships.
|
Method Summary
Modifier and Type | Method and Description |
---|---|
|
applyChange(commonj.sdo.DataObject object,int phase)
A changed DataObject is passed to the adapter.
|
|
end()
Called after pass 3 to clean up any resources.
|
|
init(commonj.sdo.ChangeSummary log)
Called before pass 1 to allow adapter class to initialize itself.
|
Field Detail
CREATE
- static final int CREATE
Pass 1 to handle creation of new EJBs.
See Also:
UPDATE
- static final int UPDATE
Pass 2 to handle update of cmp fields and ejb relationships.
See Also:
REMOVE
- static final int REMOVE
Pass 3 to handle EJB removal.
See Also:
Method Detail
applyChange
- boolean applyChange(commonj.sdo.DataObject object,
- int phase)
- throws QueryException
A changed DataObject is passed to the adapter.
Parameters:
object
- The changed DataObject from the graph log. phase
- Processing phase. Returns:
True if adapter has handled the changed object,
false if the mediator should process the change.
Throws:
QueryException
- The adapter throwing an excption will cause
the mediator to abort processing. end
- void end()
Called after pass 3 to clean up any resources.
init
- void init(commonj.sdo.ChangeSummary log)
Called before pass 1 to allow adapter class to initialize itself.
Parameters:
log
- The graph log.