Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] Ecliselink-Hibernate Integartion issue.

Try implementing org.eclipse.persistence.sessions.Connector so that it wraps the specified connection:
class ConnectionConnector implements Connector {
java.sql.Connection connection;
public ConnectionConnector(java.sql.Connection connection) {
  this.connection = connection;
}
Connection connect(Properties properties, Session session) {
  return this.connection;
}
...
}

and set it into Eclipselink session's login:
session.getLogin().setConnector(new ConnectionConnector(connection));
session.login();

Thanks,
Andrei
On 1/15/2015 4:27 AM, Amit Kumar wrote:
Hi All,

I have an application which is built using hibernate as ORM. It interacts with another application, built using eclipselink as ORM ,through adapter .
Now the problem is when the hibernate application interact with eclipselink application. Hibernate provides an api sessionFactory.openSession(connection) but there is no equivalent api in eclipselink.
One hibernate application can interact with another hibernate application by opening hibernate session using the java.sql.Connection .
 Is there any way where Eclipselink session can be opened using the java.sql.Connection object obtained from hibernate application.

Please suggest some ways to achieve this.

Regards
Amit kumar
_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/eclipselink-users


Back to the top