Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #10172

Re: JPA OneToOne annotation across two different jdbc drivers

From Robert Klemme <shortcutter@googlemail.com>
Newsgroups comp.lang.java.programmer
Subject Re: JPA OneToOne annotation across two different jdbc drivers
Date 2011-11-22 07:02 -0800
Organization http://groups.google.com
Message-ID <53ac0d35-d131-4a77-a6ce-2e9d1bd7e963@t16g2000vba.googlegroups.com> (permalink)
References <jaes5h$8bo$1@dont-email.me>

Show all headers | View raw


On Nov 22, 1:59 am, "Jeffrey H. Coffield"
<jeff...@digitalsynergyinc.com> wrote:
> We have data in two different databases types (MySQL and OpenVMS). Both
> have JDBC drivers. Does someone have an example of using the JPA
> annotations to connect across two different persistence units?

I would be surprised if you could get this working because for this to
work a JPA implementation would need to have a _complete_ RDBMS
implementation inside (i.e. including handling of distributed
transactions, joining in memory, maybe even checking FKs etc.).

If, OTOH you buy a federated database product which does all this for
you and has a JDBC driver then you could get this working - but for
JPA then this would be a single database only hence no special case.

A solution which might work is to use features of RDBMS which are
capable of querying remote databases (Oracle's database link comes to
mind).  In that case some tables would appear to reside in a different
schema and you would need to annotate accordingly.

Kind regards

robert

Back to comp.lang.java.programmer | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

JPA OneToOne annotation across two different jdbc drivers "Jeffrey H. Coffield" <jeffrey@digitalsynergyinc.com> - 2011-11-21 16:59 -0800
  Re: JPA OneToOne annotation across two different jdbc drivers Robert Klemme <shortcutter@googlemail.com> - 2011-11-22 07:02 -0800
  Re: JPA OneToOne annotation across two different jdbc drivers Lew <lewbloch@gmail.com> - 2011-11-22 07:16 -0800
    Re: JPA OneToOne annotation across two different jdbc drivers jlp <jlp@jlp.com> - 2011-11-22 19:14 +0100
    Re: JPA OneToOne annotation across two different jdbc drivers "Jeffrey H. Coffield" <jeffrey@digitalsynergyinc.com> - 2011-11-22 16:26 -0800
      Re: JPA OneToOne annotation across two different jdbc drivers "Jeffrey H. Coffield" <jeffrey@digitalsynergyinc.com> - 2011-11-22 18:34 -0800
        Re: JPA OneToOne annotation across two different jdbc drivers Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2011-11-23 07:32 -0400
          Re: JPA OneToOne annotation across two different jdbc drivers Arne Vajhøj <arne@vajhoej.dk> - 2011-11-25 21:41 -0500
        Re: JPA OneToOne annotation across two different jdbc drivers "Jeffrey H. Coffield" <jeffrey@digitalsynergyinc.com> - 2011-11-27 16:07 -0800
          Re: JPA OneToOne annotation across two different jdbc drivers Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2011-11-28 06:42 -0400
      Re: JPA OneToOne annotation across two different jdbc drivers Lew <lewbloch@gmail.com> - 2011-11-23 12:38 -0800
        Re: JPA OneToOne annotation across two different jdbc drivers Gene Wirchenko <genew@ocis.net> - 2011-11-23 14:52 -0800
          Re: JPA OneToOne annotation across two different jdbc drivers Arne Vajhøj <arne@vajhoej.dk> - 2011-11-25 21:37 -0500
            Re: JPA OneToOne annotation across two different jdbc drivers Gene Wirchenko <genew@ocis.net> - 2011-11-26 21:22 -0800
              Re: JPA OneToOne annotation across two different jdbc drivers Arne Vajhøj <arne@vajhoej.dk> - 2011-12-02 21:03 -0500
  Re: JPA OneToOne annotation across two different jdbc drivers Arne Vajhøj <arne@vajhoej.dk> - 2011-11-25 21:38 -0500

csiph-web