[Pljava-dev] Is it safe to use multi-threaded PL/Java in single-threaded postgres process?

From: pierce at hogranch(dot)com (John R Pierce)
To:
Subject: [Pljava-dev] Is it safe to use multi-threaded PL/Java in single-threaded postgres process?
Date: 2014-03-16 05:10:47
Message-ID: 53253257.8070702@hogranch.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pljava-dev

On 3/15/2014 9:05 PM, MauMau wrote:
> Could you elaborate on this? The details should be the answer I'm
> looking for.
> As I said as below, it doesn't seem that PL/Java obeys the JNI spec,
> because pljava.so is not compiled with -mt, -D_REENTRANT nor
> -D_POSIX_C_SOURCE. In short, I'd like to know why it is safe to make
> JVM to load single-threaded pljava.so.
>
>>> FYI, JNI specification says that the code called from Java VM should
>>> be built for multi-threading as follows. But postgres is not.
'
JNI has two sides to it. nonjava stuff calling into java, and Java
calling into non-java. pl/java implements the first style, non-java
code (postgres core) calling java.

--
john r pierce 37N 122W
somewhere on the middle of the left coast

In response to

Browse pljava-dev by date

  From Date Subject
Next Message Hal Hildebrand 2014-03-17 04:58:52 [Pljava-dev] Adding support for the UUID column type in PL/Java
Previous Message MauMau 2014-03-16 04:05:30 [Pljava-dev] Is it safe to use multi-threaded PL/Java in single-threaded postgres process?