Spaces:
Paused
Paused
File size: 9,946 Bytes
5a81b95 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 | <beans xmlns="http://www.springframework.org/schema/beans"
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"
xmlns:cache="http://www.springframework.org/schema/cache"
xmlns:elasticsearch="http://www.springframework.org/schema/data/elasticsearch"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd
http://www.springframework.org/schema/cache http://www.springframework.org/schema/cache/spring-cache.xsd
http://www.springframework.org/schema/data/elasticsearch http://www.springframework.org/schema/data/elasticsearch/spring-elasticsearch-1.0.xsd">
<context:mbean-export />
<cache:annotation-driven cache-manager="cacheManager" />
<bean id="cacheManager" class="org.springframework.cache.jcache.JCacheCacheManager">
<property name="cacheManager" ref="jCacheManager" />
<property name="transactionAware" value="true" />
</bean>
<bean id="jCacheManager" class="org.springframework.cache.jcache.JCacheManagerFactoryBean">
<property name="cacheManagerUri" value="classpath:ehcache.xml" />
</bean>
<bean id="databasePropertyConfigurer"
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="location">
<value>classpath:database.properties</value>
</property>
<property name="ignoreUnresolvablePlaceholders" value="true" />
</bean>
<bean id="liquibase"
class="liquibase.integration.spring.SpringLiquibase">
<property name="dataSource" ref="dataSource" />
<property name="changeLog" value="classpath:db-changelog.xml" />
<!-- contexts specifies the runtime contexts to use. <property name="contexts"
value="test, production" /> -->
</bean>
<bean id="CoreEnvironmentBean" class="com.arjuna.ats.arjuna.common.CoreEnvironmentBean">
<property name="nodeIdentifier" value="nodeIdentifier"/>
</bean>
<bean id="CoordinatorEnvironmentBean" class="com.arjuna.ats.arjuna.common.CoordinatorEnvironmentBean"/>
<bean id="JTAEnvironmentBean" class="com.arjuna.ats.jta.common.JTAEnvironmentBean">
<property name="supportSubtransactions" value="true"/>
</bean>
<bean id="RecoveryEnvironmentBean" class="com.arjuna.ats.arjuna.common.RecoveryEnvironmentBean"/>
<bean id="transactionManager"
class="org.springframework.transaction.jta.JtaTransactionManager">
<property name="transactionManager" value="#{ JTAEnvironmentBean.transactionManager }"/>
<property name="userTransaction" value="#{ JTAEnvironmentBean.userTransaction }"/>
</bean>
<bean id="secretCredentialsManager" class="com.hack23.cia.service.data.impl.util.SecretCredentialsManagerImpl">
<constructor-arg name="secretName" value="${database.aws.secret.arn}"/>
<constructor-arg name="secretEnabled" value="${database.aws.secret}"/>
<constructor-arg name="username" value="${database.username}"/>
<constructor-arg name="password" value="${database.password}"/>
</bean>
<bean id="xADataSource" class="com.hack23.cia.service.data.impl.util.SecretPGXADataSource" depends-on="secretCredentialsManager">
<constructor-arg index="0" ref="secretCredentialsManager"/>
<property name="user" value="#{ secretCredentialsManager.username }" />
<property name="password" value="#{ secretCredentialsManager.password }" />
<property name="serverName" value="${database.hostname}" />
<property name="portNumber" value="${database.port}" />
<property name="databaseName" value="${database.name}" />
<property name="ssl" value="true" />
<property name="sslMode" value="verify-full" />
</bean>
<bean id="dataSource" class="org.apache.commons.dbcp2.managed.BasicManagedDataSource" destroy-method="close">
<property name="XaDataSourceInstance" ref="xADataSource" />
<property name="transactionManager" value="#{ JTAEnvironmentBean.transactionManager }"/>
<property name="validationQuery" value="select 1" />
<property name="testOnBorrow" value="true"/>
<property name="testOnReturn" value="true"/>
<property name="testOnCreate" value="true"/>
<property name="initialSize" value="20" />
<property name="maxTotal" value="200" />
</bean>
<bean id="entityManagerFactory"
class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean"
depends-on="cacheManager,liquibase,transactionManager">
<property name="dataSource" ref="dataSource" />
<property name="persistenceUnitName" value="ciaPersistenceUnit" />
<property name="jpaVendorAdapter">
<bean class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter">
<property name="generateDdl" value="false" />
<property name="showSql" value="true" />
</bean>
</property>
<property name="jpaProperties">
<props>
<prop key="hibernate.dialect">${hibernate.dialect}</prop>
<!-- <prop key="hibernate.hbm2ddl.auto">${database.ddl}</prop> Do not
support materialized views in postgres -->
<prop key="hibernate.jmx.enabled">true</prop>
<prop key="hibernate.jmx.usePlatformServer">true</prop>
<prop key="hibernate.jmx.agentId">cia-statistics</prop>
<prop key="hibernate.jmx.defaultDomain">org.hibernate.core</prop>
<prop key="hibernate.jmx.sessionFactoryName">sessionFactory</prop>
<prop key="hibernate.generate_statistics">true</prop>
<prop key="hibernate.show_sql">false</prop>
<prop key="hibernate.use_sql_comments">false</prop>
<prop key="hibernate.format_sql">false</prop>
<prop key="hibernate.id.new_generator_mappings">true</prop>
<prop key="hibernate.order_inserts">true</prop>
<prop key="hibernate.order_updates">true</prop>
<prop key="hibernate.bytecode.use_reflection_optimizer">true</prop>
<prop key="hibernate.bytecode.provider">bytebuddy</prop>
<prop key="hibernate.jdbc.use_streams_for_binary">true</prop>
<prop key="hibernate.temp.use_jdbc_metadata_defaults">false</prop>
<prop key="hibernate.connection.isolation">3</prop>
<prop key="hibernate.connection.release_mode">auto</prop>
<prop key="hibernate.connection.useUnicode">true</prop>
<prop key="hibernate.connection.characterEncoding">UTF-8</prop>
<prop key="hibernate.connection.charSet">UTF-8</prop>
<prop key="hibernate.enable_lazy_load_no_trans">true</prop>
<prop key="hibernate.max_fetch_depth">4</prop>
<prop key="hibernate.batch_fetch_style">dynamic</prop>
<prop key="hibernate.default_batch_fetch_size">100</prop>
<prop key="hibernate.jdbc.fetch_size">100</prop>
<prop key="hibernate.jdbc.batch_size">30</prop>
<prop key="hibernate.jdbc.batch_versioned_data">true</prop>
<prop key="hibernate.jdbc.use_getGeneratedKeys">true</prop>
<prop key="hibernate.jdbc.use_get_generated_keys">true</prop>
<prop key="hibernate.jdbc.use_scrollable_resultset">true</prop>
<prop key="hibernate.current_session_context_class">jta</prop>
<prop key="hibernate.transaction.manager_lookup_class">com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionManagerImple
</prop>
<prop key="hibernate.transaction.jta.platform">org.hibernate.service.jta.platform.internal.JBossStandAloneJtaPlatform</prop>
<prop key="hibernate.physical_naming_strategy">com.hack23.cia.service.data.impl.LegacyNamingStrategy
</prop>
<prop key="hibernate.transaction.auto_close_session">false</prop>
<prop key="hibernate.cache.use_minimal_puts">true</prop>
<prop key="hibernate.cache.use_query_cache">true</prop>
<prop key="hibernate.cache.use_second_level_cache">true</prop>
<prop key="hibernate.cache.use_structured_entries">true</prop>
<prop key="hibernate.cache.default_cache_concurrency_strategy">READ_WRITE</prop>
<prop key="hibernate.cache.region.factory_class">org.hibernate.cache.jcache.JCacheRegionFactory</prop>
<prop key="hibernate.javax.cache.provider">org.ehcache.jsr107.EhcacheCachingProvider</prop>
<prop key="hibernate.javax.cache.uri">classpath://ehcache.xml</prop>
<prop key="hibernate.search.automatic_indexing.strategy">none</prop>
<prop key="hibernate.search.mapping.configurer">com.hack23.cia.service.data.impl.DataSearchMapping</prop>
<prop key="hibernate.search.backend.analysis.configurer">com.hack23.cia.service.data.impl.DataSearchAnalysisConfigurer</prop>
<prop key="hibernate.search.backend.lucene_version">8.8.0</prop>
<prop key="hibernate.search.backend.directory.type">local-filesystem</prop>
<prop key="hibernate.search.backend.directory.root">${database.search.index.location}</prop>
</props>
</property>
</bean>
<bean class="org.springframework.jmx.export.MBeanExporter">
<property name="autodetect" value="false" />
<property name="assembler">
<bean id="jmxAssembler"
class="org.springframework.jmx.export.assembler.MetadataMBeanInfoAssembler">
<property name="attributeSource">
<bean
class="org.springframework.jmx.export.annotation.AnnotationJmxAttributeSource" />
</property>
</bean>
</property>
<property name="beans">
<map>
</map>
</property>
<property name="server">
<ref bean="mbeanServer" />
</property>
</bean>
<bean id="mbeanServer" class="org.springframework.jmx.support.MBeanServerFactoryBean">
<property name="locateExistingServerIfPossible" value="true" />
</bean>
<tx:annotation-driven mode="proxy" transaction-manager="transactionManager" />
<context:annotation-config />
<context:spring-configured />
<context:component-scan base-package="com.hack23.cia.service.data" />
</beans>
|