This post gives brief information about Message Logger primitive with few implementation details.
First Implementation (DB)
For PI : https://docs.google.com/open?id=0ByotHxAO08TDb2VuaHEycFhRWUd5dGlaOFQ2ZVVBUQ
- The purpose of a MLP is to log selected content of the service message object, or SMO.
- The message is written in XML format. We configure the primitive using an XPath expression so that all or part of the SMO is written. The default is to log the message payload, as identified by the XPath expression /body.
- The message logger primitive provides we with the choice between two different implementations.
- One implementation writes log records to a relational database.
- The other implementation option, which was introduced in version 6.2, is custom logging. It makes use of the Java logging APIs. With this option, we can choose a default implementation provided by the product that writes log records to a file, or we can provide our own Java logging implementation.
- The SMO is not updated by the message logger.
First Implementation (DB)
Here user defined relational database is being used.
Note :
- Data source name : jdbc/mediation/mymessageLog; by default this value was jdbc/mediation/messageLog which is the jndi name for default WPS or WESB database.
- ESBLOG.MSGLOG table was created in the user defined DB.(Default table where this data will be stored)
CREATE SCHEMA ESBLOG;
CREATE TABLE ESBLOG.MSGLOG (TIMESTAMP TIMESTAMP NOT NULL, MESSAGEID VARCHAR(36) NOT NULL, MEDIATIONNAME VARCHAR(256) NOT NULL, MODULENAME VARCHAR(256), MESSAGE CLOB(100000K), VERSION VARCHAR(10));
ALTER TABLE ESBLOG.MSGLOG ADD CONSTRAINT PK_MSGLOG PRIMARY KEY (MESSAGEID, TIMESTAMP, MEDIATIONNAME);
As the table columns describes what every column means.
- Server admin console configuration is also required for this to work.
Second Implementation (Custom)
User defined logging handler (To know about what to have in this handler read http://publib.boulder.ibm.com/infocenter/ieduasst/v1r1m0/index.jsp?topic=/com.ibm.iea.wpi_v6/wpswid/6.2/MediationPrimitives/WBPMv62_MessageLoggerPrimitive/player.html)
Promotable Properties : If we want to have control on certain properties at runtime , configure this.
Administrating these properties :