1 <?xml version=
"1.0" encoding=
"UTF-8"?>
2 <beans xmlns=
"http://www.springframework.org/schema/beans"
3 xmlns:
xsi=
"http://www.w3.org/2001/XMLSchema-instance" xmlns:
osgi=
"http://www.springframework.org/schema/osgi"
5 http://www.springframework.org/schema/beans
6 http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
7 http://www.springframework.org/schema/osgi
8 http://www.springframework.org/schema/osgi/spring-osgi-1.1.xsd
11 <bean id=
"sessionFactory"
12 class=
"org.springframework.orm.hibernate3.LocalSessionFactoryBean"
13 depends-on=
"hibernateSpatialContext">
14 <property name=
"dataSource" ref=
"dataSource" />
15 <property name=
"hibernateProperties">
17 hibernate.dialect=org.hibernatespatial.postgis.PostgisDialect
18 hibernate.hbm2ddl.auto=create
19 hibernate.current_session_context_class=thread
20 hibernate.jdbc.batch_size=
100
23 <property name=
"mappingResources">
25 <value>org/argeo/slc/gpx/hibernate/TrackPoint.hbm.xml
</value>
26 <value>org/argeo/slc/gpx/hibernate/TrackSegment.hbm.xml
</value>
27 <value>org/argeo/slc/gpx/hibernate/TrackSpeed.hbm.xml
</value>
32 <bean id=
"trackDao" class=
"org.argeo.slc.gpx.hibernate.HibernateTrackDao">
33 <property name=
"sessionFactory" ref=
"sessionFactory" />
34 <property name=
"batchSize" value=
"100" />
35 <!-- <property name="targetSrid" value="3857" /> -->
36 <property name=
"targetSrid" value=
"4326" />
40 class=
"org.springframework.jdbc.datasource.SingleConnectionDataSource"
41 destroy-method=
"destroy" lazy-init=
"true">
42 <property name=
"driverClassName" value=
"org.postgresql.Driver" />
43 <property name=
"url" value=
"jdbc:postgresql://localhost/slc_gis" />
44 <property name=
"username" value=
"argeo" />
45 <property name=
"password" value=
"argeo" />
46 <property name=
"suppressClose" value=
"true" />
50 <bean id=
"hibernateSpatialContext" class=
"org.argeo.slc.gpx.hibernate.HibernateSpatialContext"
52 <property name=
"defaultDialect" ref=
"postGisDialect" />
55 <bean id=
"postGisDialect" class=
"org.hibernatespatial.postgis.PostgisDialect" />
57 <!-- <bean id="hibernateSpatialClassLoader" -->
58 <!-- class="org.springframework.osgi.util.BundleDelegatingClassLoader" -->
59 <!-- factory-method="createBundleClassLoaderFor"> -->
60 <!-- <constructor-arg> -->
61 <!-- <osgi:bundle symbolic-name="org.argeo.dep.osgi.hibernatespatial" /> -->
62 <!-- </constructor-arg> -->