org.openeai.implementations.services.els.commands
Class EnterpriseSyncLoggerCommand

java.lang.Object
  |
  +--org.openeai.OpenEaiObject
        |
        +--org.openeai.jms.consumer.commands.ConsumerCommand
              |
              +--org.openeai.jms.consumer.commands.SyncCommandImpl
                    |
                    +--org.openeai.implementations.services.els.commands.EnterpriseSyncLoggerCommand
All Implemented Interfaces:
SyncCommand

public class EnterpriseSyncLoggerCommand
extends SyncCommandImpl
implements SyncCommand

The EnterpriseSyncLogger is a part of the OpenEAI "Enterprise Logging Service" (ELS). This particular command consumes messages published to an organization's Enterprise logging topic and stores those messages. This way, there is a persisted version of potentially every Synchronization message published throughout the organization. When an application publishes a Sync message using an OpenEAI PubSubProducer object, it can configure that producer to automatically publish this "logged" version of the message when it publishes the message to the intended target. This means, the same message actually gets published twice by the producer. Once to the intended target and once to the organization's "enterprise logging topic". Then the gateway executing this command consumes those messages and hands the message off to this command where it stores it in its repository.

Each time the command stores a message, it breaks the message into useful pieces so the information contained in the message can potentially be used later and can be correlated to messages that may get logged by the EnterpriseSyncErrorLogger which is also a part of the OpenEAI ELS reference implementation.

The repository is structured is specified in the LoggedMessage Javadoc which is the class that actually persists the message passed to this command by the PubSubConsumer that executes it.

Author:
Alan Schuele and Greg Hunt
See Also:
EnterpriseSyncErrorLogger, LoggedMessage, LoggedMessage.insertRow(java.sql.Connection)

Field Summary
 
Fields inherited from class org.openeai.jms.consumer.commands.ConsumerCommand
CREATE_ACTION, DELETE_ACTION, MESSAGE_ACTION, MESSAGE_CATEGORY, MESSAGE_OBJECT, MESSAGE_RELEASE, MESSAGE_TYPE, QUERY_ACTION, UPDATE_ACTION
 
Fields inherited from class org.openeai.OpenEaiObject
logger
 
Constructor Summary
EnterpriseSyncLoggerCommand(CommandConfig cConfig)
          Constructor
 
Method Summary
 void execute(int messageNumber, javax.jms.Message aMessage)
          Takes the message passed in, breaks it into the appropriate parts and logs it to the repository.
 
Methods inherited from class org.openeai.jms.consumer.commands.SyncCommandImpl
getSyncErrorPublisher, getSyncErrorSyncDoc, getSyncErrorSyncPrimedDocumentUri, publishSyncError, publishSyncError, setSyncErrorSyncDoc, setSyncErrorSyncPrimedDocumentUri
 
Methods inherited from class org.openeai.jms.consumer.commands.ConsumerCommand
addAppConfig, buildError, convertToString, generateRelease, getAppConfig, getAppConfigs, getControlArea, getInboundXmlValidation, getMessageAction, getMessageBody, getMessageCategory, getMessageDumpDirectory, getMessageObject, getMessageRelease, getMessageType, getMsgComponents, getOutboundXmlValidation, initializeInput, setAppConfig, setInboundXmlValidation, setMessageDumpDirectory, setMsgComponents, setOutboundXmlValidation, setWriteToFile, writeMessageToFile, writeToFile
 
Methods inherited from class org.openeai.OpenEaiObject
addLog4jProperty, getAppName, getDebug, getFromAddr, getLog4jProperties, getMailHost, getMailService, getProperties, getToAddr, initializeLog4j, initializeLog4j, initializeLog4j, setAppName, setDebug, setFromAddr, setMailHost, setMailService, setProperties, setToAddr
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EnterpriseSyncLoggerCommand

public EnterpriseSyncLoggerCommand(CommandConfig cConfig)
                            throws java.lang.InstantiationException
Constructor

Method Detail

execute

public void execute(int messageNumber,
                    javax.jms.Message aMessage)
             throws CommandException
Takes the message passed in, breaks it into the appropriate parts and logs it to the repository.

Specified by:
execute in interface SyncCommand
Returns:
void

Throws:
CommandException - if errors occur initializing the command with the message passed in. Basically, this involves turning the message into a JDOM Document. All other errors should be handled by publishing a Sync-Error-Sync message.
See Also:
RequestMessage.execute


Copyright © 2002, OpenEAI Software Foundation