com.ibm.wbiserver.manualrecovery

Interface FailedEventManager


  1. public interface FailedEventManager
The FailedEventManager interface defines the operations to manage failed events. The interface is implemented as a MBean with partial ObjectName:
 WebSphere:*,type=FailedEventManager
 
To manage failed events with programming, obtain the FailedEventManager MBean from admin server or admin client and invoke the operations. In Network Deployment environment, there're more than one FailedEventManager MBeans running. Just get one of the MBeans, and all the failed events can be managed.

Sample code to get FailedEventManager MBean from remote client.

 Properties connectProps = new Properties();
 connectProps.setProperty(AdminClient.CONNECTOR_TYPE, AdminClient.CONNECTOR_TYPE_SOAP);
 connectProps.setProperty(AdminClient.CONNECTOR_HOST, "localhost");
 connectProps.setProperty(AdminClient.CONNECTOR_PORT, "8880");
 AdminClient adminClient = null;
 try {
     adminClient = AdminClientFactory.createAdminClient(connectProps);
 } 
 catch (ConnectorException e) {
     System.out.println("Exception creating admin client: " + e);
 }
 ObjectName queryName = new ObjectName("WebSphere:*,type=FailedEventManager");
 ObjectName nodeAgent = null;
 Set s = adminClient.queryNames(queryName, null);
 if(!s.isEmpty())
     nodeAgent = (ObjectName) s.iterator().next();
 else
     System.out.println("Failed Event Manager MBean was not found");
 
If security is enabled on the server, then the following properties have to set.
 connectProps.setProperty(AdminClient.CONNECTOR_SECURITY_ENABLED, "true");
 connectProps.setProperty(AdminClient.USERNAME, "test2");
 connectProps.setProperty(AdminClient.PASSWORD, "user24test");
 connectProps.setProperty(AdminClient.CACHE_DISABLED, "false");
 connectProps.setProperty("javax.net.ssl.trustStore", "C:/WebSphere/AppServer/etc/DummyClientTrustFile.jks");
 connectProps.setProperty("javax.net.ssl.keyStore", "C:/WebSphere/AppServer/etc/DummyClientKeyFile.jks");
 connectProps.setProperty("javax.net.ssl.trustStorePassword", "WebAS");
 connectProps.setProperty("javax.net.ssl.keyStorePassword", "WebAS");
 
Sample code is provided for each operation with admin client. The invocation syntax for admin server is the same as admin client.

Field Summary

Modifier and Type Field and Description
  1. static
  2. java.lang.String
COPYRIGHT

Method Summary

Modifier and Type Method and Description
  1. void
discardAll()
Delete all failed events.
  1. void
discardFailedEvents(java.util.List<FailedEvent> failedEvents)
Delete failed events for a set of specified message IDs.
  1. void
discardFailedEvents(java.lang.String[] msgIds)
Deprecated. since 6.2 Use discardFailedEvents(List failedEvents) instead.
  1. java.util.List
getAllFailedEvents(int pagesize)
Get all the events that have failed so far.
  1. BFMHoldQueueEvent
getEventDetailForBFMHold(FailedEvent fe)
Get the detailed information for a BFMHLD failed event.
  1. BPCEvent
getEventDetailForBPC(FailedEvent failedEvent)
Get the detailed information for a BPC failed event.
  1. JMSEvent
getEventDetailForJMS(FailedEvent failedEvent)
  1. MQEvent
getEventDetailForMQ(FailedEvent failedEvent)
  1. SCAEvent
getEventDetailForSCA(FailedEvent failedEvent)
Get the detailed information for a failed event.
  1. java.lang.String[]
getFailedEventBOTypeNames(int pagesize)
Get business object type names from failed events.
  1. long
getFailedEventCount()
Get the count of all failed events.
  1. long
getFailedEventCount(com.ibm.wbiserver.manualrecovery.QueryFilters queryfilters)
Get the count of all failed events according query filters.
  1. long
getFailedEventCountBySessionId(java.lang.String sessionId)
Get failed event count according to specified session id.
  1. java.util.List
getFailedEventsByES(java.lang.Boolean esQualified,int pagesize)
Search failed events according to event sequencing qualifier.
  1. java.util.List
getFailedEventsByException(java.lang.String exceptionStr,int pagesize)
Search failed events according to exception message.
  1. java.util.List
getFailedEventsBySessionId(java.lang.String sessionId,int pagesize)
Search failed events according to a particular session id.
  1. java.util.List
getFailedEventsByType(java.lang.String BusinessObjectType,int pagesize)
Search failed events according to a particular business object type.
  1. java.util.List
getFailedEventsForDestination(java.lang.String destModuleName,java.lang.String destComponentName,java.lang.String destMethodName,int pagesize)
  1. java.util.List
getFailedEventsForSource(java.lang.String sourceModuleName,java.lang.String sourceComponentName,int pagesize)
Search failed events according to a particular source combination.
  1. java.util.List
getFailedEventsForTimePeriod(java.util.Date begin,java.util.Date end,int pagesize)
  1. FailedEventWithParameters
getFailedEventWithParameters(java.lang.String msgId)
Deprecated. since 6.2 use getEventDetailForSCA(FailedEvent failedEvent) instead.
  1. java.util.List
queryFailedEvents(com.ibm.wbiserver.manualrecovery.QueryFilters queryFilters,int offset,int maxRows)
Search failed events according to queryfilers.
  1. void
resubmitFailedEvents(java.util.List failedEvents)
Resubmit a list of failed events.
  1. void
resubmitFailedEvents(java.lang.String[] msgIds)
Deprecated. since 6.2 use resubmitFailedEvents(List failedEvents) instead

Field Detail

  1. static final java.lang.String COPYRIGHT
See Also:

Method Detail

getFailedEventCount

  1. long getFailedEventCount()
  2. throws FailedEventReadException
Get the count of all failed events.

Sample code:

 String opName = "getFailedEventCount";
 Long failedEventCount = (Long) adminClient.invoke(nodeAgent, opName, null, null);
 
Returns:
the count of all failed events
Throws:
FailedEventReadException - when error happens when retrieving failed event information

getFailedEventCount

  1. long getFailedEventCount(com.ibm.wbiserver.manualrecovery.QueryFilters queryfilters)
  2. throws FailedEventReadException
Get the count of all failed events according query filters.

Sample code:

 String opName = "getFailedEventCount";
 QueryFilters queryFilters = new QueryFilters();
 queryFilters.setFilter(queryFilters.MODULE_NAME, "testAsync");
 Object [] event_type = {FailedEvent.TYPE_SCA,FailedEvent.TYPE_JMS};
 queryFilters.setFilterArray(queryFilters.EVENT_TYPE, event_type);
 Object[] parameters = new Object[] {queryFilters};
 String[] signature = new String[] {"com.ibm.wbiserver.manualrecovery.QueryFilters"}
 Long failedEventCount = (Long)adminClient.invoke(nodeAgent, opName, parameters, signature);
 
Returns:
the count of all failed events
Throws:
FailedEventReadException - when error happens when retrieving failed event information

getAllFailedEvents

  1. java.util.List getAllFailedEvents( int pagesize)
  2. throws FailedEventReadException
Get all the events that have failed so far.

Sample code:

 String opName = "getAllFailedEvents";
 //pagesize of 0 means all failed events will be returned.
 Object[] params = new Object[] {new Integer(0)};
 String[] signature = new String[] {"int"};
 List failedEventList = (List) adminClient.invoke(nodeAgent, opName, params, signature);
 //Obtain failed event information in the list.
 Iterator it = failedEventList.iterator();
 while(it.hasNext()) {
     FailedEvent failedEvent = (FailedEvent) it.next();
     String msgId = failedEvent.getMsgId();
     System.out.println(msgId);
 }
 
Parameters:
pagesize - the maximum rows returned. pagesize<0, returnanemptylist;pagesize>0, return at most the specified rows; pagesize=0, unlimited.
Returns:
failed event list
Throws:
FailedEventReadException - when error happens when retrieving failed event information

queryFailedEvents

  1. java.util.List queryFailedEvents( com.ibm.wbiserver.manualrecovery.QueryFilters queryFilters,
  2. int offset,
  3. int maxRows)
  4. throws FailedEventReadException
Search failed events according to queryfilers.

Sample code:

 String opName = "queryFailedEvents";
 QueryFilters queryFilters = new QueryFilters();
 queryFilters.setFilter(queryFilters.MODULE_NAME, "testAsync");
 Object [] event_type = {FailedEvent.TYPE_SCA,FailedEvent.TYPE_JMS};
 queryFilters.setFilterArray(queryFilters.EVENT_TYPE, event_type);
 Object[] params = new Object[] {queryfilter,0,0};
 String[] signature = new String[] {"com.ibm.wbiserver.manualrecovery.QueryFilters","int","int"};
 List failedEventList = (List) adminClient.invoke(nodeAgent, opName, params, signature);
 Iterator it = failedEventList.iterator();
 while(it.hasNext()) {
     FailedEvent failedEvent = (FailedEvent) it.next();
     String msgId = failedEvent.getMsgId();
     System.out.println(msgId);
 }
 
Parameters:
queryFilters - Filters used to query failed events
offset - This is supported from 7.5 onwards. This indicates the number of failed events that will be skipped in the returned result. The result is ordered by decreasing failure timestamp.
maxRows - the maximum rows returned. maxRows<0, returnanemptylist;maxrows>0, return at most the specified rows; maxRows=0, unlimited.
Returns:
failed event list
Throws:
FailedEventReadException - when error happens when retrieving failed event information

getFailedEventsForDestination

  1. java.util.List getFailedEventsForDestination( java.lang.String destModuleName,
  2. java.lang.String destComponentName,
  3. java.lang.String destMethodName,
  4. int pagesize)
  5. throws FailedEventReadException
Search failed events according to a particular destination combination.

Sample code:

 String opName = "getFailedEventsForDestination";
 Object[] params = new Object[] {"Destination_module_name", "Destination_component_name", "Destination_method_name", new Integer(0)};
 String[] signature = new String[] {"java.lang.String", "java.lang.String", "java.lang.String", "int"};
 List failedEventList = (List) adminClient.invoke(nodeAgent, opName, params, signature);
 Iterator it = failedEventList.iterator();
 while(it.hasNext()) {
     FailedEvent failedEvent = (FailedEvent) it.next();
     String msgId = failedEvent.getMsgId();
     System.out.println(msgId);
 }
 
Parameters:
destModuleName - destination module name. wildcard search supported for asterisk (*). searching criteria ignored if not assigned or empty String.
destComponentName - destination component name. wildcard search supported for asterisk (*). searching criteria ignored if not assigned or empty String.
destMethodName - destination method name. wildcard search supported for asterisk (*). searching criteria ignored if not assigned or empty String.
pagesize - the maximum rows returned. pagesize<0, returnanemptylist;pagesize>0, return at most the specified rows; pagesize=0, unlimited.
Returns:
failed event list
Throws:
FailedEventReadException - when error happens when retrieving failed event information

getFailedEventsForSource

  1. java.util.List getFailedEventsForSource( java.lang.String sourceModuleName,
  2. java.lang.String sourceComponentName,
  3. int pagesize)
  4. throws FailedEventReadException
Search failed events according to a particular source combination. This API is for SCA failed events only.

Sample code:

 String opName = "getFailedEventsForSource";
 Object[] params = new Object[] {"Source_module_name", "Source_component_name", new Integer(0)};
 String[] signature = new String[] {"java.lang.String", "java.lang.String", "int"};
 List failedEventList = (List) adminClient.invoke(nodeAgent, opName, params, signature);
 Iterator it = failedEventList.iterator();
 while(it.hasNext()) {
     FailedEvent failedEvent = (FailedEvent) it.next();
     String msgId = failedEvent.getMsgId();
     System.out.println(msgId);
 }
 
Parameters:
sourceModuleName - source module name. wildcard search supported for asterisk (*). searching criteria ignored if not assigned or empty String.
sourceComponentName - source component name. wildcard search supported for asterisk (*). searching criteria ignored if not assigned or empty String.
pagesize - the maximum rows returned. pagesize<0, returnanemptylist;pagesize>0, return at most the specified rows; pagesize=0, unlimited.
Returns:
failed event list
Throws:
FailedEventReadException - when error happens when retrieving failed event information

getFailedEventsForTimePeriod

  1. java.util.List getFailedEventsForTimePeriod( java.util.Date begin,
  2. java.util.Date end,
  3. int pagesize)
  4. throws FailedEventReadException
Search failed events according to a particular time period.

Sample code:

 String opName = "getFailedEventsForTimePeriod";
 SimpleDateFormat dataFormat = new SimpleDateFormat("yyyy-MM-dd");
 Date begin = dataFormat.parse("2000-01-01");      
 Date end = dataFormat.parse("2010-01-01");
 Object[] params = new Object[] {begin, end, new Integer(0)};
 String[] signature = new String[] {"java.util.Date", "java.util.Date", "int"};
 List failedEventList = (List) adminClient.invoke(nodeAgent, opName, params, signature);
 Iterator it = failedEventList.iterator();
 while(it.hasNext()) {
     FailedEvent failedEvent = (FailedEvent) it.next();
     String msgId = failedEvent.getMsgId();
     System.out.println(msgId);
 }
 
Parameters:
begin - the starting time. if not assigned, the starting criteria will not be applied
end - the ending time. if not assigned, current time will be applied.
pagesize - the maximum rows returned. pagesize<0, returnanemptylist;pagesize>0, return at most the specified rows; pagesize=0, unlimited.
Returns:
failed event list
Throws:
FailedEventReadException - when error happens when retrieving failed event information

getFailedEventBOTypeNames

  1. java.lang.String[] getFailedEventBOTypeNames( int pagesize)
  2. throws FailedEventReadException
Get business object type names from failed events. This API is for SCA failed events only.

Sample code:

 String opName = "getFailedEventBOTypeNames";
 Object[] params = new Object[] {new Integer(0)};
 String[] signature = new String[] {"int"};
 String[] boTypeNames = (String[]) adminClient.invoke(nodeAgent, opName, params, signature);
 
Parameters:
pagesize - the maximum rows returned. pagesize<0, returnanemptylist;pagesize>0, return at most the specified rows; pagesize=0, unlimited.
Returns:
array of BO type names
Throws:
FailedEventReadException - when error happens when retrieving failed event information

getFailedEventsByType

  1. java.util.List getFailedEventsByType( java.lang.String BusinessObjectType,
  2. int pagesize)
  3. throws FailedEventReadException
Search failed events according to a particular business object type. This API is for SCA failed events only.

Sample code:

 String opName = "getFailedEventsByType";
 //asterisk symbol indicates wildcard searching.
 Object[] params = new Object[] {"*BusinessObjectType*", new Integer(0)};
 String[] signature = new String[] {"java.lang.String", "int"};
 List failedEventList = (List) adminClient.invoke(nodeAgent, opName, params, signature);
 Iterator it = failedEventList.iterator();
 while(it.hasNext()) {
     FailedEvent failedEvent = (FailedEvent) it.next();
     String msgId = failedEvent.getMsgId();
     System.out.println(msgId);
 }
 
Parameters:
BusinessObjectType - business object type name. wildcard search supported for asterisk (*). searching criteria ignored if not assigned or empty String.
pagesize - the maximum rows returned. pagesize<0, returnanemptylist;pagesize>0, return at most the specified rows; pagesize=0, unlimited.
Returns:
failed event list
Throws:
FailedEventReadException - when error happens when retrieving failed event information

getFailedEventsByException

  1. java.util.List getFailedEventsByException( java.lang.String exceptionStr,
  2. int pagesize)
  3. throws FailedEventReadException
Search failed events according to exception message. This API is for SCA failed events only.

Sample code:

 String opName = "getFailedEventsByException";
 //asterisk symbol indicates wildcard searching.
 Object[] params = new Object[] {"*RuntimeException*", new Integer(0)};
 String[] signature = new String[] {"java.lang.String", "int"};
 List failedEventList = (List) adminClient.invoke(nodeAgent, opName, params, signature);
 Iterator it = failedEventList.iterator();
 while(it.hasNext()) {
     FailedEvent failedEvent = (FailedEvent) it.next();
     String msgId = failedEvent.getMsgId();
     System.out.println(msgId);
 }
 
Parameters:
exceptionStr - exception message. wildcard search supported for asterisk (*). searching criteria ignored if not assigned or empty String.
pagesize - the maximum rows returned. pagesize<0, returnanemptylist;pagesize>0, return at most the specified rows; pagesize=0, unlimited.
Returns:
failed event list
Throws:
FailedEventReadException - when error happens when retrieving failed event information

getFailedEventCountBySessionId

  1. long getFailedEventCountBySessionId( java.lang.String sessionId)
  2. throws FailedEventReadException
Get failed event count according to specified session id. This API is for SCA failed events only.

Sample coce:

 String opName = "getFailedEventCountBySessionId";
 Object[] params = new Object[] {"Session_ID"};
 String[] signature = new String[] {"java.lang.String"};
 Long feCount = (Long) adminClient.invoke(nodeAgent, opName, params, signature);
 
Parameters:
sessionId - session id
Returns:
count of failed events
Throws:
FailedEventReadException - when error happens when retrieving failed event information

getFailedEventsBySessionId

  1. java.util.List getFailedEventsBySessionId( java.lang.String sessionId,
  2. int pagesize)
  3. throws FailedEventReadException
Search failed events according to a particular session id. This API is for SCA failed events only.

Sample code:

 String opName = "getFailedEventsBySessionId";
 Object[] params = new Object[] {"Session_ID", new Integer(0)};
 String[] signature = new String[] {"java.lang.String", "int"};
 List failedEventList = (List) adminClient.invoke(nodeAgent, opName, params, signature);
 Iterator it = failedEventList.iterator();
 while(it.hasNext()) {
     FailedEvent failedEvent = (FailedEvent) it.next();
     String msgId = failedEvent.getMsgId();
     System.out.println(msgId);
 }
 
Parameters:
sessionId - session id
pagesize - the maximum rows returned. pagesize<0, returnanemptylist;pagesize>0, return at most the specified rows; pagesize=0, unlimited.
Returns:
failed event list
Throws:
FailedEventReadException - when error happens when retrieving failed event information

getFailedEventsByES

  1. java.util.List getFailedEventsByES( java.lang.Boolean esQualified,
  2. int pagesize)
  3. throws FailedEventReadException
Search failed events according to event sequencing qualifier. This API is for SCA failed events only.
Parameters:
esQualified - Boolean.TRUE if ES-qualified Boolean.FALSE if not ES-qualified null not applicable
pagesize -
Returns:
failed event list
Throws:

getFailedEventWithParameters

  1. FailedEventWithParameters getFailedEventWithParameters( java.lang.String msgId)
  2. throws FailedEventDataException
Deprecated. since 6.2 use getEventDetailForSCA(FailedEvent failedEvent) instead.
Get the detailed information for a failed event.

Sample code:

 String opName = "getFailedEventWithParameters";
 Object[] params = new Object[] {"Message_ID"};
 String[] signature = new String[] {"java.lang.String"};
 FailedEventWithParameters failedEventWithParameters = (FailedEventWithParameters) adminClient.invoke(nodeAgent, opName, params, signature);
 //CEI trace level and expiration time
 String ceiTrace = failedEventWithParameters.getCEITraceControl();
 Date expirationTime =  failedEventWithParameters.getExpirationTime();
 //Business Object parameters
 List paramList = failedEventWithParameters.getFailedEventParameters(adminClient.getConnectorProperties());
 Iterator it = paramList.iterator();
 while(it.hasNext()) {
     //Each parameter is of FailedEventParameter type.
     FailedEventParameter failedEventParameter = (FailedEventParameter) it.next();
     System.out.println("parameter name is: " + failedEventParameter.getName());
     System.out.println("parameter type is: " + failedEventParameter.getType());
     System.out.println("parameter value is: " + failedEventParameter.getValue());
 }
 
Parameters:
msgId - message id
Returns:
failed event details with parameter information
Throws:
FailedEventDataException - when error happens when obtaining failed event detailed information

getEventDetailForSCA

  1. SCAEvent getEventDetailForSCA(FailedEvent failedEvent)
  2. throws FailedEventDataException
Get the detailed information for a failed event.

Sample code:

 String opName = "getEventDetailForSCA";
 Object[] params = new Object[] {failedevent};
 String[] signature = new String[] {"com.ibm.wbiserver.manualrecovery.FailedEvent"};
 SCAEvent failedEventWithParameters = (SCAEvent) adminClient.invoke(nodeAgent, opName, params, signature);
 //CEI trace level and expiration time
 String ceiTrace = failedEventWithParameters.getCEITraceControl();
 Date expirationTime =  failedEventWithParameters.getExpirationTime();
 //Business Object parameters
 List paramList = failedEventWithParameters.getFailedEventParameters(adminClient.getConnectorProperties());
 Iterator it = paramList.iterator();
 while(it.hasNext()) {
     //Each parameter is of FailedEventParameter type.
     FailedEventParameter failedEventParameter = (FailedEventParameter) it.next();
     System.out.println("parameter name is: " + failedEventParameter.getName());
     System.out.println("parameter type is: " + failedEventParameter.getType());
     System.out.println("parameter value is: " + failedEventParameter.getValue());
 }
 
Parameters:
failedEvent -
Returns:
SCAEvent
Throws:

getEventDetailForBPC

  1. BPCEvent getEventDetailForBPC(FailedEvent failedEvent)
  2. throws FailedEventDataException
Get the detailed information for a BPC failed event.

Sample code:

 String opName = "getEventDetailForBPC";
 Object[] params = new Object[] {failedevent};
 String[] signature = new String[] {"com.ibm.wbiserver.manualrecovery.FailedEvent"};
 BPCEvent bpcEvent = (BPCEvent) adminClient.invoke(nodeAgent, opName, params, signature);
 //Business Object parameters
 List paramList = bpcEvent.getInputMessage(adminClient.getConnectorProperties());
 Iterator it = paramList.iterator();
 while(it.hasNext()) {
     //Each parameter is of FailedEventParameter type.
     FailedEventParameter failedEventParameter = (FailedEventParameter) it.next();
     System.out.println("parameter name is: " + failedEventParameter.getName());
     System.out.println("parameter type is: " + failedEventParameter.getType());
     System.out.println("parameter value is: " + failedEventParameter.getValue());
 }
 
Parameters:
failedEvent -
Returns:
BPCEvent
Throws:

getEventDetailForBFMHold

  1. BFMHoldQueueEvent getEventDetailForBFMHold( FailedEvent fe)
  2. throws FailedEventDataException
Get the detailed information for a BFMHLD failed event.

Sample code:

 String opName = "getEventDetailForBFMHold";
 Object[] params = new Object[] {failedevent};
 String[] signature = new String[] {"com.ibm.wbiserver.manualrecovery.FailedEvent"};
 BFMHoldQueueEvent hldEvent = (BFMHoldQueueEvent) adminClient.invoke(nodeAgent, opName, params, signature);
 //Business Object parameters
 String piid = hldEvent.getPIID();
 System.out.println("The related process instance id is: "+piid);
 
Parameters:
fe -
Returns:
BFMHoldQueueEvent
Throws:

getEventDetailForJMS

  1. JMSEvent getEventDetailForJMS(FailedEvent failedEvent)
  2. throws FailedEventDataException
Parameters:
failedEvent -
Returns:
Throws:

getEventDetailForMQ

  1. MQEvent getEventDetailForMQ(FailedEvent failedEvent)
  2. throws FailedEventDataException
Parameters:
failedEvent -
Returns:
Throws:

discardAll

  1. void discardAll()
  2. throws DiscardFailedException
Delete all failed events. If some of failed events are not deleted successfully, the exception information will be reported in DiscardFailedException. Other successful deletions are committed.

Sample code:

 String opName = "discardAll";
 try {
     adminClient.invoke(nodeAgent, opName, null, null);
 } 
 catch (MBeanException e) {
     e.printStackTrace();
     if(e.getTargetException() instanceof DiscardFailedException) {
         FailedEventExceptionReport[] exceptionReports = ((DiscardFailedException) e.getTargetException()).getFailedEventExceptionReports();
         for(int i=0; i<exceptionReports.length; i++)
             System.out.println("Message id: " + exceptionReports[i].getMsgId());
             System.out.println("Failure time: " + exceptionReports[i].getExceptionTime());
             System.out.println("Failure detail: " + exceptionReports[i].getExceptionDetail());
     }
 }
 
Throws:
DiscardFailedException - when error happens when deleting failed event information

discardFailedEvents

  1. void discardFailedEvents(java.lang.String[] msgIds)
  2. throws DiscardFailedException
Deprecated. since 6.2 Use discardFailedEvents(List failedEvents) instead.
Delete failed events for a set of specified message IDs. If some of failed events are not deleted successfully, the exception information will be reported in DiscardFailedException. Other successful deletions are committed. This API is for SCA failed events only.

Sample code:

 String opName = "discardFailedEvents";
 Object[] params = new Object[] {new String[] {"Message_ID_1", "Message_ID_2"}};
 String[] signature = new String[] {"[Ljava.lang.String;"};
 try {
     adminClient.invoke(nodeAgent, opName, params, signature);
 } 
 catch(MBeanException e) {
     e.printStackTrace();
     if(e.getTargetException() instanceof DiscardFailedException) {
         FailedEventExceptionReport[] exceptionReports = ((DiscardFailedException) e.getTargetException()).getFailedEventExceptionReports();
         for(int i=0; i<exceptionReports.length; i++)
             System.out.println("Message id: " + exceptionReports[i].getMsgId());
             System.out.println("Failure time: " + exceptionReports[i].getExceptionTime());
             System.out.println("Failure detail: " + exceptionReports[i].getExceptionDetail());
     }
 } 
 
Parameters:
msgIds - an array of failed event message IDs
Throws:
DiscardFailedException - when error happens when deleting failed event information

discardFailedEvents

  1. void discardFailedEvents(java.util.List<FailedEvent> failedEvents)
  2. throws DiscardFailedException
Delete failed events for a set of specified message IDs. If some of failed events are not deleted successfully, the exception information will be reported in DiscardFailedException. Other successful deletions are committed.

Sample code:

 String opName = "getAllFailedEvents";
 Object[] params = new Object[] {new Integer(0)};
 String[] signature = new String[] {"int"};
 List failedEventList = (List) adminClient.invoke(nodeAgent, opName, params, signature);
 
 String opName = "discardFailedEvents";";
 Object[] params = new Object[] {failedEventList};
 String[] signature = new String[] {"java.util.List"};
 try {
     adminClient.invoke(nodeAgent, opName, params, signature);
 }
 catch(MBeanException e) {
     e.printStackTrace();
     if(e.getTargetException() instanceof DiscardFailedException) {
         FailedEventExceptionReport[] exceptionReports = ((DiscardFailedException) e.getTargetException()).getFailedEventExceptionReports();
         for(int i=0; i<exceptionReports.length; i++)
             System.out.println("Message id: " + exceptionReports[i].getMsgId());
             System.out.println("Failure time: " + exceptionReports[i].getExceptionTime());
             System.out.println("Failure detail: " + exceptionReports[i].getExceptionDetail());
     }
 } 
 
Parameters:
failedEvents - a list of failed events
Throws:
DiscardFailedException - when error happens when deleting failed event information

resubmitFailedEvents

  1. void resubmitFailedEvents(java.util.List failedEvents)
  2. throws ResubmissionFailedException
Resubmit a list of failed events. If some of failed events are not resubmitted successfully, the exception information will be reported in ResubmissionFailedException. Other successful resubmissions are committed.

Sample code:

 String opName = "getAllFailedEvents";
 Object[] params = new Object[] {new Integer(0)};
 String[] signature = new String[] {"int"};
 List failedEventList = (List) adminClient.invoke(nodeAgent, opName, params, signature);
 
 String opName = "resubmitFailedEvents";
 Object[] params = new Object[] {failedEventList};
 String[] signature = new String[] {"java.util.List"};
 try {
     adminClient.invoke(nodeAgent, opName, params, signature);
 } 
 catch(MBeanException e) {
     e.printStackTrace();
     if(e.getTargetException() instanceof ResubmissionFailedException) {
         FailedEventExceptionReport[] exceptionReports = ((ResubmissionFailedException) e.getTargetException()).getFailedEventExceptionReports();
         for(int i=0; i<exceptionReports.length; i++)
             System.out.println("Message id: " + exceptionReports[i].getMsgId());
             System.out.println("Failure time: " + exceptionReports[i].getExceptionTime());
             System.out.println("Failure detail: " + exceptionReports[i].getExceptionDetail());
     }
 } 
 
Parameters:
failedEvents - a list of failed events, each of which is either a valid failed event, or a message id
Throws:
ResubmissionFailedException - when error happens when resubmitting failed event information

resubmitFailedEvents

  1. void resubmitFailedEvents(java.lang.String[] msgIds)
  2. throws ResubmissionFailedException
Deprecated. since 6.2 use resubmitFailedEvents(List failedEvents) instead
Resubmit failed events for a set of specified message IDs. If some of failed events are not resubmitted successfully, the exception information will be reported in ResubmissionFailedException. Other successful resubmissions are committed.

Sample code:

 String opName = "resubmitFailedEvents";
 Object[] params = new Object[] {new String[] {"Message_ID_1", "Message_ID_2"}};
 String[] signature = new String[] {"[Ljava.lang.String;"};
 try {
     adminClient.invoke(nodeAgent, opName, params, signature);
 } 
 catch(MBeanException e) {
     e.printStackTrace();
     if(e.getTargetException() instanceof ResubmissionFailedException) {
         FailedEventExceptionReport[] exceptionReports = ((ResubmissionFailedException) e.getTargetException()).getFailedEventExceptionReports();
         for(int i=0; i<exceptionReports.length; i++)
             System.out.println("Message id: " + exceptionReports[i].getMsgId());
             System.out.println("Failure time: " + exceptionReports[i].getExceptionTime());
             System.out.println("Failure detail: " + exceptionReports[i].getExceptionDetail());
     }
 } 
 
Parameters:
msgIds - an array of failed event message IDs
Throws:
ResubmissionFailedException - when error happens when resubmitting failed event information