agora inbox for pljava-dev@postgresql.org
help / color / mirror / Atom feed[Pljava-dev] pl/java and concurrency
2+ messages / 0 participants
[nested] [flat]
* [Pljava-dev] pl/java and concurrency
@ 2012-04-28 22:02
0 siblings, 1 reply; 2+ messages in thread
From: @ 2012-04-28 22:02 UTC (permalink / raw)
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pgfoundry.org/pipermail/pljava-dev/attachments/20120428/5d81c9ab/attachment.html;
^ permalink raw reply [nested|flat] 2+ messages in thread
* [Pljava-dev] pl/java and concurrency
@ 2012-04-29 12:37
parent:
0 siblings, 0 replies; 2+ messages in thread
From: @ 2012-04-29 12:37 UTC (permalink / raw)
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;
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2012-04-29 12:37 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2012-04-28 22:02 [Pljava-dev] pl/java and concurrency
2012-04-29 12:37 `
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox