From: | thomas at tada(dot)se (Thomas Hallgren) |
---|---|
To: | |
Subject: | [Pljava-dev] pl/java and concurrency |
Date: | 2012-04-29 12:37:57 |
Message-ID: | 4F9D3625.2080106@tada.se |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pljava-dev |
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: <http://lists.pgfoundry.org/pipermail/pljava-dev/attachments/20120429/28d2f474/attachment.html>
From | Date | Subject | |
---|---|---|---|
Next Message | Welty, Richard | 2012-04-30 18:44:45 | [Pljava-dev] can't find libjvm |
Previous Message | Welty, Richard | 2012-04-28 22:02:53 | [Pljava-dev] pl/java and concurrency |