Hi experts,
I am encountering the following Exception when invoking the BPM API:
com.sap.engine.services.connector.exceptions.BaseResourceException: The resource "SAPC73DB" does not support two-phase commit and cannot be enlisted in the current transaction, because another non supporting two-phase commit resource is already enlisted for component "ejbContexts/sap.com/tc~bpem~facade~ear/sap.com~tc~bpem~facade~ejb.jar/ProcessDefinitionManager" in application "sap.com/tc~bpem~facade~ear". Only one of the enlisted resources is allowed to be non two-phase commit compliant.
Unfortunately I have no clue what that means. I am simply trying to invoke two consecutive BPM API calls within one transaction (transaction handling is container managed, simple stateless session bean, no transaction annotations). The first call
BPMFactory.getProcessInstanceManager().getProcessInstance(processInstanceUri);
seems to work. The second call
ProcessDefinition pd = BPMFactory.getProcessInstanceManager().getProcessDefintion(processInstanceUri);
then fails. When removing the second call, everything works fine.
// UPDATE: I am using an EntityManager associated with another DB (PostgreSQL) within the same method. I guess this is causing the problems regarding two two-phase commits... Unfortunately I am not able to configure the corresponding PostgreSQL data source as XA-compatible (error: Missing default user/password for data source). Is this even possible? From what I read this seem to be not supported very well.
I am using the AWS Trial of NWPO. Any insights would be greatly appreciated. Thanks in advance
Sebastian