Skip to main content



      Home
Home » Eclipse Projects » EclipseLink » How create JDBC connection in EcelipseLInk application
How create JDBC connection in EcelipseLInk application [message #909423] Fri, 07 September 2012 01:50 Go to next message
Eclipse UserFriend
Hello all.

I am try retreive java.sql.Connection in Eclipselink Application running on glassfish.
Connection cnn = ((JpaEntityManager)em.getDelegate()).getServerSession().getAccessor().getConnection();
Connection cnn = ((EntityManagerImpl)(em.getDelegate())).getServerSession().getAccessor().getConnection();
Connection cnn = (Connection) em.unwrap(java.sql.Connection.class);


But in all cases i get cnn == null.

Netbeanse/Ecelipselink v 2.3.3.
Re: How create JDBC connection in EcelipseLInk application [message #911336 is a reply to message #909423] Tue, 11 September 2012 08:17 Go to previous message
Eclipse UserFriend
The last one is correct. Ensure you first begin a transaction.
Previous Topic:Constant "Connection closed" errors in new app
Next Topic:Exception handling
Goto Forum:
  


Current Time: Tue Jul 08 23:05:35 EDT 2025

Powered by FUDForum. Page generated in 0.44416 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top