Salome HOME
Id now is Long instead of Integer. First unit test is created. hibernate-3.5.jar...
[tools/siman.git] / Workspace / Siman-Common / src / spring / globalContext.xml
index bc9b67ae74e53cb5ba99f3e06ce8a73f0aaf326d..ac60f7f47f9314f07d9c190671bb58da9c9b345b 100644 (file)
@@ -3,16 +3,13 @@
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xmlns:aop="http://www.springframework.org/schema/aop"
        xmlns:context="http://www.springframework.org/schema/context"
-       xmlns:tx="http://www.springframework.org/schema/tx"
        xsi:schemaLocation="
 http://www.springframework.org/schema/beans
 http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
 http://www.springframework.org/schema/aop
 http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
 http://www.springframework.org/schema/context
-http://www.springframework.org/schema/context/spring-context-3.0.xsd
-http://www.springframework.org/schema/tx
-http://www.springframework.org/schema/tx/spring-tx-3.0.xsd">
+http://www.springframework.org/schema/context/spring-context-3.0.xsd">
 
        <bean id="baseMessageSource" class="org.springframework.context.support.ResourceBundleMessageSource">
                <property name="basenames">
@@ -22,119 +19,7 @@ http://www.springframework.org/schema/tx/spring-tx-3.0.xsd">
                        </list>
                </property>
        </bean>
-
-       <!--    <bean id="simanDataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
-               <property name="jndiName" value="jdbc/ibatis"/>
-               </bean> -->
-
-       <!--    <bean id="simanDatasource"
-               class="org.springframework.jdbc.datasource.DriverManagerDataSource">
-               <property name="driverClassName"
-                       value="${connection.driver_class}" />
-               <property name="url" value="${connection.url}" />
-               <property name="username" value="${connection.username}" />
-               <property name="password" value="${connection.password}" />
-       </bean>
-       -->
-
-       <context:property-placeholder
-               location="classpath:siman.properties,classpath:jdbc.properties"
-               ignore-unresolvable="true" />
-
-       <bean id="simanDatasource"
-               class="org.springframework.jdbc.datasource.SingleConnectionDataSource">
-               <property name="driverClassName"
-                       value="${connection.driver_class}" />
-               <property name="url" value="${connection.url}" />
-               <property name="username" value="${connection.username}" />
-               <property name="password" value="${connection.password}" />
-               <property name="suppressClose" value="true" />
-               <property name="autoCommit" value="false" />
-       </bean>
-
-       <bean id="p6spySimanDatasource"
-               class="com.p6spy.engine.spy.P6DataSource">
-               <constructor-arg>
-                       <ref local="simanDatasource" />
-               </constructor-arg>
-       </bean>
-
-
-       <bean id="hibernateProperties"
-               class="org.springframework.beans.factory.config.PropertiesFactoryBean">
-               <property name="properties">
-                       <props>
-                               <!-- normal properties -->
-                       </props>
-               </property>
-               <!-- hibernate.config should be defined somewhere in the spring.properties layers -->
-               <property name="locations">
-                       <list>
-                               <value>classpath:${hibernate.config.file}</value>
-                       </list>
-               </property>
-       </bean>
-
-       <bean id="simanSessionFactory"
-               class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
-               <property name="dataSource" ref="simanDatasource" />
-               <property name="mappingResources">
-                       <list>
-                               <value>
-                                       org/splat/dal/bo/kernel/Persistent.hbm.xml
-                               </value>
-                               <value>org/splat/dal/bo/kernel/Any.hbm.xml</value>
-                               <value>org/splat/dal/bo/kernel/Entity.hbm.xml</value>
-                               <value>org/splat/dal/bo/kernel/Attribute.hbm.xml</value>
-                               <value>org/splat/dal/bo/kernel/Relation.hbm.xml</value>
-                               <value>
-                                       org/splat/dal/bo/kernel/TextAttribute.hbm.xml
-                               </value>
-                               <value>org/splat/dal/bo/kernel/User.hbm.xml</value>
-
-                               <value>
-                                       org/splat/dal/bo/som/ProjectElement.hbm.xml
-                               </value>
-                               <value>org/splat/dal/bo/som/Study.hbm.xml</value>
-                               <value>org/splat/dal/bo/som/Scenario.hbm.xml</value>
-                               <value>org/splat/dal/bo/som/Attributes.hbm.xml</value>
-                               <value>org/splat/dal/bo/som/Relations.hbm.xml</value>
-                               <value>org/splat/dal/bo/som/File.hbm.xml</value>
-                               <value>org/splat/dal/bo/som/Document.hbm.xml</value>
-                               <value>org/splat/dal/bo/som/Publication.hbm.xml</value>
-                               <value>
-                                       org/splat/dal/bo/som/ValidationCycle.hbm.xml
-                               </value>
-                               <value>org/splat/dal/bo/som/Timestamp.hbm.xml</value>
-                               <value>
-                                       org/splat/dal/bo/som/SimulationContext.hbm.xml
-                               </value>
-                               <value>
-                                       org/splat/dal/bo/som/KnowledgeElement.hbm.xml
-                               </value>
-                               <value>org/splat/dal/bo/som/IDBuilder.hbm.xml</value>
-                       </list>
-               </property>
-               <!-- hibernate.connection.driver_class=com.p6spy.engine.spy.P6SpyDriver -->
-
-               <property name="hibernateProperties">
-                       <ref local="hibernateProperties" />
-               </property>
-               <!-- The following property is used temporary to be able to manage transactions manually. -->
-               <!-- TODO: use annotations to mark transaction methods 
-                       instead of programmatic transaction management  -->
-               <property name="exposeTransactionAwareSessionFactory">
-                       <value>false</value>
-               </property>
-       </bean>
-
-       <bean id="txManager"
-               class="org.springframework.orm.hibernate3.HibernateTransactionManager">
-               <property name="sessionFactory" ref="simanSessionFactory" />
-       </bean>
-
-       <tx:annotation-driven transaction-manager="txManager" />
-
+       
        <!-- TODO: Replace database by services and DAOs -->
        <bean id="database" class="org.splat.dal.dao.som.Database">
                <property name="sessionFactory" ref="simanSessionFactory" />