Edson Richter [edsonrichter@xxxxxxxxxxx] writes: >Em 19/11/2012 15:26, Welty, Richard escreveu: >> 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. i would probably recommend severely limiting what you try to do in PL/Java. in my particular project, the overall goal was incrementally doing push updates to an Apache Solr search engine. this entailed building xml descriptions of the update that was required, sending it with an http request (which required untrusted pl/java), and providing a recovery & retry mechanism in case the http request failed, which limited itself to using the provided jdbc. i got it working and working well, but i put a lot of care into insuring that the garbage collecter never got stressed very hard and i didn't try to do more than was strictly necessary. i'd argue that if you find yourself wanting to use hibernate or eclipselink down in PL/Java, you should rethink your application design. richard -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general