Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] Sharing EclipseLink Connection with legacy JDBC-code

It would depend on how you're getting your connection. For example, I
know in spring you can share a Datasource with no problem as long as
the same Spring Transaction Manager manages the EntityManagerFactory
and the datasource.

./tch



On Mon, Aug 16, 2010 at 10:17 AM,  <patric@xxxxxxxxxx> wrote:
>
> Hello everyone,
>
> is it possible to share an EclipseLink Connection with a regular JDBC
> Connection?
>
> Imagine an application which consists of several JDBC queries/statements
> inside one transaction.
> I'd like to do some refactoring and replace some old JDBC code with JPA
> using EclipseLink.
>
> Is it possible that EclipseLink is using the same Connection as the legacy
> JDBC code, so that it "sees" the uncommited data which have been made before
> and that regular JDBC which will be executed afterwards can see the changed
> data for EclipseLink?
>
> (of course, the I have to call flush() the entitymanager)
>
> If it's not possible - what would you suggest for such a refactoring?
>
> Thank you!
>
> Best regards,
> Patric
>
>
> _______________________________________________
> eclipselink-users mailing list
> eclipselink-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/eclipselink-users
>


Back to the top