开发者

How to create hibernate entity manager using java.sql.Connection

I开发者_Go百科 want to create Hibernate entity manager using java.sql.Connection object, with out persistence unit, Is there any way to achieve this?

The scenario is my application uses Hibernate, in a flow we will call a independent Java program which returns a connection object, i have to use the same connection to persist the transaction.


You can define your own plugin strategy for obtaining JDBC connections by implementing the interface org.hibernate.connection.ConnectionProvider, and specifying your custom implementation via the hibernate.connection.provider_class property.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜