quorum.tessera-core.0.11.0.15102019124301.source-code.tessera-core-spring.xml Maven / Gradle / Ivy
<?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:tx="http://www.springframework.org/schema/tx" xmlns:context="http://www.springframework.org/schema/context" 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"> <tx:annotation-driven transaction-manager="jpaTransactionManager"/> <context:component-scan base-package="com.quorum.tessera"/> <bean id="enclaveFactory" class="com.quorum.tessera.enclave.EnclaveFactory" factory-method="create" /> <bean id="enclave" factory-bean="enclaveFactory" factory-method="create"> <constructor-arg ref="config" /> </bean> <bean id="payloadPublisherFactory" class="com.quorum.tessera.partyinfo.PayloadPublisherFactory" factory-method="newFactory"> <constructor-arg ref="config" /> </bean> <bean class="com.quorum.tessera.service.ServiceContainer"> <constructor-arg ref="enclave" /> </bean> <bean id="transactionManager" class="com.quorum.tessera.transaction.TransactionManagerImpl"> <constructor-arg ref="encryptedTransactionDAO" /> <constructor-arg ref="enclave" /> <constructor-arg ref="encryptedRawTransactionDAO" /> <constructor-arg ref="resendManager" /> <constructor-arg> <bean factory-bean="payloadPublisherFactory" factory-method="create"> <constructor-arg ref="config" /> </bean> </constructor-arg> <constructor-arg value="#{config.getJdbcConfig().getFetchSize() > 0 ? config.getJdbcConfig().getFetchSize() : 1000}"/> </bean> <bean id="cliDelegate" class="com.quorum.tessera.cli.CliDelegate" factory-method="instance"/> <bean id="config" factory-bean="cliDelegate" factory-method="getConfig"/> <bean id="configService" class="com.quorum.tessera.admin.ConfigServiceImpl"> <constructor-arg ref="config" /> <constructor-arg ref="enclave"/> <constructor-arg> <bean class="com.quorum.tessera.config.util.ConfigFileStore" factory-method="get" /> </constructor-arg> </bean> <bean name="encryptedTransactionDAO" class="com.quorum.tessera.data.EncryptedTransactionDAOImpl"/> <bean name="encryptedRawTransactionDAO" class="com.quorum.tessera.data.EncryptedRawTransactionDAOImpl"/> <bean id="dataSource" class="com.zaxxer.hikari.HikariDataSource"> <property name="jdbcUrl" value="#{ config.getJdbcConfig().getUrl() }" /> <property name="username" value="#{ config.getJdbcConfig().getUsername() }" /> <property name="password" value="#{ resolver.resolve(config.getJdbcConfig().getPassword()) }" /> </bean> <bean id="jpaTransactionManager" class="org.springframework.orm.jpa.JpaTransactionManager"> <property name="entityManagerFactory" ref="entityManagerFactory"/> </bean> <bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean"> <property name="dataSource" ref="dataSource"/> <property name="persistenceUnitName" value="tessera"/> <property name="jpaVendorAdapter"> <bean class="org.springframework.orm.jpa.vendor.EclipseLinkJpaVendorAdapter" /> </property> <property name="jpaDialect"> <bean class="org.springframework.orm.jpa.vendor.EclipseLinkJpaDialect"/> </property> <property name="jpaPropertyMap"> <props> <prop key="eclipselink.weaving">false</prop> <prop key="eclipselink.session-name">tessera</prop> <prop key="eclipselink.logging.logger">org.eclipse.persistence.logging.slf4j.SLF4JLogger</prop> <prop key="eclipselink.logging.session">false</prop> <prop key="javax.persistence.schema-generation.database.action">#{config.getJdbcConfig().isAutoCreateTables() ? 'create' : 'none'}</prop> </props> </property> </bean> <bean id="resolver" class="com.quorum.tessera.config.util.EncryptedStringResolver"/> <bean id="resendManager" class="com.quorum.tessera.transaction.ResendManagerImpl"> <constructor-arg ref="encryptedTransactionDAO" /> <constructor-arg ref="enclave" /> </bean> <!-- Node synchronization management--> <beans profile="enable-sync-poller"> <bean name="resendPartyStore" class="com.quorum.tessera.transaction.ResendPartyStoreImpl"/> <bean name="transactionRequester" class="com.quorum.tessera.transaction.TransactionRequesterImpl"> <constructor-arg ref="enclave" /> <constructor-arg ref="p2pClient" /> </bean> <bean name="syncPoller" class="com.quorum.tessera.transaction.SyncPoller"> <constructor-arg ref="resendPartyStore" /> <constructor-arg ref="transactionRequester" /> <constructor-arg ref="partyInfoService"/> <constructor-arg ref="p2pClient"/> </bean> <bean class="com.quorum.tessera.threading.TesseraScheduledExecutor"> <constructor-arg> <bean class="java.util.concurrent.Executors" factory-method="newSingleThreadScheduledExecutor"/> </constructor-arg> <constructor-arg ref="syncPoller"/> <constructor-arg value="60000"/> <constructor-arg value="5000"/> </bean> </beans> </beans>
© 2015 - 2025 Weber Informatics LLC | Privacy Policy