Re: Fwd: Postgres JDBC, WS and commit

From: Radosław Smogura <rsmogura(at)softperience(dot)eu>
To: pgsql-jdbc(at)postgresql(dot)org
Cc: mephysto <mephystoonhell(at)gmail(dot)com>
Subject: Re: Fwd: Postgres JDBC, WS and commit
Date: 2012-05-13 19:01:16
Message-ID: 1986400.Upn4gYaEoZ@radekdesktop
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Dnia piątek, 11 maja 2012 06:08:11 mephysto pisze:
> Hello newly,
> I tried to enable "Non Transacitonal Connection" and my function execute
> commit as I want, but at the moment I have some little problems with threads
> and I don't know the reason of these problems.
Actually non transactional connection makes connections unmanaged by
Glassfish's transaction manager, so EJB as well.

> I would to know more about pgConnectionpoolDataSource and pgXADataSource to
> set correct datasource in Glassfish connection pool. Where can I find
> documentation about these two kind of DataSource?
Both are almost same (do not mix it with Polling data source), in fact XA is
build on top of PGConnectionPool. Difference between those is transaction
managment, XA requires transaction manager as every XA resource and needs to
implement specific interface, PGConnectionPool doesn't require it. I can't
imagine XA resource without transactions, probably this may work like
autocommit.

> If I will use a multinode postgres managed by pgpool, which DataSource suits
> my needs?
There should be no difference, both connection will connect to pgpool.

In any case I suggest you to try to use @TransactionAttribute(REQUIRES_NEW) or
@TransactionManagement(BEAN). Such application that relies on Glassfish
specific feature like non transactional connection will not be portable.

> Thanks in advance.
>
> Meph
>
>
>
>
> --
> View this message in context:
> http://postgresql.1045698.n5.nabble.com/Postgres-JDBC-WS-and-commit-tp56976
> 57p5702984.html Sent from the PostgreSQL - jdbc mailing list archive at
> Nabble.com.

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Radosław Smogura 2012-05-13 19:10:19 Re: Fwd: Postgres JDBC, WS and commit
Previous Message Bernard 2012-05-12 21:30:41 Re: Fwd: Cannot pass null in Parameter in Query for ISNULL