Re: Experiences with pl/Java - Mailing list pgsql-general

From Edson Richter
Subject Re: Experiences with pl/Java
Date
Msg-id BLU0-SMTP3229B27851F4A4C42FDC418CF560@phx.gbl
Whole thread Raw
In response to Re: Experiences with pl/Java  ("Welty, Richard" <rwelty@ltionline.com>)
Responses Re: Experiences with pl/Java
List pgsql-general
Em 19/11/2012 15:26, Welty, Richard escreveu:
> Edson Richter [edsonrichter@hotmail.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
>
>



pgsql-general by date:

Previous
From: "Welty, Richard"
Date:
Subject: Re: Experiences with pl/Java
Next
From: Joe Van Dyk
Date:
Subject: PITR manual doesn't reference pg_receivexlog?