<!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.  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 "oid" instead of "geometry".<BR>
<BR>
I would be very grateful for a solution - here are my postgis-ds.xml and my<BR>
persistence.xml:<BR>
<BR>
<datasources><BR>
  <local-tx-datasource><BR>
    <jndi-name>PostgisDS</jndi-name><BR>
    <connection-url>jdbc:postgresql://xxx:5432/tourguide</connection-url><BR>
    <driver-class>org.postgis.DriverWrapper</driver-class><BR>
    <user-name>xxx</user-name><BR>
    <password>xxx</password><BR>
    <new-connection-sql>select 1</new-connection-sql><BR>
    <check-valid-connection-sql>select 1</check-valid-connection-sql> <BR>
    <metadata><BR>
       <type-mapping>PostgreSQL 8.1</type-mapping><BR>
    </metadata><BR>
  </local-tx-datasource><BR>
</datasources><BR>
<BR>
<?xml version="1.0" encoding="UTF-8"?><BR>
<persistence xmlns="<A HREF="http://java.sun.com/xml/ns/persistence">http://java.sun.com/xml/ns/persistence</A>"><BR>
    <persistence-unit name="tourguide"><BR>
        <jta-data-source>java:/PostgisDS</jta-data-source>                     <BR>
        <properties><BR>
            <property name="hibernate.dialect"<BR>
value="org.hibernate.dialect.PostgreSQLDialect"/><BR>
            <property name="hibernate.hbm2ddl.auto" value="update"/><BR>
            <property name="hibernate.show_sql" value="true"/>           <BR>
         </properties>       <BR>
    </persistence-unit><BR>
</persistence><BR>
<BR>
Thanks!<BR>
Christian.<BR>
<BR>
<BR>
Norman Barker-3 wrote:<BR>
><BR>
><BR>
><BR>
> -----Original Message-----<BR>
> From: postgis-users-bounces@postgis.refractions.net<BR>
> [<A HREF="mailto:postgis-users-bounces@postgis.refractions.net">mailto:postgis-users-bounces@postgis.refractions.net</A>] On Behalf Of<BR>
> croisfert<BR>
> Sent: Monday, August 21, 2006 2:54 AM<BR>
> To: postgis-users@postgis.refractions.net<BR>
> Subject: [postgis-users] RE: PostGIS - hibernate - EJB3<BR>
><BR>
><BR>
> hi,  I am trying to use custom UserType, but it work fine in a pure<BR>
> Hibernate<BR>
> implementation , but not in JBOSS EJB3, the generated geometry column in<BR>
> postgres is of type "oid" instead of "geometry"    You have any<BR>
> suggestion,<BR>
> i am using jboss-EJB-3.0_RC8-FD and postgis 1.1.3 (on postgres 8.1.4)<BR>
><BR>
><BR>
> thanks.<BR>
> --<BR>
><BR>
><BR>
> Make sure that the usertype is available on your classpath, I have only<BR>
> tested it with the Geometry Column type (as the name implies!!), I also<BR>
> set up postgis as a datasource within JBoss - postgis-ds.xml, and<BR>
> configured the persistence.xml.  I am writing up a doc for this shortly;<BR>
> just don't have too much time this week.<BR>
><BR>
> Norman<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>
><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>