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);
I had created a java function using System.exit(0);
Actually I dont even need to activate the scenario. Just by testing you will immediately lose connection with the server.
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 doesnt come up.
Be careful you dont use System.exit(0) anywhere in your code. Interestingly, I cant 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.
TEST mode File Adapter
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
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.
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 its 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 donts in XI, but I see that these are the major ones.