diff options
Diffstat (limited to 'id/server/moa-id-commons/src/main/resources')
-rw-r--r-- | id/server/moa-id-commons/src/main/resources/META-INF/persistence.xml | 16 | ||||
-rw-r--r-- | id/server/moa-id-commons/src/main/resources/bindings.xjb (renamed from id/server/moa-id-commons/src/main/resources/config/bindings.xjb) | 4 | ||||
-rw-r--r-- | id/server/moa-id-commons/src/main/resources/config/persistence_template.xml | 17 | ||||
-rw-r--r-- | id/server/moa-id-commons/src/main/resources/configuration.beans.xml | 30 | ||||
-rw-r--r-- | id/server/moa-id-commons/src/main/resources/hibernate_moasession.cfg.xml (renamed from id/server/moa-id-commons/src/main/resources/config/hibernate_moasession.cfg.xml) | 0 | ||||
-rw-r--r-- | id/server/moa-id-commons/src/main/resources/hibernate_statistic.cfg.xml (renamed from id/server/moa-id-commons/src/main/resources/config/hibernate_statistic.cfg.xml) | 0 | ||||
-rw-r--r-- | id/server/moa-id-commons/src/main/resources/moaid.migration.beans.xml | 44 | ||||
-rw-r--r-- | id/server/moa-id-commons/src/main/resources/moaid_config_2.0.xsd (renamed from id/server/moa-id-commons/src/main/resources/config/moaid_config_2.0.xsd) | 0 |
8 files changed, 92 insertions, 19 deletions
diff --git a/id/server/moa-id-commons/src/main/resources/META-INF/persistence.xml b/id/server/moa-id-commons/src/main/resources/META-INF/persistence.xml new file mode 100644 index 000000000..9bebfa66f --- /dev/null +++ b/id/server/moa-id-commons/src/main/resources/META-INF/persistence.xml @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8"?> +<persistence xmlns="http://java.sun.com/xml/ns/persistence" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://java.sun.com/xml/ns/persistence +http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd" + version="2.0"> + + <persistence-unit name="config" transaction-type="RESOURCE_LOCAL"> + <provider>org.hibernate.ejb.HibernatePersistence</provider> + <class>at.gv.egovernment.moa.id.commons.db.dao.config.ConfigProperty</class> + <!-- <class>at.gv.egovernment.moa.id.commons.db.dao.config.UserDatabase</class> --> + <properties> + </properties> + </persistence-unit> + +</persistence>
\ No newline at end of file diff --git a/id/server/moa-id-commons/src/main/resources/config/bindings.xjb b/id/server/moa-id-commons/src/main/resources/bindings.xjb index 21714849b..9d017d02e 100644 --- a/id/server/moa-id-commons/src/main/resources/config/bindings.xjb +++ b/id/server/moa-id-commons/src/main/resources/bindings.xjb @@ -1,4 +1,4 @@ -<jaxb:bindings version="2.1" +<!-- <jaxb:bindings version="2.1" xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc" @@ -32,4 +32,4 @@ </hj:many-to-many> </jaxb:bindings> -</jaxb:bindings>
\ No newline at end of file +</jaxb:bindings> -->
\ No newline at end of file diff --git a/id/server/moa-id-commons/src/main/resources/config/persistence_template.xml b/id/server/moa-id-commons/src/main/resources/config/persistence_template.xml deleted file mode 100644 index 25092ff58..000000000 --- a/id/server/moa-id-commons/src/main/resources/config/persistence_template.xml +++ /dev/null @@ -1,17 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="yes"?> -<persistence version="1.0" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd -http://java.sun.com/xml/ns/persistence/orm http://java.sun.com/xml/ns/persistence/orm_1_0.xsd" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:orm="http://java.sun.com/xml/ns/persistence/orm" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <persistence-unit name="##generated"> - <!-- <class>at.gv.egovernment.moa.id.commons.db.dao.config.UserDatabase</class> --> - -<!-- <properties> - C3p0 connection pooling configuration - <property name="hibernate.connection.provider_class" value="org.hibernate.service.jdbc.connections.internal.C3P0ConnectionProvider"/> - <property name="hibernate.connection.provider_class" value="org.hibernate.service.jdbc.connections.internal.C3P0ConnectionProvider"/> - <property name="acquireRetryDelay" value="5000"/> - <property name="breakAfterAcquireFailure" value="true"/> - <property name="checkoutTimeout" value="1"/> - <property name="testConnectionOnCheckin" value="1" /> - </properties> --> - </persistence-unit> -</persistence> diff --git a/id/server/moa-id-commons/src/main/resources/configuration.beans.xml b/id/server/moa-id-commons/src/main/resources/configuration.beans.xml new file mode 100644 index 000000000..4d3caea8c --- /dev/null +++ b/id/server/moa-id-commons/src/main/resources/configuration.beans.xml @@ -0,0 +1,30 @@ +<?xml version="1.0" encoding="UTF-8"?> +<beans xmlns="http://www.springframework.org/schema/beans" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:context="http://www.springframework.org/schema/context" + xmlns:tx="http://www.springframework.org/schema/tx" + xmlns:aop="http://www.springframework.org/schema/aop" + xsi:schemaLocation="http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.1.xsd + http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd + http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd + http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd"> + + <context:annotation-config /> + + <bean id="configPropertyDao" + class="at.gv.egovernment.moa.id.commons.db.dao.config.DatabaseConfigPropertyImpl"/> + + <bean id="moaidconfig" class="at.gv.egovernment.moa.id.commons.config.persistence.MOAIDConfigurationImpl" /> + + <bean name="config" id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean"> + <property name="dataSource" ref="dataSource" /> + <property name="jpaVendorAdapter" ref="jpaVendorAdapter" /> + <property name="persistenceUnitName" value="config" /> + </bean> + + <bean name="transactionManager" id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager"> + <property name="entityManagerFactory" ref="entityManagerFactory" /> + </bean> + <tx:annotation-driven transaction-manager="transactionManager"/> + +</beans>
\ No newline at end of file diff --git a/id/server/moa-id-commons/src/main/resources/config/hibernate_moasession.cfg.xml b/id/server/moa-id-commons/src/main/resources/hibernate_moasession.cfg.xml index e40c8b8a9..e40c8b8a9 100644 --- a/id/server/moa-id-commons/src/main/resources/config/hibernate_moasession.cfg.xml +++ b/id/server/moa-id-commons/src/main/resources/hibernate_moasession.cfg.xml diff --git a/id/server/moa-id-commons/src/main/resources/config/hibernate_statistic.cfg.xml b/id/server/moa-id-commons/src/main/resources/hibernate_statistic.cfg.xml index aa77a9c67..aa77a9c67 100644 --- a/id/server/moa-id-commons/src/main/resources/config/hibernate_statistic.cfg.xml +++ b/id/server/moa-id-commons/src/main/resources/hibernate_statistic.cfg.xml diff --git a/id/server/moa-id-commons/src/main/resources/moaid.migration.beans.xml b/id/server/moa-id-commons/src/main/resources/moaid.migration.beans.xml new file mode 100644 index 000000000..3bd122254 --- /dev/null +++ b/id/server/moa-id-commons/src/main/resources/moaid.migration.beans.xml @@ -0,0 +1,44 @@ +<?xml version="1.0" encoding="UTF-8"?> +<beans xmlns="http://www.springframework.org/schema/beans" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:context="http://www.springframework.org/schema/context" + xmlns:tx="http://www.springframework.org/schema/tx" + xmlns:aop="http://www.springframework.org/schema/aop" + xsi:schemaLocation="http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.1.xsd + http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd + http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd + http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd"> + + +<!-- <bean id="localPropertyBean" class="at.gv.egovernment.moa.id.config.webgui.MOAIDWebGUIConfiguration" + scope="singleton" factory-method="getInstance"/> --> + + <context:property-placeholder location="${moa.id.webconfig}"/> + + <bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" lazy-init="true" destroy-method="close"> + <aop:scoped-proxy/> + <property name="driverClassName" value="${hibernate.connection.driver_class}" /> + <property name="url" value="${hibernate.connection.url}"/> + <property name="username" value="${hibernate.connection.username}" /> + <property name="password" value="${hibernate.connection.password}" /> + + <property name="connectionProperties" value="${dbcp.connectionProperties}" /> + <property name="initialSize" value="${dbcp.initialSize}" /> + <property name="maxActive" value="${dbcp.maxActive}" /> + <property name="maxIdle" value="${dbcp.maxIdle}" /> + <property name="minIdle" value="${dbcp.minIdle}" /> + <property name="maxWait" value="${dbcp.maxWaitMillis}" /> + <property name="testOnBorrow" value="${dbcp.testOnBorrow}" /> + <property name="testOnReturn" value="${dbcp.testOnReturn}" /> + <property name="testWhileIdle" value="${dbcp.testWhileIdle}" /> + <property name="validationQuery" value="SELECT 1" /> + </bean> + + + <bean id="jpaVendorAdapter" class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter"> + <property name="showSql" value="${hibernate.show_sql}" /> + <property name="generateDdl" value="${jpaVendorAdapter.generateDdl}" /> + <property name="databasePlatform" value="${hibernate.dialect}" /> + </bean> + +</beans>
\ No newline at end of file diff --git a/id/server/moa-id-commons/src/main/resources/config/moaid_config_2.0.xsd b/id/server/moa-id-commons/src/main/resources/moaid_config_2.0.xsd index d4686bd5e..d4686bd5e 100644 --- a/id/server/moa-id-commons/src/main/resources/config/moaid_config_2.0.xsd +++ b/id/server/moa-id-commons/src/main/resources/moaid_config_2.0.xsd |