Re: Query with tables from 2 different databases in Java
От | Julius Stroffek |
---|---|
Тема | Re: Query with tables from 2 different databases in Java |
Дата | |
Msg-id | 6ec50dfd0706080118u794797e9y4c21cb0d813da3ac@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Query with tables from 2 different databases in Java (Mark Lewis <mark.lewis@mir3.com>) |
Список | pgsql-jdbc |
Hi Mark,
You can use JTA - Java Transaction API to encapsulate transaction atomicity across different databases (and database vendors).
XADatasource, XAConnection, XAResource are objects you should be looking for. A couple of links about the issue:
http://java.sun.com/products/jta/
http://java.sun.com/developer/EJTechTips/2005/tt0125.html#1
http://www.java-tips.org/java-ee-tips/enterprise-java-beans/introduction-to-the-java-transactio.html
However, I do not know how postgres sql driver implements those interfaces.
Regards,
Julius Stroffek
You can use JTA - Java Transaction API to encapsulate transaction atomicity across different databases (and database vendors).
XADatasource, XAConnection, XAResource are objects you should be looking for. A couple of links about the issue:
http://java.sun.com/products/jta/
http://java.sun.com/developer/EJTechTips/2005/tt0125.html#1
http://www.java-tips.org/java-ee-tips/enterprise-java-beans/introduction-to-the-java-transactio.html
However, I do not know how postgres sql driver implements those interfaces.
Regards,
Julius Stroffek
On 6/7/07, Mark Lewis < mark.lewis@mir3.com> wrote:
On Thu, 2007-06-07 at 17:08 +0300, Loredana Curugiu wrote:
> Hi,
>
> I need a query to use tables from 2 different databases and
> that query to be executed from a .java file. What do you recommand?
>
> Thanks in advance!
>
>
> Regards,
> Loredana
>
Move the data to a single database, or else perform the query manually
by pulling back the matching results from each database individually and
then stitching them together.
-- Mark Lewis
---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?
http://www.postgresql.org/docs/faq
В списке pgsql-jdbc по дате отправления: