[Pljava-dev] doubtful PL/Java's activity

From: thomas at tada(dot)se (Thomas Hallgren)
To:
Subject: [Pljava-dev] doubtful PL/Java's activity
Date: 2013-12-20 10:02:16
Message-ID: 52B415A8.5020402@tada.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pljava-dev

I'm sorry Taniguchi, but then I don't understand what you're concerned about. You write:

> Java multi thread application can run thread-unsafe function in single thread library through JNI.
> But, this case is abuse.

and I've explained to you that it is _impossible_ that multiple threads do this simultaneously. It's all well protected
using mutex. So where is the abuse?

- thomas

On 2013-12-20 07:34, Taniguchi, Yasunori wrote:
> Hi, Mr. Thomas,
>
> "application" I described means general application like postgres, PL/Java library, JavaVM and so on.
> It's not database client application.
>
> postgres(single thread compiled) <=> PL/Java lib(multi thread compiled) <=> JavaVM lib(multi thread compiled)
>
>
> My recognition is :
>
> - no global variable is passed across between postgres and PL/Java lib, JavaVM lib
> (only function arguments and return value are passed across.)
>
> - PL/Java lib, JavaVM lib functions never call functions in postgres lib.
>
>
>
> Regards, Taniguchi
>
>
> -----Original Message-----
> From: pljava-dev-bounces at lists.pgfoundry.org [mailto:pljava-dev-bounces at lists.pgfoundry.org] On Behalf Of Thomas Hallgren
> Sent: Friday, December 20, 2013 3:14 PM
> To: pljava-dev at lists.pgfoundry.org
> Subject: Re: [Pljava-dev] doubtful PL/Java's activity
>
> On 2013-12-20 05:51, Taniguchi, Yasunori wrote:
>> Thank you, Mr. Thomas,
>>
>> Sorry for my late response.
>>
>>> The backend is single threaded (each connection runs in it's own process and it's own JVM) so there will never be two functions executing simultanously.
>> Yes, I understand.
>> But, multi thread applications (unless using concurrent JDBC call) can run in JavaVM even if postgres backend is single threaded, I think.
> Each connection that a multi threaded client application opens is attached to one single threaded backend process and hence, each connection will run in its own JVM. These connections cannot access the same global data since they live in different process spaces.
>
> - thomas
>
> _______________________________________________
> Pljava-dev mailing list
> Pljava-dev at lists.pgfoundry.org
> http://lists.pgfoundry.org/mailman/listinfo/pljava-dev
> _______________________________________________
> Pljava-dev mailing list
> Pljava-dev at lists.pgfoundry.org
> http://lists.pgfoundry.org/mailman/listinfo/pljava-dev

In response to

Responses

Browse pljava-dev by date

  From Date Subject
Next Message Hal Hildebrand 2013-12-20 12:53:11 [Pljava-dev] doubtful PL/Java's activity
Previous Message Taniguchi, Yasunori 2013-12-20 06:34:59 [Pljava-dev] doubtful PL/Java's activity