[postgis-users] SpatialEJB3: (PostGIS and Hibernate)

Markus Schaber schabi at logix-tt.com
Mon Jan 29 05:58:32 PST 2007


Hi, David,

"David Potts" <dave.potts at pinan.co.uk> wrote:

> But several months ago I was going to implement a trigger function using
> postgres/j( an jvm within the database), since I also wanted to use
> postgis in the same application,  I was told that the both products used
> different versions of the java jdbc driver.

I only know about PlJava, and PL/J, but not about postgres/j by now -
can you send me an URL?

PlJava links the jvm directly into the backend via JNI or GCJ, while
pl/j uses a remote interface into a separately running JVM.

Weird that there are 3 projects trying to bring java into the backend,
I wonder what path the postgres/j people are going.


To the JDBC question:

The Pl/Java JDBC implementation (Mainly used to issue subqueries from
inside the stored procedures) barely shares a single line of code with
the PGJDBC driver most java clients use to access PostgreSQL.

The reason for this is that the first one is mapped to the PostgreSQL
internal SPI interface via JNI, the second one communicates via TCP and
the V3 query protocol with the backend.

Hence, even the representation for internal and custom datatypes is
different between the two interfaces, so it really doesn't make much
sense to share lots of code between the drivers.

There's a nearly-finished PostGIS interface for pl/java which could be
used in stored procedures (still lacking curve support, however), but
it needs some fixing for the varlen custom datatype mapping, and up to
now, I did not find enough motivation to finish that task because JNI
is just butt ulgy. :-(

Regards,
Markus

-- 
Markus Schaber | Logical Tracking&Tracing International AG
Dipl. Inf.     | Software Development GIS

Fight against software patents in Europe! www.ffii.org
www.nosoftwarepatents.org



More information about the postgis-users mailing list