Wednesday, May 18, 2011

Siebel to SAP R/3 Integration Approaches

I was recently evaluating various approaches to integrate Siebel and SAP R/3 systems especially using Oracle SOA Suite. Siebel already provides a Siebel EAI Connector for SAP R/3. This is a tight coupling between Siebel and SAP R/3. If you are planning to use Oracle SOA Suite, it provides the iway adapter for both Siebel and SAP R/3 end systems which makes it possible to decouple the 2 end systems and integrate them. Both approaches are explained below.

Siebel EAI Connector for SAP R/3

The Siebel EAI Connector for SAP R/3 provides connectivity using BAPI and IDOC transport adapters, and predefined business processes. Using the connectors, you can exchange customer, order, and product information between a Siebel application and SAP. This leverages Siebel Workflow and Business Service data maps which are the transformations for the data entities like (Account in Siebel to Customer in SAP or Product in Siebel to Material in SAP). There are some pre-built integrations between common business processes and it also allows custom integrations to be built.














More details can be found in below link:
http://download.oracle.com/docs/cd/B31104_02/books/PDF/ConnSAP.pdf

Integrating using Oracle Siebel Adapter

We can also leverage Oracle Fusion Middleware and the available iway adapters for Siebel and SAP end systems. Ensure that the Siebel Business Services (WSDL) or Business Objects (XSD) are available from Application Explorer for WSDL/XSD generation. Similarily ensure that the SAP BAPIs/IDocs are available in Application Explorer for WSDL/XSD generation. After that you can create the fusion processes to integrate the 2 end systems.

Below is a screenshot from Application Explorer once you create a target and connect to Siebel system.











More details about this approach can be found in below link:
http://download.oracle.com/docs/cd/E14571_01/doc.1111/e17056/intro.htm#i1013615

I have covered details about SAP integration with SOA Suite in my earlier posts
Receiving idocs in BPEL
Invoking BAPIs from BPEL

Sunday, May 15, 2011

JMS Messages lost after server restart

Recently I came across an issue where JMS messages(unread) were lost from the queue when Weblogic server was restarted. This was kind of strange because Weblogic JMS provides a pretty stable solution around message delivery. Did some more analysis around this and below are the findings.

Weblogic JMS supports message retention in form of both Oracle AQ or an out-of-the-box DB persistence (file based persistence is default). In either case it should not lose message. The messages can be removed from the queues ONLY if:
a.      They are consumed by some process.
b.      If the messages gets expired, the queue handler will remove them
c.      If the delivery mode of messages coming from JMS Provider is Non-Persistent.

Which brings to the question of "What is JMSDeliveryMode ?" JMSDeliveryMode specifies PERSISTENT or NON_PERSISTENT messaging.
  • When a persistent message is sent, WebLogic JMS stores it in the JMS file or JDBC Store (database).
  • WebLogic JMS does not store non-persistent messages in the JMS database (prefix_wlstore). These messages are guaranteed to be delivered at least once unless there is a system failure, in which case messages may be lost.
You can check the JMSDeliverMode on incoming messages by looking at the JMS Header section.

<mes:WLJMSMessage xmlns:mes="http://www.bea.com/WLS/JMS/Message">
<mes:Header>
<mes:JMSMessageID>ID:xxxxxxx</mes:JMSMessageID>
<mes:JMSDeliveryMode>NON_PERSISTENT</mes:JMSDeliveryMode>
<mes:JMSExpiration>0</mes:JMSExpiration>
<mes:JMSPriority>4</mes:JMSPriority>
<mes:JMSRedelivered>false</mes:JMSRedelivered>
..
..
</mes:Header>
The JMS Provider should set this JMS Delivery Persistence to PERSISTENT mode and send it to consumer (JMS Queues in Fusion). No additional configuration is needed on Fusion– BY DEFAULT. Incase the messages are still being sent as NON-PERSISTENT then Weblogic provides a property for the Queue called "Delivery Mode Override" which can be used to override the delivery mode of incoming messages.


Friday, May 13, 2011

Controlling the Size and Number of OPMN Debug logs generated

Incase you want to control the number and size of the files generated under SOA_HOME/opmn/logs directory, you can do that by adding few start up parameters in opmn.xml. Usually if these are not added, the debug files will grow over a period of time and will run out of space. (use du -csh * under logs directory to see space occupied by each sub-directory).

Usually the directory OC4J_SOA_xxxx which holds the *.out and *.err files consumes the most space. So to control that you can add below startup parameters for automatic recycling of these files.

<ias-component id="SOA" status="enabled">
            <process-type id="OC4J_SOA" module-id="OC4J" status="enabled">
               <module-data>
                  <category id="start-parameters">
                     <data id="java-options" value="-server -XX:MaxPermSize=2048M -ms4096M -mx8192M -XX:AppendRatio=3 -Djava.security.policy=$ORACLE_HOME/j2ee/OC4J_SOA/config/java2.policy -Djava.awt.headless=true -Dhttp.webdir.enable=false -Doc4j.userThreads=true -Doracle.mdb.fastUndeploy=60 -Doc4j.formauth.redirect=true -Djava.net.preferIPv4Stack=true -Dorabpel.home=/soa/OracleAS_1/bpel -Xbootclasspath^/p:/soa/OracleAS_1/bpel/lib/orabpel-boot.jar -Dhttp.proxySet=false -Doraesb.home=/soa/OracleAS_1/integration/esb -DHTTPClient.disableKeepAlives=true -Dhttp.session.debug=false -Dfile.encoding=UTF-8 -Dstdstream.filesize=10 -Dstdstream.filenumber=10"/>
                     <data id="oc4j-options" value="-out /soa/OracleAS_1/opmn/logs/OC4J_SOA.out -err /soa/OracleAS_1/opmn/logs/OC4J_SOA.err "/>
                  </category>

These 2 highlighted parameters control the size of each file as 10MB and number to 10. Older files are overwritten. Restart the server for changes to take affect.

Tuesday, May 10, 2011

Weblogic Admin Server Unable to Start after ip change of host.

After changing the ip address of the App Server host (say from xx.xx.xx.xx to yy.yy.yy.yy), the weblogic admin server is unable to start. Following error message is seen in log file.

<Error> <Server> <AdminServer> <DynamicListenThread[Default]> <<WLS Kernel>> <> <> <1305039521705> <BEA-002606> <Unable to create a server socket for listening on channel "Default". The address xx.xx.xx.xx might be incorrect or another process is using port 7001: java.net.BindException: Cannot assign requested address.>

After ip change make sure you have changed references to the ip address in below places:
  • If you have used the IP address, instead of the hostname, as the listen address of the WebLogic Server Administration Server. Make sure you change it in config.xml under $MW_HOME/user_projects/domains/domain_name/config directory.
  • Also ensure that the /etc/hosts or C:\Windows\system32\drivers\etc\hosts file is modified to point to the new ip address.
Restart the Admin Server and it should start up successfully now.