Skip to Content

Often we tend to do some small mistakes which may lead to give some major errors and faults. In this blog we shall deal with 3 major ‘flaws’ that we do in XI, which are not errors!

The Exit Code

There are many Java professional in XI who may tend to write the following code.

We may tend to use the same structure in Java function(s) in message mapping, adapter modules, etc.

Let us see what happens if we use ‘System.exit(0);’

image

I had created a java function using System.exit(0);

Actually I don’t even need to activate the scenario. Just by testing you will immediately lose connection with the server.

image

It takes around 5-10 minutes (depending upon the server), for the server to come up. The good thing is that the server automatically makes the service up. Actually com.sap.xi.repository service goes down. You can also go to Visual admin to bring the service up if it doesn’t come up.

image

Be careful you don’t use System.exit(0) anywhere in your code.  Interestingly, I can’t find a single forum post related to System.exit!

Links leading to help.sap.com specifying not to use System.exit() in XI can be found in these two below link.

http://help.sap.com/saphe lp_nw04s/helpdata/en/d9/718e40496f6f1de10000000a1550b0/frameset.htm
http://help.sap.com/saphe lp_nw04s/helpdata/en/e2/e13fcd80fe47768df001a558ed10b6/frameset.htm

‘TEST’ mode File Adapter

image

Another major mistake that we often do is keeping file adapter communication channel polling interval less and in test mode. It is not an error, keeping it in test mode with less polling interval but, often we forget about it, keeping the adapter channel active and it loads the server memory unnecessarily.

Take a look at this …

image

If the scenario is a BPM, then there will be more workflow objects created ever! You have to delete those workflow objects using SWWL transaction.

You can find all workflow deletion related discussions in SDN forums.

How can we delete old BPM instances
Jobs to clear tablespaces
Cancel\Kill BPM Process
How to Stop a BPM Process

Small polling interval in JDBC Sender

The same situation mentioned in TEST mode file adapter can happen in JDBC Sender. Here, if you mention the polling interval as 10 seconds, then every 10 seconds there is going to be a JDBC call. If the select query takes more than 10 seconds to execute (containing complex functions and joins in the query), then it’s a real disaster!

The idea is not about, not using it, but being aware of such small mistakes that may lead to unexpected results. I might have missed many don’ts in XI, but I see that these are the major ones.

To report this post you need to login first.

6 Comments

You must be Logged on to comment or reply to a post.

  1. Thorsten Nordholm Søbirk
    Hi Felix,

    Nice points.

    Actually, it is not just the XI Repository application that exits when System.exit() is called. The entire server node executing the mapping exits and is automatically restarted by the dispatcher.

    Regards,
    Thorsten

    (0) 
  2. Thorsten Nordholm Søbirk
    Hi Felix,

    Nice points.

    Actually, it is not just the XI Repository application that exits when System.exit() is called. The entire server node executing the mapping exits and is automatically restarted by the dispatcher.

    Regards,
    Thorsten

    (0) 
  3. Thorsten Nordholm Søbirk
    Hi Felix,

    Nice points.

    Actually, it is not just the XI Repository application that exits when System.exit() is called. The entire server node executing the mapping exits and is automatically restarted by the dispatcher.

    Regards,
    Thorsten

    (0) 
  4. Valery Silaev
    Felix,

    Actually (and sadly) this is a horrible bug of SAP software.

    This kind of misbehavior could be fixed if SAP WebAS starts JVM with SecurityManager and security policy that forbids user code to invoke System.exit (SecurityException will be raised otherwise).

    VS

    (0) 
  5. Valery Silaev
    Felix,

    Actually (and sadly) this is a horrible bug of SAP software.

    This kind of misbehavior could be fixed if SAP WebAS starts JVM with SecurityManager and security policy that forbids user code to invoke System.exit (SecurityException will be raised otherwise).

    VS

    (0) 
  6. Valery Silaev
    Felix,

    Actually (and sadly) this is a horrible bug of SAP software.

    This kind of misbehavior could be fixed if SAP WebAS starts JVM with SecurityManager and security policy that forbids user code to invoke System.exit (SecurityException will be raised otherwise).

    VS

    (0) 

Leave a Reply