Skip Headers
Oracle® Retail Integration Bus Operations Guide
Release 13.0.4
  Go To Table Of Contents
Contents

Previous
Previous
 
Next
Next
 

3 Backend System Administration and Logging

Surrounding text describes compdiststruc.png.

This figure depicts the actual files that comprise the RIB and where they are located in the deployment picture.

rib-<app>-adapters.xml

This file specifies all the adapter instances needed by RIB to interact with an application. Each rib-<app_name> has its own rib-<app-name>_adapter.xml.

The file is located in the rib-home/application-assembly/rib-<app> directory. After deployment it is found in the path $application_instance_home/$application_name where $application_instance_home is the oc4j instance path where the application is deployed.

These are the standard RIB defined adapter types.

<subscribers> element

<subscribers> elements consist of multiple occurrences of <message-driven> elements, that define all the subscribers available for a particular application. Each <message-driven> element consists of id (specifies id for the adaptor) and initialState (specifies the initial state of the adaptor) attributes. The initialState attribute for <message-driven> adaptors accepts two values; running and stopped.

  <subscribers>
                <message-driven id="ASNIn_sub_1" initialState="running"/>
                <message-driven id="ASNOut_sub_1" initialState="running"/>

Note:

Running and Stopped are case sensitive and are the only valid states.

<publisher> element

<publisher> elements consist of multiple occurrences of <timer-driven> or <request-driven> elements, used to define all the publishers available for a particular application.

<timer-driven>

<timer-driven> is used to define publishers for PL/SQL (RMS and RWMS) applications. Each <timer-driven> element consists of an id (specifies id for adaptor), initialState (specifies the initial state of the adaptor) and timeDelay (delay after which the GETNXT needs to call each time) attributes. The initialState attribute for <timer-driven> adaptors accepts two values; running and stopped. This consists of an element called <timer-task> which specifies the implementation details of the adaptor. The <timer-task> element specifies the GETNXT implementation through the <class> element.

<publishers>
    <timer-driven id="Alloc_pub_1" initialState="running" timeDelay="10">
          <timer-task>
               <class name="com.retek.rib.app.getnext.impl.GetNextTimerTaskImpl"/>
                       <property name="maxChannelNumber" value="1" />
          </timer-task>
    </timer-driven>
<request-driven>

<request-driven> is used to define publishers for Java EE applications, including Oracle Retail Price Management (RPM), Oracle Retail Store Inventory Management (SIM), and Oracle Retail Advanced Inventory Planning (AIP). Each <request-driven> element consists of id (specifies id for adaptor) and initialState (specifies the initial state of the adaptor) attributes. The initialState attribute has a value of notConfigurable.

<publishers>
      <request-driven id="ASNOut_pub_1" initialState="notConfigurable"/>
      <request-driven id="DSDReceipt_pub_1" initialState="notConfigurable"/>

<hospital> element

<hospital> element specifies hospital related adaptor information. The structure is very similar to the <publisher> element except that the name and value attribute in the property element defines the different hospital adaptor types.

<hospitals>
       <timer-driven id="sub_hosp_2" initialState="running" timeDelay="10">
              <timer-task>
                    <class name="com.retek.rib.j2ee.ErrorHospitalRetryTimerTask"/>
                           <property name="reasonCode" value="SUB"/>
              </timer-task>
       </timer-driven>

rib-<app>-adapters-resource.properties

These are internationalizable strings for internal RIB adapter key names.

Example:

sub_all.name=Subscribers
sub_all.desc=Manages all subscribers at the same time.
ASNIn_sub_1.name=ASNIn Subscriber, channel 1
ASNIn_sub_1.desc=Subscriber for the ASNIn family through channel 1.
ASNOut_sub_1.name=ASNOut Subscriber, channel 1
ASNOut_sub_1.desc=Subscriber for the ASNOut family through channel 1.

rib-<app>-plsql-api.xml

This configuration file is specific to RMS and RWMS. The RIB interfaces with RMS and RMWS through two database procedures: GETNXT and CONSUME. This file contains the calling signatures for these procedures, the parameters to be configured before calling these procedures, and the implementation class for handling the objects returned from these procedures.

rib-<app>.properties

These are internationalizable strings for internal RIB adapter key names.

Property Name and Default Value Description
facility_id

defaultValue = "facility_id";

This property is used to refer to the warehouse routing configuration. The value of this property is used to construct the facility type.
dc_dest_id

defaultValue = "*";

This property is used to refer to the warehouse distribution center. Destination ID.
facility_type_default

defaultValue = "PROD";

Specifies the default facility type to be used by RWMS publishing adapters for calls to RWMS.

rib-system.properties

All properties for RIB have been classified into kernel properties and application properties. This file contains kernel properties that are used specifically for the functioning of the RIB kernel. They are mostly related to hospital retry configuration, payload locations, or alerting.

Property Name and Default Value Description
hospital_attempt_max

defaultValue = "5"

This property refers to the maximum number of attempts to try to push this record through the RIB automatically. Once this retry count is exceeded, the message remains in the RIB Hospital DB but is no longer retried automatically.
hospital_attempt_delay

defaultValue = "10"

This property refers to the value (in seconds) used to calculate the next attempt time.
hospital_attempt_delayIncrement

defaultValue = "10"

This property refers to the value (in seconds) used to calculate the next attempt time. The next attempt time is calculated as: hospitalAttemptDelay + (hospitalAttemptDelyIncrement * attempt count). This is done so that the delay between each attempt is longer than the previous delay.
numOfRecordsToRetry

defaultValue = "20"

This property refers to the maximum number of RIB Hospital records to be retried in one RIB Hospital retry attempt.
xml_schema_base_url

defaultValue = "http://localhost:8888/rib-func-artifact"

This property refers to the location of web application (rib-func-artifact) which has RIB related XML Schema (XSD) files.
mail_smtp_host

defaultValue = "mail.smtp.host"

This property is used to identify the smtp host from which to send out emails.
mail_smtp_port

defaultValue = "25"

This property is used to identify the smtp port from which to send out emails.
mail_smtp_from

defaultValue = "admin@company.com"

This property refers to the email id that the RIB platform needs to use to send the emails for administrative purposes.
war_http_port

defaultValue = "9080"

This property refers to the port number used by the web based Hospital Retry Admin Tool.

rib-integration-flows.xml

This file is the single source of all values used by the RIB Application Builder tools to define and configure the JMS topics as well as perform start and stop activities, including subscriber checks. For RIB deployments this file should not be edited.

This file is packaged and deployed as part of the rib-func-artifacts war file.

Example:

    <message-flow id="1">
           <node id="rib-rms.Alloc_pub" app-name="rib-rms"
                 adapter-class-def="Alloc_pub" type="DbToJms">
                  <in-db>default</in-db>
                  <out-topic>etAllocFromRMS</out-topic>
           </node>
           <node id="rib-tafr.Alloc_tafr" app-name="rib-tafr"
                 adapter-class-def="Alloc_tafr" type="JmsToJms">
                 <in-topic>etAllocFromRMS</in-topic>
                 <out-topic name="topic-name-key-iso">etStockOrdersISO</out-topic>
              <out-topic name="topic-name-key-wh">etStkOrdersFromRIBToWH{*}</out-topic>
           </node>
           <node id="rib-sim.StockOrder_sub" app-name="rib-sim"
                 adapter-class-def="StockOrder_sub" type="JmsToDb">
                  <in-topic>etStockOrdersISO</in-topic>
                  <out-db>default</out-db>
           </node>
           <node id="rib-rwms.StockOrder_sub" app-name="rib-rwms"
                 adapter-class-def="StockOrder_sub" type="JmsToDb">
                  <in-topic>etStkOrdersFromRIBToWH1</in-topic>
                  <out-db>default</out-db>
           </node>
    </message-flow>

rib-deployment-env-info.xml

This file is the single source of all values used in the RIB App Builder tools and is the only (or should be the only) file that requires editing for using them. The RIB Installer gathers the appropriate values from the user, constructs the file, and invokes the appropriate tools.

For example, when the RIB Application Builder is used to extract error hospital tables from an application schema, this file supports those tables.

The RIB Application Builder tools can be executed independent of the RIB installer tool. In some cases it is necessary to edit this file manually.

app-in-scope-for-integration

This section defines what applications are in scope for this environment.

Example:

   <app-in-scope-for-integration>
      <app id="rms" type="plsql-app"/>
      <app id="tafr" type="tafr-app"/>
      <app id="sim" type="javaee-app"/>
      <app id="rwms" type="plsql-app"/>
      <app id="rpm" type="javaee-app"/>
      <app id="aip" type="javaee-app"/>
   </app-in-scope-for-integration>

rib-jms-server

This section defines the JMS server information.

Example:

        <jms-server-home>linux1@linux1:/home/oracle/oracle/product/10.2.0/db_1</jms-server-home>
         <jms-url>jdbc:oracle:thin:@linux1:1521:ora10g</jms-url>
         <jms-port>1521</jms-port>
         <jms-user>ribaq</jms-user>
         <jms-password>ribaq</jms-password>

rib-application-server

This section defines the Oracle Application Server information.

Example:

<oas-instance-name> AS4.linux1.localdomain </oas-instance-name>
<oas-instance-home>soa1@linux1:/home/soa1/product/10.1.3.1/OracleAS_6</oas-instance-home>
<oas-opmn-request-port>6003</oas-opmn-request-port>
<oas-ohs-port protocol="http" >7777</oas-ohs-port>
<java-home>/usr/java/jdk1.5.0_01</java-home>

rib-javaee-containers

This section defines the OC4J instances for each of your rib-<app> applications that are in-scope.

Example:

<oc4j id="rib-rms-app-server-instance">
    <oc4j-instance-name>rib-rms-oc4j-instance</oc4j-instance-name>
    <oc4j-instance-home>soa1@linux1:/home/soa1/product/10.1.3.1/OracleAS_4/j2ee/rib-rms-oc4j-instance</oc4j-instance-home>
   <oc4j-user>riboc4jadmin</oc4j-user>
   <oc4j-password>riboc4jadmin</oc4j-password>
</oc4j>

rib-applications

This section defines the rib-<app> specific information for each applicable rib-<app>.

Example 1: RIB-RMS (for app-type=PL/SQL)

<rib-app id="rib-rms" type="plsql-app">
            <url>jdbc:oracle:thin:@linux11521:soa1</url>
            <user>rms13en</user>
            <password>rms13</password>
<notifications>
  <email>
       <email-server-host>mail.oracle.com</email-server-host>
       <email-server-port>25</email-server-port>
       <from-address>rib@oracle.com</from-address>
       <to-address-list>rib@oracle.com</to-address-list>
   </email>
   <jmx/>
</notifications>

Example 2: Error Hospital Database (for app-type=PL/SQL)

<error-hospital-database>     <hosp-url>DB host URL for error-hospital tables</hosp-url>     <hosp-user>errorhospitaluser </hosp-user>     <hosp-password>password </hosp-password</error-hospital-database> <app-database>    <app-url> DB host URL for pl/sql application</app-url>    <app-user>appuser </app-user>    <app-password>password </app-password></app-database>    

Example 3: JavaEE application with JNDI information defined

           <jndi>
              <url>opmn:ormi://linux1:6003:sim-oc4j-instance/javaee-api-stubs</url>
              <factory>oracle.j2ee.rmi.RMIInitialContextFactory</factory>
              <user>oc4jadmin</user>
              <password>welcome1</password>
           </jndi>

Example 4: Error Hospital Database (for app-type=JavaEE/TAFR)

<error-hospital-database>     <hosp-url>DB host URL for error-hospital tables</hosp-url>     <hosp-user>errorhospitaluser </hosp-user>     <hosp-password>password </hosp-password</error-hospital-database> 

commons-logging.properties

The RIB uses the Apache Commons Logging subsystem as the logging interface. For RIB deployments this file should not be edited.

log4j.xml

The log4j Open Source software is used to control all RIB logging. This software requires the log4j.xml file to configure the file name, logging level, and type of file used.

rib-app-builder-paths.properties

For RIB deployments this file should not be edited.

rib-application-assembly-info.xml

This is a non editable file that describes the structure of the rib-<app>.ear and the resources it uses.

RIB Logging

All logging in the RIB is through log4j, the Apache Software Foundation's Open Source software. For details about log4j visit the Apache Software Foundation's log4j home page.

For information on how the RIB uses log4j, see "log4j.xml".

Log Level Recommendations

The logging level should be adjusted for the phase of the deployment. What is appropriate in development and test (DEBUG) is not appropriate in production (INFO).

There are some logs such as audit and timing that may be used differently at certain phases as well. Audit is either on (DEBUG) or off (INFO), the same is true with timings.


Note:

See "RIB Timings Utility" in this manual.

As a rule the appropriate level will always be INFO.

Changing Logging Levels

The RIB's use of log4j allows the control of logging levels to suit the deployment and situation. There are two methods of setting the logging levels; directly manipulating the log4.xml file using a text editor, and the RIB Administration GUI.

RIB Administration GUI

The RIB Administration GUI allows control of the logging levels for each adapter individually. It permits the change to affect only the runtime logging and is dynamic. It also provides the ability to persist the change so that the adapter(s) retains that level when restarted. This is the recommended approach.

log4j.xml Configuration File

The RIBLOGS log4j.xml file can be directly edited. This requires that the adapter(s) be bounced for the change to take effect. See the sections below on what to edit related to the type of log (RIBLOG, Timing Log, and so on).

Adapter Logging (RIBLOGS)

The RIB adapter code contains logging logic that writes all of it runtime logs to the RIBLOG log files. The logs are written to the path <rib-application_instance_home>/<rib-app>/logs/<rib-app>.

Example:

/home/rib/product/10.1.3.3/OracleAS_6/j2ee/rib-rms-oc4j-instance/log/rib-rms

The RIBLOG filenames are in the format <adapter-instance-name>.rib.log.

Example:

Alloc_pub_1.rib.log
ASNIn_sub_1.rib.log
ASNOut_sub_1.rib.log

To enable this function, parameters must be set per adapter.

Be careful because there are multiple entries for each adapter instance in the log4j.xml file. Search for the section of the log4j.xml file:

<!--RIB Appender for adapterInstance: Alloc_pub_1-->

RIB Timing Logs

The RIB messaging components code is instrumental to log timing entries on the internal activities whenever they create, transform, route, filter, or subscribe to messages on the RIB. These timings logs are written using the log4j logging mechanism.

The timings log files follow the name convention <adaptor-instance-name>.timings.log and are found in the same locations as the RIBLOGS.

Typically, one timings log file is created per component (EJB or other) which holds the entries for that component. These files are cumulative, meaning that they do not get overwritten with every initialization of the component, but they append new entries to the current information already recorded. The files do roll over after they reach a certain configurable size and backup files are created to preserve previous entries.

Each entry in the timings log represents a timestamp of a particular event in the RIB component, listing the date and time information, name of the component, thread id and a distinct message for each event. The list of time stamped events includes such items as the start time and/or end time of the following actions:

  • Overall publication, subscription, routing, or transformation process

  • Calls to store procedures (getnxt and consume)

  • Actual publication and subscription of messages to and from the JMS server

  • Calls to the RIB Hospital to check for dependencies and insert messages

  • Calls to other applications to process messages after subscription (injectors)

In the log4j.xml file, the Level Value property must be set to DEBUG. This tag is not normally present in the standard log4j.xml file; it must be added. The example below shows how and where to add it.

Be careful because there are multiple entries for each adapter instance in the log4j.xml file. Search for the section of the log4j.xml file:

<!--Timings Logger for adapterInstance: -->".

Before:

<logger additivity="false" name="rib.pub.timings.Order_pub_1">
        <!-- Possible levels are TRACE, DEBUG, INFO, WARN, ERROR and FATAL -->
        <level value="INFO"/>
        <appender-ref ref="appender.rib.pub.timings.Order_pub_1"/>
    </logger>

After:

<logger additivity="false" name="rib.pub.timings.Order_pub_1">
        <!-- Possible levels are TRACE, DEBUG, INFO, WARN, ERROR and FATAL -->
        <level value="DEBUG"/>
        <appender-ref ref="appender.rib.pub.timings.Order_pub_1"/>
    </logger>

RIB Audit Logs

The RIB has an auditing feature that logs a message as it passes though the RIB infrastructure. Each messaging component can be set to write the message, and only the message, to a separate log file. This allows the tracing of message content from publication to subscription, and all steps, such as a TAFR, in between.

There are two benefits to this mechanism: the ability to audit each step, and the ability to create a recovery plan. The messages can be played back, without effort being spent to extract them from inside other more systemic log files.

The log4j.xml can be edited to remove the <audit-entry> tag from the output and to have only the message in the file.

<!--Audit Appender for adapterInstance: ASNIn_sub_1-->
    <appender class="org.apache.log4j.FileAppender"
 name="appender.rib.sub.audit.ASNIn_sub_1">
        <param name="File" value="/u00/webadmin/product/10.1.3/OracleAS_1/j2ee/rib-rms-oc4j-instance/log/rib-rms/ASNIn_sub_1.audit.log"/>
        <!--param name="MaxFileSize" value="2048KB"/-->
        <!--param name="MaxBackupIndex" value="1"/-->
        <layout class="org.apache.log4j.PatternLayout">
            <param name="ConversionPattern" value="&lt;audit-entry audit-time=&quot;%d{yyyy.MM.dd
 HH.mm.ss,SSS}&quot;&gt;%n%m%n&lt;/audit-entry&gt;%n"/>
        </layout>
    </appender>
Remove the “value=” in the ConversionPattern with %m%n

The RIB can also log a set of audit logs used to audit all the events processed by RIB. To enable this function, parameters must be set per adapter.

Proceed cautiously because there are multiple entries for each adapter instance in the log4j.xml file. Search for the section of the log4j.xml file:

<!--Audit Logger for adapterInstance: ItemLoc_pub_1-->.   

Before:

<!--Audit Logger for adapterInstance: ItemLoc_pub_1-->
    <logger additivity="false" name="rib.pub.audit.ItemLoc_pub_1">
        <!-- Possible levels are TRACE, DEBUG, INFO, WARN, ERROR and FATAL -->
        <level value="INFO "/>
        <appender-ref ref="appender.rib.pub.audit.ItemLoc_pub_1"/>
    </logger>

After:

   <!--Audit Logger for adapterInstance: ItemLoc_pub_1-->
 <logger additivity="false" name="rib.pub.audit.ItemLoc_pub_1">
        <!-- Possible levels are TRACE, DEBUG, INFO, WARN, ERROR and FATAL -->
        <level value="DEBUG"/>
        <appender-ref ref="appender.rib.pub.audit.ItemLoc_pub_1"/>

Sample Log Entry:

<audit-entry audit-time="2008.01.28 11.37.57,642">
<?xml version="1.0" encoding="UTF-8"?>
<RibMessages
xmlns="http://www.oracle.com/retail/integration/rib/RibMessages"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.oracle.com/retail/integration/rib/RibMessages
http://mspdev85:7777/rib-func-artifact/integration/xsd/RibMessages.xsd" >
<ribMessage><family>Banner</family><type>BannerCre</type>    <id>1</id>
<ribmessageID>Banner_pub_1|2008.01.28 11:37:57.500|6936</ribmessageID>
<publishTime>2008-01-28 11:37:57.500 CST</publishTime>
<messageData>&lt;BannerDesc
xmlns=&quot;http://www.oracle.com/retail/integration/payload/BannerDesc&quot;
xmlns:ribdate=&quot;http://www.oracle.com/retail/integration/payload/RIBDate&quot
;
xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
xsi:schemaLocation=&quot;http://www.oracle.com/retail/integration/payload/BannerDe
sc http://mspdev81:7777/rib-func-artifact/payload/xsd/BannerDesc.xsd
http://www.oracle.com/retail/integration/payload/RIBDate
http://mspdev81:7777/rib-func-artifact/payload/xsd/RIBDate.xsd&quot;&gt;  &lt;banner_id&gt;1&lt;/banner_id&gt;  &lt;banner_name&gt;B&amp;amp;M&lt;/banner_name&gt;&lt;/BannerDesc&gt;
</messageData>
<customData></customData><customFlag>F</customFlag>
</ribMessage>
</RibMessages>

Other RIB Management Logs

deploy.rib.log

This log tracks the source rib-app-builder home that pushed the changes to this OC4J instance.

Example:

Uploading configuration file from machine(mspdev81)
dir(/stage/Rib1300-ms7.1/Rib1300ForAll13xxApps/rib-home/deployment-home/bin/../../../rib-home) at(Mon Jan 28 11:15:57 PST 2008).

management.rib.log

The RIB maintains a management log which is used to keep track of the oc4j instance on the whole.

This is usually written during the startup of an oc4j instance. The recommendation is that each rib-app be deployed in a separate oc4j instance, so management logs are specific to a rib-app.

The management log writes RIB information common to all the components like loading property files and creating logging files.

Example:

2008-02-01 14:33:23,928 [AJPRequestHandler-RMICallHandler-6] DEBUG
com.retek.rib.management.adapters.client.action.StopAdapterAction - Invoking
operation to stop the adapters
2008-02-01 14:33:23,928 [AJPRequestHandler-RMICallHandler-6] DEBUG
com.retek.rib.monitor.engine.MBeanAbstractFactory - Invoking MBean operation
domain(rib-rms) objectNameProperty(level=adapters,type=sub,name=Receiving_sub_1)
methodName(stop) parameter([Ljava.lang.Object;@1452a1)
signature([Ljava.lang.String;@3d06a4).

global.rib.log

Example:

2008-02-06 10:14:26,688 [AJPRequestHandler-RMICallHandler-7] DEBUG
retek.com.retek.rib.ui.view.tags.IteratePropertyTag.com.retek.rib.management.adap
ters.model.AdapterTypes - Invoking Operation returnStatusForAll of MBean.
2008-02-06 10:14:26,777 [AJPRequestHandler-RMICallHandler-7] DEBUG
retek.com.retek.rib.ui.view.tags.IteratePropertyTag.com.retek.rib.monitor.engine.M
BeanAbstractFactory - Invoking MBean operation domain(rib-rms)
objectNameProperty(level=types,type=pub,name=pub_all)
methodName(returnStatusForAll) parameter(null) signature(null).
2008-02-06 10:14:26,780 [AJPRequestHandler-RMICallHandler-7] DEBUG
retek.com.retek.rib.ui.view.tags.IteratePropertyTag.com.retek.rib.management.adapt
ers.model.AdapterTypes - Operation returnStatusForAll for type pub invoked
successfully :<type name="pub"><adapter id="Alloc_pub_1"  name="Alloc Publisher,
channel 1" state="running" /><adapter id="SeedData_pub_1"  name="SeedData
Publisher, channel 1" state="running" /><adapter id="SeedObj_pub_1" name="SeedObj
Publisher, channel 1" state="running" /><adapter id="WOOut_pub_1" name="WOOut
Publisher, channel 1" state="running" /><adapter id="Banner_pub_1" name="Banner
Publisher, channel 1" state="running" /><adapter id="Transfers_pub_1"
name="Transfers Publisher, channel 1" state="running" /><adapter
id="RcvUnitAdj_pub_1"  name="RcvUnitAdj Publisher, channel 1" state="running" /><adapter
id="Vendor_pub_1"  name="Vendor Publisher, channel 1" state="running" /><adapter
id="WH_pub_1"  name="WH Publisher, channel 1" state="running" /><adapter
id="RTVReq_pub_1"  name="RTVReq Publisher, channel 1" state="running" /><adapter
id="MerchHier_pub_1"  name="MerchHier Publisher, channel 1" state="running"
/><adapter id="UDAs_pub_1"  name="UDAs Publisher, channel 1" state="running"
/><adapter id="Order_pub_1"  name="Order Publisher, channel 1" state="running"
/><adapter id="Items_pub_1"  name="Items Publisher, channel 1" state="running"
/><adapter id="DiffGrp_pub_1"  name="DiffGrp Publisher, channel 1" state="running"
/><adapter id="Item
Loc_pub_1" name="ItemLoc Publisher, channel 1" state="running" /><adapter
id="Partner_pub_1" name="Partner Publisher, channel 1" state="running" /><adapter
id="Diffs_pub_1"  name="Diffs Publisher, channel 1" state="running" /><adapter
id="WOIn_pub_1"  name="WOIn Publisher, channel 1" state="running" /><adapter
id="Stores_pub_1"  name="Stores Publisher, channel 1" state="running" /></type>