Using ActiveJDBC with multiple threads

I have an application that is built on ActiveJDBC for interacting with databases. I am in the process of multithreading, but I have problems with the password.

Whenever I try to get an object from the database, I get this exception: Cannot open a new connection because existing connection is still on current thread, dbName: default, connection instance: com.mchange.v2.c3p0.impl.NewProxyConnection@75412c2f. This might indicate a logical error in your application.

Note: com.mchange.v2.c3p0.impl.NewProxyConnection. This is because I already tried to use DataSources, but that is also not the case. Can someone point me to a track or suggest an alternative (threadafe) for active JDBC?

Thank.

+4
source share
1 answer

, , . . ActiveJDBC, , , . ActiveJDBC Base.open() Base.close(). , . . , : http://javalite.io/database_connection_management

+3

Source: https://habr.com/ru/post/1537731/


All Articles