jdbc failure Resource already in use

Hello all
I have seen a recurrent issue in our error logs, but this time it was my code that threw this error (or called the service that threw the error)

[ART.117.4011] Adapter Runtime (Adapter Service): Unable to connect to resource connections.JDBC:WmConfig_DbConfig_1. The resource is already being used in a parent transaction.

up until now, I had been blaming folks for invoking a service that was in wait status. but that is not the case with the code I was runing. My code creates a list of required values, then loops over the list and asks the DB to chime in with data, and puts them to a doc. I was tracing through this code on this occasion, and noticed that the doc had a single string that was null.

Some info on this adapter/service. it reaches into a rac oracle db to retrieve data based on value pairs and then caches it for the next time its called. The adapter is set to NO_TRANSACTION.

I realize, that there are multiple items I am leaving out, but has any one had this error, and what should I scrutinize?

Hi,

Which version of WmART you are using.
Can you check if IS_ART_6-5_Fix4 applies to your version.

regards,
Sumit

We encounter this issue in 6.5 and we applied the patch as giving my WM Support and it seems to work. Below is WM Support’s explanation. Hopes this helps you.

This exception is seen because, there are other JDBC calls in your top level flow service, which are not part of any explicit Transaction.

When ART executed that JDBC call, it created an implicit transaction, and due to which that connection was part of that transaction.

The options are:

Option1: Make sure in your flow service (right from the top level service), that all JDBC calls are part of explicit transaction.

Option2: You could remove the transaction start/commit statements from your sub flow, so that ART takes care of transaction management (as mentioned earlier).

“Transaction Management Overview” chapter in JDBC Adapter user guide provides details on how transactions should be organized, in case of explicit Transaction management.

Thanks for the input. This is 6.5, but do not have this fix applied. I will follow up with the creator of the config flow code. Monkeying with the WmArt package is not an option, so I will look at the flow code, and review this fix info.

thanks again