move config to subdirectory
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<objects xmlns="http://www.springframework.net">
|
||||
<objects xmlns="http://www.springframework.net"
|
||||
xmlns:tx="http://www.springframework.org/schema/tx">
|
||||
|
||||
<!-- Referenced by main application context configuration file -->
|
||||
|
||||
@@ -18,13 +19,6 @@
|
||||
|
||||
</object>
|
||||
|
||||
<import resource="DeclarativeServicesAttributeDriven.xml"/>
|
||||
|
||||
<!-- didn't configure correctly yet - don't use
|
||||
<import resource="DeclarativeServicesObjectNameDriven.xml"/>
|
||||
-->
|
||||
|
||||
<!--
|
||||
<import resource="DeclarativeServicesTxProxyFactoryDriven.xml"/>
|
||||
-->
|
||||
|
||||
</objects>
|
||||
@@ -1,69 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<objects xmlns="http://www.springframework.net"
|
||||
xmlns:db="http://www.springframework.net/database">
|
||||
|
||||
<!-- Referenced by main application context configuration file -->
|
||||
<description>
|
||||
The Northwind object definitions for the Data Access Objects.
|
||||
</description>
|
||||
|
||||
<!-- Property placeholder configurer for database settings -->
|
||||
<object type="Spring.Objects.Factory.Config.PropertyPlaceholderConfigurer, Spring.Core">
|
||||
<property name="ConfigSections" value="databaseSettings"/>
|
||||
</object>
|
||||
|
||||
<!-- Database and NHibernate Configuration -->
|
||||
<db:provider id="DbProvider"
|
||||
provider="SqlServer-2.0"
|
||||
connectionString="Data Source=.\SQLExpress;Integrated Security=true;User Instance=true;AttachDBFilename=|DataDirectory|\Northwnd.mdf"/>
|
||||
|
||||
<object id="NHibernateSessionFactory" type="Spring.Data.NHibernate.LocalSessionFactoryObject, Spring.Data.NHibernate12">
|
||||
<property name="DbProvider" ref="DbProvider"/>
|
||||
<property name="MappingAssemblies">
|
||||
<list>
|
||||
<value>Spring.Northwind.Dao.NHibernate</value>
|
||||
</list>
|
||||
</property>
|
||||
<property name="HibernateProperties">
|
||||
<dictionary>
|
||||
|
||||
<entry key="hibernate.connection.provider"
|
||||
value="NHibernate.Connection.DriverConnectionProvider"/>
|
||||
|
||||
<entry key="hibernate.dialect"
|
||||
value="NHibernate.Dialect.MsSql2000Dialect"/>
|
||||
|
||||
<entry key="hibernate.connection.driver_class"
|
||||
value="NHibernate.Driver.SqlClientDriver"/>
|
||||
|
||||
</dictionary>
|
||||
</property>
|
||||
|
||||
</object>
|
||||
|
||||
|
||||
<object id="HibernateTransactionManager"
|
||||
type="Spring.Data.NHibernate.HibernateTransactionManager, Spring.Data.NHibernate12">
|
||||
|
||||
<property name="DbProvider" ref="DbProvider"/>
|
||||
<property name="SessionFactory" ref="NHibernateSessionFactory"/>
|
||||
|
||||
</object>
|
||||
|
||||
<object id="HibernateTemplate" type="Spring.Data.NHibernate.HibernateTemplate">
|
||||
<property name="SessionFactory" ref="NHibernateSessionFactory" />
|
||||
<property name="TemplateFlushMode" value="Auto" />
|
||||
<property name="CacheQueries" value="true" />
|
||||
</object>
|
||||
|
||||
<!-- Data Access Objects -->
|
||||
<object id="CustomerDao" type="Spring.Northwind.Dao.NHibernate.HibernateCustomerDao, Spring.Northwind.Dao.NHibernate">
|
||||
<property name="HibernateTemplate" ref="HibernateTemplate"/>
|
||||
</object>
|
||||
|
||||
<object id="OrderDao" type="Spring.Northwind.Dao.NHibernate.HibernateOrderDao, Spring.Northwind.Dao.NHibernate">
|
||||
<property name="HibernateTemplate" ref="HibernateTemplate"/>
|
||||
</object>
|
||||
|
||||
|
||||
</objects>
|
||||
@@ -1,25 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<objects xmlns="http://www.springframework.net">
|
||||
<!-- The rest of the config file is common no matter how many objects you add -->
|
||||
<!-- that you would like to have declarative tx management applied to -->
|
||||
<object id="autoProxyCreator"
|
||||
type="Spring.Aop.Framework.AutoProxy.DefaultAdvisorAutoProxyCreator, Spring.Aop">
|
||||
</object>
|
||||
|
||||
<object id="transactionAdvisor"
|
||||
type="Spring.Transaction.Interceptor.TransactionAttributeSourceAdvisor, Spring.Data">
|
||||
<property name="TransactionInterceptor" ref="transactionInterceptor"/>
|
||||
</object>
|
||||
|
||||
<!-- Transaction Interceptor -->
|
||||
<object id="transactionInterceptor"
|
||||
type="Spring.Transaction.Interceptor.TransactionInterceptor, Spring.Data">
|
||||
<property name="TransactionManager" ref="HibernateTransactionManager"/>
|
||||
<!-- note do not have converter from string to this property type registered -->
|
||||
<property name="TransactionAttributeSource" ref="attributeTransactionAttributeSource"/>
|
||||
</object>
|
||||
|
||||
<object id="attributeTransactionAttributeSource"
|
||||
type="Spring.Transaction.Interceptor.AttributesTransactionAttributeSource, Spring.Data">
|
||||
</object>
|
||||
</objects>
|
||||
@@ -1,38 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<objects xmlns="http://www.springframework.net">
|
||||
|
||||
<object name="autoProxyCreator"
|
||||
type="Spring.Aop.Framework.AutoProxy.ObjectNameAutoProxyCreator, Spring.Aop">
|
||||
|
||||
<property name="InterceptorNames" value="transactionInterceptor"/>
|
||||
<property name="ObjectNames">
|
||||
<list>
|
||||
<ref object="FulfillmentService"/>
|
||||
</list>
|
||||
</property>
|
||||
</object>
|
||||
|
||||
<object id="transactionInterceptor"
|
||||
type="Spring.Transaction.Interceptor.TransactionInterceptor, Spring.Data">
|
||||
<property name="TransactionManager" ref="HibernateTransactionManager"/>
|
||||
<!-- note do not have converter from string to this property type registered -->
|
||||
<!-- so useing a ref to the source of transaction options -->
|
||||
<property name="TransactionAttributeSource" ref="attributeTransactionAttributeSource"/>
|
||||
</object>
|
||||
|
||||
<object id="attributeTransactionAttributeSource"
|
||||
type="Spring.Transaction.Interceptor.AttributesTransactionAttributeSource, Spring.Data">
|
||||
</object>
|
||||
|
||||
<!--
|
||||
<object name="methodMapTransactionAttributeSource"
|
||||
type="Spring.Transaction.Interceptor.MethodMapTransactionAttributeSource, Spring.Data">
|
||||
<property name="MethodMap">
|
||||
<dictionary>
|
||||
<entry key="Spring.Northwind.Service.FulfillmentService.ProcessCustomer, Spring.Northwind.Service"
|
||||
value="PROPAGATION_REQUIRED"/>
|
||||
</dictionary>
|
||||
</property>
|
||||
</object>
|
||||
-->
|
||||
</objects>
|
||||
@@ -1,40 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<objects xmlns="http://www.springframework.net">
|
||||
|
||||
<description>
|
||||
Transactional Proxy for FulfillmentService using the TransactionProxyFactory
|
||||
</description>
|
||||
|
||||
|
||||
<!-- Note if you have many of these objects with similar configuration use -->
|
||||
<!-- an abstract parent object to encapsulate common settings -->
|
||||
|
||||
<object id="TxProxyConfigurationTemplate" abstract="true"
|
||||
type="Spring.Transaction.Interceptor.TransactionProxyFactoryObject, Spring.Data">
|
||||
|
||||
<property name="PlatformTransactionManager" ref="HibernateTransactionManager"/>
|
||||
|
||||
<property name="TransactionAttributes">
|
||||
<name-values>
|
||||
<!-- Add common methods across your services here -->
|
||||
<add key="Process*" value="PROPAGATION_REQUIRED"/>
|
||||
<!--
|
||||
<add key="Delete*" value="PROPAGATION_REQUIRED"/>
|
||||
-->
|
||||
</name-values>
|
||||
</property>
|
||||
<!-- note you can use alias names so that this configuration file is -->
|
||||
<!-- not dependent on the precise object name of the logging advice -->
|
||||
<!-- defined in Aspects.xml -->
|
||||
<property name="PreInterceptors" ref="CommonLoggingAroundAdvice"/>
|
||||
</object>
|
||||
|
||||
|
||||
<object id="FulfillmentServiceUsingTxPFO" parent="TxProxyConfigurationTemplate">
|
||||
|
||||
<!-- Note: would likely use an anonymous inner object instead of a reference -->
|
||||
<!-- to ensure that no one can access an unadvised object -->
|
||||
<property name="Target" ref="FulfillmentService"/>
|
||||
|
||||
</object>
|
||||
</objects>
|
||||
@@ -25,7 +25,7 @@
|
||||
<!-- otherwise BasicConfigurer.Configure is used -->
|
||||
<!-- log4net configuration file is specified with key configFile-->
|
||||
<arg key="configType" value="FILE-WATCH"/>
|
||||
<arg key="configFile" value="~/Log4Net.xml"/>
|
||||
<arg key="configFile" value="~/Config/Log4Net.xml"/>
|
||||
</factoryAdapter>
|
||||
</logging>
|
||||
</common>
|
||||
|
||||
Reference in New Issue
Block a user