com.ibm.commerce.messaging.outboundservice
Class SendTransactedMsgCmdImpl
java.lang.Object
CacheableCommandImpl
com.ibm.commerce.command.AbstractECTargetableCommand
com.ibm.commerce.command.ControllerCommandImpl
com.ibm.commerce.messaging.outboundservice.SendTransactedMsgCmdImpl
- All Implemented Interfaces:
- AccCommand, ControllerCommand, ECCommand, ECTargetableCommand, Protectable, SendTransactedMsgCmd
- public class SendTransactedMsgCmdImpl
- extends ControllerCommandImpl
- implements SendTransactedMsgCmd
Goes through the current contents of the MSGSTORE table and sends all the available messages with retries greater than 0. Messages in this table can span multiple records. If the message is sent, it will be removed from the table. If the messages is not sent, the retries field will be decremented. No view is call after this command is executed because it is intended to be used by the scheduler.
- See Also:
- Serialized Form
Field Summary |
static java.lang.String |
COPYRIGHT
IBM copyright notice field. |
Method Summary |
void |
afterFail(java.lang.Long msg_id, java.lang.Integer tran_id, java.lang.Integer retries, java.sql.Timestamp expiry)
Updates the message in the MSGSTORE table by decrementing retries field by one to ensure that the message had a fair chance before refusing to send the message. |
void |
afterFailCheckExpired(java.lang.Long msg_id, java.lang.Integer tran_id, java.lang.Integer retries, java.lang.String duration)
Checks whether the expiry field within the MSGSTORE table expires Calls chanc before refusing to send the message. |
void |
afterSuccess(java.lang.Long msg_id, java.lang.Integer tran_id)
After the message is successfully sent, it will be removed from the MSGSTORE table. |
void |
afterSuccessKeepMessage(java.lang.Long msg_id, java.lang.Integer tran_id)
Store the content of each message into the MSGARCHIVE table |
void |
assembleMsg()
Picks up all the messages from the MsgStoreAccessBean with retries greater then 0 and attempts to send the message. |
java.lang.Long[] |
getResourceOwners()
This method returns the Organization unit reference numbers for all the resources accessed by this command It will return null if no resource if being accessed by this command. |
void |
performExecute()
Assembles the messages in the MsgStoreAccessBean and sends the messages. |
Methods inherited from class com.ibm.commerce.command.ControllerCommandImpl |
checkPermission, fulfills, getForUserId, getGeneric, getOwner, getRequestProperties, getResolvedRequestProperties, getResponseProperties, getRetriable, getViewInputProperties, isGeneric, isRetriable, mergeProperties, setForUserId, setGeneric, setOwner, setRequestProperties, setResponseProperties, setRetriable, setViewInputProperties |
Methods inherited from class com.ibm.commerce.command.AbstractECTargetableCommand |
accessControlCheck, checkIsAllowed, checkParameters, checkResourcePermission, createCommandExecutionEvent, execute, finalize, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getResources, getStoreId, getUser, getUserId, isReadyToCallExecute, reset, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties, validateParameters |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.ibm.commerce.command.ControllerCommand |
checkPermission, execute, getGeneric, getRequestProperties, getResolvedRequestProperties, getResponseProperties, getRetriable, getViewInputProperties, isGeneric, isRetriable, mergeProperties, setGeneric, setRequestProperties, setRetriable, setViewInputProperties |
Methods inherited from interface com.ibm.commerce.command.ECCommand |
checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getResources, getStoreId, getUser, getUserId, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties, validateParameters |
COPYRIGHT
public static final java.lang.String COPYRIGHT
- IBM copyright notice field.
- See Also:
- Constant Field Values
SendTransactedMsgCmdImpl
public SendTransactedMsgCmdImpl()
- Constructs the SendTransactedMsg object.
afterFail
public void afterFail(java.lang.Long msg_id,
java.lang.Integer tran_id,
java.lang.Integer retries,
java.sql.Timestamp expiry)
- Updates the message in the MSGSTORE table by decrementing retries field by one to ensure that the message had a fair chance before refusing to send the message.
-
- Parameters:
- msg_id - The message identifier
- tran_id - The transport identifier
- retries - The number of retries
- expiry - The timestamp expiery value
afterSuccess
public void afterSuccess(java.lang.Long msg_id,
java.lang.Integer tran_id)
- After the message is successfully sent, it will be removed from the MSGSTORE table.
-
- Parameters:
- msg_id - The message identifier
- tran_id - The tranport identifier
afterSuccessKeepMessage
public void afterSuccessKeepMessage(java.lang.Long msg_id,
java.lang.Integer tran_id)
- Store the content of each message into the MSGARCHIVE table
-
- Parameters:
- msg_id - The message identifier
- tran_id - The tranport identifier
assembleMsg
public void assembleMsg()
- Picks up all the messages from the MsgStoreAccessBean with retries greater then 0 and attempts to send the message. Then updates the messages status depending on the result when attempting to send the message.
getResourceOwners
public java.lang.Long[] getResourceOwners()
throws ECException
- This method returns the Organization unit reference numbers for all the resources accessed by this command It will return null if no resource if being accessed by this command.
-
- Specified by:
- getResourceOwners in interface AccCommand
- Overrides:
- getResourceOwners in class ControllerCommandImpl
-
- Returns:
- Long[] - an array of all organization unit reference numbers
- Throws:
- ECException
performExecute
public void performExecute()
throws ECException
- Assembles the messages in the MsgStoreAccessBean and sends the messages.
-
- Specified by:
- performExecute in interface ECCommand
- Overrides:
- performExecute in class AbstractECTargetableCommand
-
- Throws:
- ECException
- See Also:
- ECCommand#performExecute()
afterFailCheckExpired
public void afterFailCheckExpired(java.lang.Long msg_id,
java.lang.Integer tran_id,
java.lang.Integer retries,
java.lang.String duration)
- Checks whether the expiry field within the MSGSTORE table expires Calls chanc before refusing to send the message.
-
- Parameters:
- msg_id - The message identifier
- tran_id - The transport identifier
- retries - The number of retries
- duration - The expiery value
Feedback
(C) Copyright IBM Corporation 1996, 2005. All Rights Reserved.