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


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

Re: JPA OneToOne annotation across two different jdbc drivers

From Lew <lewbloch@gmail.com>
Newsgroups comp.lang.java.programmer
Subject Re: JPA OneToOne annotation across two different jdbc drivers
Date 2011-11-22 07:16 -0800
Organization http://groups.google.com
Message-ID <26839074.317.1321974960424.JavaMail.geo-discussion-forums@prdy11> (permalink)
References <jaes5h$8bo$1@dont-email.me>

Show all headers | View raw


Jeffrey H. Coffield 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?

What, precisely, do you mean by "connect across two different persistence units"?

You can connect to two persistence units by defining two 'EntityManager' instances, one for each PU.

Is that what you're asking for?

Which annotations did you have in mind?  Certainly '@Entity' and '@EntityManager' will work with multiple persistence units.  Of course, annotations like '@OneToMany' will not, AFAIK, since they map to foreign-key relationships in the DBMS.

How about giving us a /precise/ explanation of what you wish to accomplish?

Programming is an art of precision.  "Using annotations to connect across two persistence units" is so vague as to be meaningless.

-- 
Lew

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