DB Alias switching

Hi

I have a scenario here…where I am connecting two databases using two DB aliases.

Once I am inserting into one DB by calling the Insert Service which uses the DB Connection 1, and then Immediately I am calling the Deletion Service which uses the DB Connection 2.

While deleting this is throwing an error saying that no authorization for deletion. If I run this deletion service alone or separately (not after Insert service) working fine and deleteing the record.

I am doubt here, How these Insert and delete services calls that appropriate connection.

Does any one have idea to over come this.

Thanks,
-GV

Try invoking the pub.db:connect before the second step (the Deletion Service which uses the DB Connection 2).
Good Luck.

Make sure when you set the dbAlias on the second call you check the “overwrite pipeline value”. Most likely the first alias is overriding the second so wm is trying to connect to the same db as the first call. Better yet drop your alias variable too after the first call. No need to connect first - you can pass in the alias which will connect for you.

Will