294 WebSphere Business Integration Adapters
10544,
CWConnectorLogAndTrace.XRD_ERROR,
0);
CWConnectorUtil.logMsg(e.getMessage());
e.printStackTrace();
return CWConnectorConstant.FAIL;
}
String arcProcessed = CWConnectorUtil.getConfigProp("ArchiveProcessed");
// In case the ArchiveProcessed property is not set, use true
// as default.
if (arcProcessed == null || arcProcessed.equals(""))
arcProcessed = CWConnectorAttrType.TRUESTRING;
CWConnectorEvent evtObj;
CWConnectorBusObj bo = null;
try {
for (int i = 0; i < pollQuantity; i++) {
// Process each event retrieved from the application.
// Get the next event to be processed.
evtObj = evts.getNextEvent();
// A null return indicates that there were no events with
// READY_FOR_POLL status. Return SUCCESS.
if (evtObj == null) {
CWConnectorUtil.generateAndLogMsg(
10534,
CWConnectorLogAndTrace.XRD_INFO,
0,
0);
return CWConnectorConstant.SUCCEED;
}
// Check if the connector has subscribed to the event
// generated for the business object.
boolean isSub =
isSubscribed(evtObj.getBusObjName(), evtObj.getVerb());
if (isSub) {
// Retrieve the complete CWConnectorBusObj corresponding
// to the object using the getBO method in
// CWConnectorEventStore. This method sets the verb on a
// temporary business object to RetrieveByContent
// and retrieves the corresponding data information to be
// filled in the business object from the application.
try {
bo = evts.getBO(evtObj);
// Terminate flag will be set in the event store when
// the doVerbFor method returns APPRESPONSETIMEOUT in
// getBO.
if (evts.getTerminate())
return CWConnectorConstant.APPRESPONSETIMEOUT;
} catch (AttributeNotFoundException e) {
CWConnectorUtil.generateAndLogMsg(