<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7638.1">
<TITLE>RE: [postgis-users] RE: RE: PostGIS - hibernate - EJB3</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->

<P><FONT SIZE=2>Hi,<BR>
<BR>
I have been a bit busy, but it is my intention to write a simple 'spatial' tutorial on EJB3 using the postgis geometry type, the functionality will be simple but should get you started.&nbsp; I know I said I would have it done by last w/end so I will put it top on my priority list.<BR>
<BR>
Apologies for the delay, posting code with no instructions is bad!<BR>
<BR>
Norman<BR>
<BR>
<BR>
-----Original Message-----<BR>
From: postgis-users-bounces@postgis.refractions.net on behalf of coster<BR>
Sent: Tue 9/5/2006 6:49 AM<BR>
To: postgis-users@postgis.refractions.net<BR>
Subject: [postgis-users] RE: RE: PostGIS - hibernate - EJB3<BR>
<BR>
<BR>
hi,<BR>
I have the same problem with JBoss and EJB3.<BR>
The column is type &quot;oid&quot; instead of &quot;geometry&quot;.<BR>
<BR>
I would be very grateful for a solution - here are my postgis-ds.xml and my<BR>
persistence.xml:<BR>
<BR>
&lt;datasources&gt;<BR>
&nbsp; &lt;local-tx-datasource&gt;<BR>
&nbsp;&nbsp;&nbsp; &lt;jndi-name&gt;PostgisDS&lt;/jndi-name&gt;<BR>
&nbsp;&nbsp;&nbsp; &lt;connection-url&gt;jdbc:postgresql://xxx:5432/tourguide&lt;/connection-url&gt;<BR>
&nbsp;&nbsp;&nbsp; &lt;driver-class&gt;org.postgis.DriverWrapper&lt;/driver-class&gt;<BR>
&nbsp;&nbsp;&nbsp; &lt;user-name&gt;xxx&lt;/user-name&gt;<BR>
&nbsp;&nbsp;&nbsp; &lt;password&gt;xxx&lt;/password&gt;<BR>
&nbsp;&nbsp;&nbsp; &lt;new-connection-sql&gt;select 1&lt;/new-connection-sql&gt;<BR>
&nbsp;&nbsp;&nbsp; &lt;check-valid-connection-sql&gt;select 1&lt;/check-valid-connection-sql&gt;&nbsp;<BR>
&nbsp;&nbsp;&nbsp; &lt;metadata&gt;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;type-mapping&gt;PostgreSQL 8.1&lt;/type-mapping&gt;<BR>
&nbsp;&nbsp;&nbsp; &lt;/metadata&gt;<BR>
&nbsp; &lt;/local-tx-datasource&gt;<BR>
&lt;/datasources&gt;<BR>
<BR>
&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;<BR>
&lt;persistence xmlns=&quot;<A HREF="http://java.sun.com/xml/ns/persistence">http://java.sun.com/xml/ns/persistence</A>&quot;&gt;<BR>
&nbsp;&nbsp;&nbsp; &lt;persistence-unit name=&quot;tourguide&quot;&gt;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;jta-data-source&gt;java:/PostgisDS&lt;/jta-data-source&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;properties&gt;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;property name=&quot;hibernate.dialect&quot;<BR>
value=&quot;org.hibernate.dialect.PostgreSQLDialect&quot;/&gt;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;property name=&quot;hibernate.hbm2ddl.auto&quot; value=&quot;update&quot;/&gt;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;property name=&quot;hibernate.show_sql&quot; value=&quot;true&quot;/&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/properties&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>
&nbsp;&nbsp;&nbsp; &lt;/persistence-unit&gt;<BR>
&lt;/persistence&gt;<BR>
<BR>
Thanks!<BR>
Christian.<BR>
<BR>
<BR>
Norman Barker-3 wrote:<BR>
&gt;<BR>
&gt;<BR>
&gt;<BR>
&gt; -----Original Message-----<BR>
&gt; From: postgis-users-bounces@postgis.refractions.net<BR>
&gt; [<A HREF="mailto:postgis-users-bounces@postgis.refractions.net">mailto:postgis-users-bounces@postgis.refractions.net</A>] On Behalf Of<BR>
&gt; croisfert<BR>
&gt; Sent: Monday, August 21, 2006 2:54 AM<BR>
&gt; To: postgis-users@postgis.refractions.net<BR>
&gt; Subject: [postgis-users] RE: PostGIS - hibernate - EJB3<BR>
&gt;<BR>
&gt;<BR>
&gt; hi,&nbsp; I am trying to use custom UserType, but it work fine in a pure<BR>
&gt; Hibernate<BR>
&gt; implementation , but not in JBOSS EJB3, the generated geometry column in<BR>
&gt; postgres is of type &quot;oid&quot; instead of &quot;geometry&quot;&nbsp;&nbsp;&nbsp; You have any<BR>
&gt; suggestion,<BR>
&gt; i am using jboss-EJB-3.0_RC8-FD and postgis 1.1.3 (on postgres 8.1.4)<BR>
&gt;<BR>
&gt;<BR>
&gt; thanks.<BR>
&gt; --<BR>
&gt;<BR>
&gt;<BR>
&gt; Make sure that the usertype is available on your classpath, I have only<BR>
&gt; tested it with the Geometry Column type (as the name implies!!), I also<BR>
&gt; set up postgis as a datasource within JBoss - postgis-ds.xml, and<BR>
&gt; configured the persistence.xml.&nbsp; I am writing up a doc for this shortly;<BR>
&gt; just don't have too much time this week.<BR>
&gt;<BR>
&gt; Norman<BR>
&gt; _______________________________________________<BR>
&gt; postgis-users mailing list<BR>
&gt; postgis-users@postgis.refractions.net<BR>
&gt; <A HREF="http://postgis.refractions.net/mailman/listinfo/postgis-users">http://postgis.refractions.net/mailman/listinfo/postgis-users</A><BR>
&gt;<BR>
&gt;<BR>
<BR>
--<BR>
View this message in context: <A HREF="http://www.nabble.com/PostGIS---hibernate---EJB3-tf2064211.html#a6146402">http://www.nabble.com/PostGIS---hibernate---EJB3-tf2064211.html#a6146402</A><BR>
Sent from the PostGIS - User forum at Nabble.com.<BR>
<BR>
_______________________________________________<BR>
postgis-users mailing list<BR>
postgis-users@postgis.refractions.net<BR>
<A HREF="http://postgis.refractions.net/mailman/listinfo/postgis-users">http://postgis.refractions.net/mailman/listinfo/postgis-users</A><BR>
<BR>
</FONT>
</P>

</BODY>
</HTML>