From: thomas at tada.se (Thomas Hallgren) Date: Sun, 29 Apr 2012 14:37:57 +0200 Subject: [Pljava-dev] pl/java and concurrency In-Reply-To: References: Message-ID: <4F9D3625.2080106@tada.se> Hi Richard, Each connection in PostgreSQL runs in a process of its own. It's not a multi threaded server architecture. This means that each connection will have a JVM of its own which means that there's no real concurrency. If code inside a trigger spawns multiple threads that in turn performs database accesses using the internal PL/Java jdbc driver, then PL/Java will synchronize those calls and only allow one at a time. It has to be that way since they all share the same connection (and the same transaction). HTH, Thomas Hallgren On 2012-04-29 00:02, Welty, Richard wrote: > > i'm looking a pl/java as a possible implementation language for a > trigger function. > > the trigger is going to need to do a couple of selects, build an xml > string and then issue an http request. > it has the potential to be rather busy. > > i understand the reason why entry points need to be statics, but i'd > like to understand how pl/java > deals with concurrency. could someone please outline how this works? > > the solution will be running on amazon ec2 linux instances, postgresql > 9.1.3. the installed jdk is > openjdk 1.6 > > thanks, > richard > > > > _______________________________________________ > Pljava-dev mailing list > Pljava-dev at pgfoundry.org > http://pgfoundry.org/mailman/listinfo/pljava-dev -------------- next part -------------- An HTML attachment was scrubbed... URL: