Skip to Main Content

Java Database Connectivity (JDBC)


For appeals, questions and feedback about Oracle Forums, please email Please ask technical questions in the appropriate category. Thank you!

Is it possible to send AQ Messages with java.sql.Connection?

User_TBKQYOct 7 2022 — edited Oct 7 2022

I'm working with an old java application that is currently using OracleConnection to send AQMessages to AQ Queue, for performance issues I need to cache a connection pool to avoid open and close physical connections every time that I send a message.
Following different site on internet an oracle docs I see that oracle.jdbc.pool.OracleDataSource.setConnectionCachingEnabled is used on the past for this purpose but now is deprecated and not available on new ojdbc library releases, instead, the use of UCP is recommended for physical pool connections.
I have created a connection pool with UCP and I can create a java.sql.Connection instance with it, but I don't know how to use this Connection to send an AQMessage to a remote Oracle queue, somebody can help on this issue? Maybe I'm misunderstood UCP scope and is not designed to send AQ Messages though its connections?
Thank you.

Post Details
Added on Oct 7 2022
1 comment