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

Path csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!news.glorb.com!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail
From Lew <lewbloch@gmail.com>
Newsgroups comp.lang.java.programmer
Subject Re: JPA OneToOne annotation across two different jdbc drivers
Date Tue, 22 Nov 2011 07:16:00 -0800 (PST)
Organization http://groups.google.com
Lines 19
Message-ID <26839074.317.1321974960424.JavaMail.geo-discussion-forums@prdy11> (permalink)
References <jaes5h$8bo$1@dont-email.me>
Reply-To comp.lang.java.programmer@googlegroups.com
NNTP-Posting-Host 173.164.137.214
Mime-Version 1.0
Content-Type text/plain; charset=ISO-8859-1
X-Trace posting.google.com 1321974963 4883 127.0.0.1 (22 Nov 2011 15:16:03 GMT)
X-Complaints-To groups-abuse@google.com
NNTP-Posting-Date Tue, 22 Nov 2011 15:16:03 +0000 (UTC)
In-Reply-To <jaes5h$8bo$1@dont-email.me>
Complaints-To groups-abuse@google.com
Injection-Info glegroupsg2000goo.googlegroups.com; posting-host=173.164.137.214; posting-account=CP-lKQoAAAAGtB5diOuGlDQk0jIwmH0T
User-Agent G2/1.0
X-Google-Web-Client true
Xref x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:10173

Show key headers only | 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