cancel
Showing results for 
Search instead for 
Did you mean: 

XI-Multiple instance scenario -File & SQL sender communication channels

Former Member
0 Kudos

Hi

i have a basic question regarding how file sender communication channel ( where we poll for a particular file pattern either using file/ftp types in a particular subfolder ) or a sql sender communication channel - ( selecting records from a sql source ) would work in a scenario with two active XI instances and j2EE file and sql adapter services running on both of the J2EE servers ?

1. How would the file polling from both J2EE servers - avoid a conflict looking for the same file pattern ? Is there any inbuilt mechanism from SAP to make multiple instances work with the file polling - without a confict ?

2. Simlar question for SQL sender type communication channel ?

If SAP does have a mechanism to handle multiple instance scenarios for file and sql sender adapter based communication channels, is there a link/document on this ?

Accepted Solutions (1)

Accepted Solutions (1)

sunil_singh13
Active Contributor
0 Kudos

Hi ,

I think in that case there will be two instance of adapter engine running on corresponding Adapter Engine, so there is no question of conflict !

Thanks,

Sunil Singh

Former Member
0 Kudos

Hi

My question is : if two instances are polling for the same file - will it not result in a conflict - when both communication channels try to grab the file at the same time ?

Shabarish_Nair
Active Contributor
0 Kudos

>

> Hi

> My question is : if two instances are polling for the same file - will it not result in a conflict - when both communication channels try to grab the file at the same time ?

if both the instances are live, and there are two CC pointing to the same file it will be a conflict.

Actually even if you have only one instance and there are two CC pointing to the same file, you will still have a conflict

Former Member
0 Kudos

Hi Shabarish

In this case, with multiple instances and the file adapter services running on all instances, what is the best way to avoid conflicts with file sender adapter communication channels ? Should we be running the file adapter services only on one of the J2EE servers to avoid conflicts in polling ?

I hope I was able to articulate my question and have been clear.

Shabarish_Nair
Active Contributor
0 Kudos

my understanding is that when using multiple instances (usually for HA or load balancing), at any one point your CC will point only to one instance. There wouldn't be a possibility of the same adapter pointing to multiple instances and the call being made.

In simple terms, unless you configure 2 CC/adapters pointing to the same file, i dont see any issues.

Former Member
0 Kudos

Hi Shabarish

Your answer -

"my understanding is that when using multiple instances (usually for HA or load balancing), at any one point your CC will point only to one instance"

Do you mean that communication channels will be active on only on J2EE server though there is a second J2EE server running ? My understanding was that - the adapter services ( ftp , sql etc ) and hence the communication channels using those services will be active on each and every J2EE server instance that is up and running .

Can you please clarify ?

Former Member
0 Kudos

Hi Karthik,

Please refer SAP NOTE 801926.

In Sender Channel, in Advanced Parameters you need to set clusterSyncMode = Lock

When this option is set, file adapter acquires a enqueue service lock which will never allow channel to work on multiple Server nodes.

This will definately solve your issue.

Hi Shabrish,

If above parameter is not configured, there is possibility that in HA environment two server nodes are trying to pull same file creating lock. We faced this issue in production and after configuring above parameter it solved our issue.

-Gouri

Former Member
0 Kudos

Hi Gouri

Is this option available for SQL sender adapter as well ? Otherwise, how we do avoid conflict for sql sender type communication channels in multiple instances.

Former Member
0 Kudos

Hi Karthik,

You dont have to set this parameter for SQL Sender adapter. In case of SQL, DB will take care of this.

In case of SQL, u might face a problem that whatever records you are selecting same records should get modified with Update Query. In that case you need to use Serializable option from advanced parameter.

-Gouri

Former Member
0 Kudos

Hi Karthik,

Please refer SAPNOTE 111291 for detail analysis of SQL Server locks. Hope its useful.

-Gouri

Former Member
0 Kudos

Gauri - I will take a look at the OSS note that you forwarded for the SQL sender adapter . When you say 'DB' will handle this, may I know what you mean by that ? Are these details addressed in the OSS note ?

Also, regarding your other point - of setting the serializable property in the sql sender adapter to ensure update statement picks up the same data set as that is being selected, this is irrespective of a cluster node scenario , right ? i.e even if there is only one instance/node, the serializable property has to be set in the communication channel to ensure update statement and select statement work as a single LUW. Am I right ?

Former Member
0 Kudos

Hi Karthik,

Point 1:

When I say DB it is source SQL DB. Please refer SAP note for details.

Point 2:

Your understanding about Serilizable property is correct and it is irrespective of cluster node. As it is commonly faced issue, I just mentioned.

-Gouri

Former Member
0 Kudos

Hi Gouri,

Thanks a lot for the prompt and clear replies. Full points awarded.

Former Member
0 Kudos

Gouri

The OSS note 111291 does not give any specifics regarding jdbc sql sender adapter - its a generic note on the sql server locks.

I am just wondering aloud - what will happen if we use a select for update clause in the sql sender adapter communication channel - will this ensure that polling from one J2EE instance will lock the selected records so that the second instance does not select the same set of records from the sql server ? Or should we not use a select for update and use a simple select statement ?

Former Member
0 Kudos

Hi Karthik,

Please see my comments.

I am just wondering aloud - what will happen if we use a select for update clause in the sql sender adapter communication channel -

Gouri: Yes you can use select + update. In fact that is the right way.

will this ensure that polling from one J2EE instance will lock the selected records so that the second instance does not select the same set of records from the sql server ? Or should we not use a select for update and use a simple select statement ?

Gouri: Yes. SQL DB will ensure that same data will not be picked by another node. As I mentioned earlier use serilizable option from advanced mode.

-Gouri

Answers (0)