Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id 37119137D6F3 for ; Mon, 14 May 2012 07:27:25 -0300 (ADT) Received: from static-ip-217-118-26-141.inaddr.ip-pool.com ([217.118.26.141] helo=mail.softperience.eu) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1STsUo-00005M-Kh for pgsql-jdbc@postgresql.org; Mon, 14 May 2012 10:27:23 +0000 Received: from mail.softperience.eu (loft2296 [217.118.26.141]) by mail.softperience.eu (Postfix) with ESMTPA id 5A71BC00035; Mon, 14 May 2012 12:26:58 +0200 (CEST) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Date: Mon, 14 May 2012 12:26:58 +0200 From: =?UTF-8?Q?Rados=C5=82aw_Smogura?= To: Mephysto Cc: Subject: Re: Fwd: Postgres JDBC, WS and commit In-Reply-To: References: <1336576000350-5697657.post@n5.nabble.com> <1336741691434-5702984.post@n5.nabble.com> <1986400.Upn4gYaEoZ@radekdesktop> <60775583.hWYqdVicEv@radekdesktop> Message-ID: X-Sender: rsmogura@softperience.eu User-Agent: Roundcube Webmail/0.5.4 Content-Transfer-Encoding: quoted-printable X-Pg-Spam-Score: -0.8 (/) X-Archive-Number: 201205/36 X-Sequence-Number: 22936 Hi, This may means, but I'm not quite sure: - you don't have commit, when you close connection rollback is fired if=20 connection is not in autocommit mode. - I suspect you may lock row (this connection that have null), so check=20 if other request do not wait, you may do this with viusalvm, or any=20 debugger inspecting all threads stacks. Or if you use multinode this may be root problem too, there was some=20 posts about syncing master-slave. Regards, Radek On Mon, 14 May 2012 08:41:32 +0200, Mephysto wrote: > Hi Radoslaw, > I was referring to Glassfish threads. I dont run any other thread=20 > from > my ejb. > > The problem is that sometimes, in this configuration, I retrieve null > output from data from database, but indeed the real value is not=20 > null. > > Thank you very much. > > Meph > > On 13 May 2012 21:10, Rados=C5=82aw Smogura wrote: > >> Sorry for replaying for self. >> >> Dnia niedziela, 13 maja 2012 21:01:16 Rados=C5=82aw Smogura pisze: >> >>> Dnia pi=C3=84=E2=80=A6tek, 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 dont know the reason of these problems. >> > >> > Actually non transactional connection makes connections unmanaged >> by >> > Glassfishs transaction manager, so EJB as well. >> Threads? What kind of problems do you have? You should not use >> threads in EJB >> and Web. >> >> > > 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 doesnt require >> it. I >> > cant 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: >> > > >> >=20 > http://postgresql.1045698.n5.nabble.com/Postgres-JDBC-WS-and-commit-tp5= 697 >> [1] >> > > 6 >> > > 57p5702984.html Sent from the PostgreSQL - jdbc mailing list >> archive at >> > > Nabble.com. > > > > Links: > ------ > [1] >=20 > http://postgresql.1045698.n5.nabble.com/Postgres-JDBC-WS-and-commit-tp5= 697 > [2] mailto:rsmogura@softperience.eu