pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Oliver Jowett <oliver@opencloud.com>
To: peter <peter@greatnowhere.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: Totally weird behaviour in org.postgresql.Driver
Date: Mon, 16 Mar 2009 13:58:36 +1300
Message-ID: <49BDA43C.7000308@opencloud.com> (raw)
In-Reply-To: <49bcfe15$0$1344$834e42db@reader.greatnowhere.com>
References: <49b7bfef$0$1343$834e42db@reader.greatnowhere.com>
	<491f66a50903120342j67e87c7dob10cfdc23580c8f4@mail.gmail.com>
	<003001c9a315$a68a9330$f39fb990$@com>
	<200903121341.59498.cservin@cromagnon.com>
	<49bca9e8$0$1341$834e42db@reader.greatnowhere.com>
	<491f66a50903150409y648b448pc3825ef4fc1ed7e@mail.gmail.com>
	<49bcfe15$0$1344$834e42db@reader.greatnowhere.com>

peter wrote:
>>         
>>         Thanks for sharing the tip! What adjustments exactly did you
>>         have to make? I
>>         just make every user to log on with different PG username. Are
>>         there any
>>         other options?
>>
>> It's fairly unusual to have a tomcat application of any size login to
>> the db as the user. Could you share the reason why ?
>>
> 
> The app is actually middleware for Adobe Flex frontend and PG backend,
> not a regular web app. The architecture requires PG to know which user
> has connected (lots of heavy lifting takes place in PG), and we so far
> havent found any other way how to let PG know which user has connected.
> The only alternative was to supply user ID in every PG function call but
> that is messy and introduces it's own limitations as well. If you have
> any suggestions I'm all ears! ;)

JCA's' pooling API in theory has the ability to distinguish different
connections on the basis of credentials (and you can map that to JDBC),
but I'm not sure if there are any pool implementations out there that
make use of it. You'd need some decent pool logic to avoid thrashing
connections depending on the number of unique users you have.

-O



view thread (22+ messages)  latest in thread

Message-ID: <49BDA43C.7000308@opencloud.com>
Permalink:  ../49BDA43C.7000308@opencloud.com/
Also on:    postgresql.org/message-id/49BDA43C.7000308@opencloud.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: oliver@opencloud.com, peter@greatnowhere.com
  Subject: Re: Totally weird behaviour in org.postgresql.Driver
  In-Reply-To: <49BDA43C.7000308@opencloud.com>
  References: <49b7bfef$0$1343$834e42db@reader.greatnowhere.com> <491f66a50903120342j67e87c7dob10cfdc23580c8f4@mail.gmail.com> <003001c9a315$a68a9330$f39fb990$@com> <200903121341.59498.cservin@cromagnon.com> <49bca9e8$0$1341$834e42db@reader.greatnowhere.com> <491f66a50903150409y648b448pc3825ef4fc1ed7e@mail.gmail.com> <49bcfe15$0$1344$834e42db@reader.greatnowhere.com> <49BDA43C.7000308@opencloud.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox