Re: Experiences with pl/Java

From: Edson Richter <edsonrichter(at)hotmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Experiences with pl/Java
Date: 2012-11-19 17:42:19
Message-ID: BLU0-SMTP3229B27851F4A4C42FDC418CF560@phx.gbl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Em 19/11/2012 15:26, Welty, Richard escreveu:
> Edson Richter [edsonrichter(at)hotmail(dot)com] writes:
>
>> I don't know much about PostgreSQL with plJava, but I can give a few
>> tips about memory stability when using Java (see inline):
> ...
>> In the past, one choice was using static classes whenever possible. This
>> is not true (neither recommended) anymore, and in most of the cases
>> having thousands of cicles creation-use-release makes GC more effective
>> (and your VM more stable).
> PL/Java requires that the methods being directly called from PostgreSQL are static.
> while i don't disagree with the advice, PL/Java is limited in this respect.

:-) as I said, I know little about pl/Java... thanks for pointing this out.
So, after calling the static method, probably inside the static methods,
the programmer will create his/her logic. Writing this logic considering
GC behavior would make your apps more stable.
I would recommend to not use any Java library that keeps "caches" (ones
like EclipseLink or Hibernate), unless you know exactly how to configure
caches and soft/weak references - and their limitations.

Regards,

Edson

>
> richard
>
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Vlad 2012-11-19 18:02:23 Re: High SYS CPU - need advise
Previous Message Welty, Richard 2012-11-19 17:26:44 Re: Experiences with pl/Java