[postgis-users] PostGIS and Hibernate

Norman Barker nbarker at ittvis.com
Fri Jul 27 00:51:40 PDT 2007


Thorsten,

MAJAS was the project I was referring to, I have started a dialog with them to see where the postgis hibernate code should reside.  MAJAS is considerably more advanced than the code in postgis svn - but they both work.  At the moment hibernate spatial code exists on the hibernate wiki (oracle), postgis svn and majas, and looking at foss4g within another project too - all of it independent (though I think I was first :-) !!)

Once you have cracked the mapping to the spatial type, everything else is just standard hibernate, and the rest is just trying to be creative with existing enterprise technologies in the spatial domain.  MAJAS looks good though.

I hope the team from MAJAS will comment on this, I would rather we all contributed to one hibernate spatial code base with the focus on postgis.

I wonder if the next big play should really be with hibernate tools and auto-generate web apps based on spatial DBs, Grails being an excellent candidate, and Seam the other.  The Seam code works already (thanks JBoss), but will require a little customisation for spatial editing.  In the simplest case this would give you a form editor for postgis for any DB, and in the more advanced scenario graphical editing of rendered geometries.

Since I am finally doing the big hop across the pond this week (relocating to Boulder), it will be a couple of weeks before I can do anything, but I have some prelim code for this.

Norman

-----Original Message-----
From: postgis-users-bounces at postgis.refractions.net on behalf of Thorsten Kraus
Sent: Fri 7/27/2007 8:42 AM
To: PostGIS Users Discussion
Subject: AW: [postgis-users] PostGIS and Hibernate
 
Hi Andy,
 
I will try the tutorial and then I see if it works fine or not.
Just googled a little bit and perhaps I found a more interesting project which brings Hibernate and PostGIS together: MAJAS Hibernate Spatial ( http://www.cadrie.com/projects/majas-hibernate/ ).
Is anyone here who has experience with MAJAS?

Bye
Thorsten

-----Ursprüngliche Nachricht-----
Von: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-bounces at postgis.refractions.net]Im Auftrag von Andy Dale
Gesendet: Freitag, 27. Juli 2007 09:39
An: PostGIS Users Discussion
Betreff: Re: [postgis-users] PostGIS and Hibernate


Throsten,

I will try to answer your questions the best I can :

1) UserTypes are an offical Hibernate component thats lets you add mappings that Hibernate can use for non standard datatype, i.e. Geometry.  Seems as Norman wrote this specific UserType I don't think it will be supported by the Hibernate Team, but the should be able to provide general help on user types though. 

2) Seems as JBoss uses an embedded version of Tomcat, it should be possible.  I don't really know how to deploy stuff in Tomcat, but you should just put the user type in your .war or where the hibernate jars are. 

Cheers,

Andy


On 27/07/07, Thorsten Kraus < Thorsten.Kraus at ptv.de> wrote: 

Hi Andy,
 
thanks for this useful information. I read the ejb3spatial.pdf and have some further questions on this topic :)
 
1. You mentioned that Norman Barker has created a user type for Hibernate. Is this user type an official component of the Hibernate framework or is it an addition where no support from the Hibernate team is guaranteed?
 
2. The tutorial in the pdf uses JBoss as application server. In my project I use Tomcat. So Tomcat is not a full application server, I think it is not possible to use Hibernate for PostGIS access in my project without changing the application server. Is this right?
 
Thanks,
Thorsten

-----Ursprüngliche Nachricht-----
Von: postgis-users-bounces at postgis.refractions.net [mailto: postgis-users-bounces at postgis.refractions.net]Im Auftrag von Andy Dale
Gesendet: Freitag, 27. Juli 2007 09:10
An: PostGIS Users Discussion
Betreff: Re: [postgis-users] PostGIS and Hibernate


Hi Thorsten,

A person called Norman Barker has created a user type for Hibernate, this can be accessed here http://svn.refractions.net/postgis/trunk/java/ejb3/  <http://svn.refractions.net/postgis/trunk/java/ejb3/> also read the ejb3spatial.pdf located here as it gives a example of how to use it.

Cheers,

Andy




On 27/07/07, Thorsten Kraus < Thorsten.Kraus at ptv.de> wrote: 

Hi all, 

currently I am working for a project which uses PostGIS to store spatial objects in the backend of an web application (Tomcat is used as servlet container). Some time ago I searched the web for Hibernate support for PostGIS database and its geographical objects, but found nothing suitable. So I use Hibernate for non geographical attribute data and wrote some JDBC code for accessing the geographical objects in PostGIS. This hybrid structure of Hibernate and JDBC works fine, but it would even be nicer and more flexible if there was a possibility to handle all the database stuff with Hibernate. 

Can you tell me if there is Hibernate support for PostGIS meanwhile? If yes, a piece of code or a link to a tutorial would be pleasant.

Kind regards, 
Thorsten 


_______________________________________________
postgis-users mailing list
postgis-users at postgis.refractions.net  <mailto:postgis-users at postgis.refractions.net> 
http://postgis.refractions.net/mailman/listinfo/postgis-users 





_______________________________________________
postgis-users mailing list
postgis-users at postgis.refractions.net  <mailto:postgis-users at postgis.refractions.net> 
http://postgis.refractions.net/mailman/listinfo/postgis-users





-------------- next part --------------
A non-text attachment was scrubbed...
Name: winmail.dat
Type: application/ms-tnef
Size: 5222 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20070727/468fced3/attachment.bin>


More information about the postgis-users mailing list