byte[] trunkData = null;
byte[] containerExtraParamsData = null;
byte[] propertiesState = null;
HashMap properties = null;
MessageElement modeMsgElement =
msg.getMessageElement(MESSAGE_MODE, MESSAGE_MODE);
if(modeMsgElement != null) {
mode = modeMsgElement.toString();
}
MessageElement idMsgElement =
msg.getMessageElement(MESSAGE_ID, MESSAGE_ID);
if(idMsgElement != null) {
id = idMsgElement.toString();
}
//added for bulk messages
MessageElement bulkModeMsgElement =
msg.getMessageElement(BULK_MESSAGE_MODE, BULK_MESSAGE_MODE);
if(bulkModeMsgElement != null) {
bulkMode = bulkModeMsgElement.toString();
}
MessageElement bulkIdMsgElement =
msg.getMessageElement(BULK_MESSAGE_ID, BULK_MESSAGE_ID);
if(bulkIdMsgElement != null) {
bulkId = bulkIdMsgElement.toString();
}
//end added for bulk messages
MessageElement appidMsgElement =
msg.getMessageElement(MESSAGE_APPID, MESSAGE_APPID);
if(appidMsgElement != null) {
appid = appidMsgElement.toString();
}
MessageElement versionMsgElement =
msg.getMessageElement(MESSAGE_VERSION, MESSAGE_VERSION);
if(versionMsgElement != null) {
version =
(Long.decode(versionMsgElement.toString())).longValue();
}
MessageElement commandMsgElement =
msg.getMessageElement(MESSAGE_COMMAND, MESSAGE_COMMAND);
String command = commandMsgElement.toString();
MessageElement lastAccessMsgElement =
msg.getMessageElement(MESSAGE_LAST_ACCESS, MESSAGE_LAST_ACCESS);
if(lastAccessMsgElement != null) {
lastAccess =
(Long.decode(lastAccessMsgElement.toString())).longValue();
}
MessageElement maxInactiveMsgElement =
msg.getMessageElement(MESSAGE_MAX_INACTIVE, MESSAGE_MAX_INACTIVE);
if(maxInactiveMsgElement != null) {
maxInactive =
(Long.decode(maxInactiveMsgElement.toString())).longValue();
}
MessageElement instanceNameMsgElement =
msg.getMessageElement(MESSAGE_INSTANCE_NAME, MESSAGE_INSTANCE_NAME);
if(_logger.isLoggable(Level.FINE)) {
_logger.fine("ReplicationState>>createReplicationState:instanceNameMsgElement: " + instanceNameMsgElement);
}
if(instanceNameMsgElement != null) {
instanceName = instanceNameMsgElement.toString();
if(_logger.isLoggable(Level.FINE)) {
_logger.fine("ReplicationState>>createReplicationState:instanceNameString: " + instanceName);
}
}
MessageElement extraParamMsgElement =
msg.getMessageElement(MESSAGE_EXTRA_PARAM, MESSAGE_EXTRA_PARAM);
if(extraParamMsgElement != null) {
extraParam = extraParamMsgElement.toString();
}
//FIXME assuming queryResult is a string encoding an Integer
MessageElement queryResultMsgElement =
msg.getMessageElement(MESSAGE_QUERY_RESULT, MESSAGE_QUERY_RESULT);
if(queryResultMsgElement != null) {
queryResult =
Integer.decode(maxInactiveMsgElement.toString());
}
MessageElement dataMsgElement =
msg.getMessageElement(MESSAGE_DATA, MESSAGE_DATA);
if(dataMsgElement != null) {
data = dataMsgElement.getBytes(false);
}
MessageElement trunkDataMsgElement =
msg.getMessageElement(MESSAGE_TRUNK_DATA, MESSAGE_TRUNK_DATA);
if(trunkDataMsgElement != null) {
trunkData = trunkDataMsgElement.getBytes(false);
}
MessageElement containerExtraParamsDataMsgElement =
msg.getMessageElement(MESSAGE_CONTAINER_EXTRA_PARAMS_DATA, MESSAGE_CONTAINER_EXTRA_PARAMS_DATA);
if(containerExtraParamsDataMsgElement != null) {
containerExtraParamsData = containerExtraParamsDataMsgElement.getBytes(false);
}
MessageElement propertiesMsgElement =
msg.getMessageElement(MESSAGE_PROPERTIES_DATA, MESSAGE_PROPERTIES_DATA);
if(propertiesMsgElement != null) {
propertiesState = propertiesMsgElement.getBytes(false);
if(propertiesState != null) {
try {
properties = (HashMap)getObjectValue(propertiesState);
} catch (Exception ex) {
;