PageRenderTime 447ms CodeModel.GetById 181ms app.highlight 3ms RepoModel.GetById 260ms app.codeStats 0ms

/src/test/java/com/google/ie/test/test-app-context.xml

http://thoughtsite.googlecode.com/
XML | 140 lines | 100 code | 27 blank | 13 comment | 0 complexity | 6a4ca3957f53c0e7009b28dacd2b8e27 MD5 | raw file
  1<?xml version="1.0" encoding="UTF-8"?>
  2
  3<beans xmlns="http://www.springframework.org/schema/beans"
  4	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"
  5	xmlns:context="http://www.springframework.org/schema/context"
  6	xmlns:oxm="http://www.springframework.org/schema/oxm" xmlns:aop="http://www.springframework.org/schema/aop"
  7	xmlns:tx="http://www.springframework.org/schema/tx"
  8	xsi:schemaLocation="http://www.springframework.org/schema/beans 
  9						http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
 10						http://www.springframework.org/schema/context 
 11						http://www.springframework.org/schema/context/spring-context-2.5.xsd
 12						http://www.springframework.org/schema/oxm 
 13						http://www.springframework.org/schema/oxm/spring-oxm-3.0.xsd
 14					    http://www.springframework.org/schema/tx 
 15					    http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
 16     					http://www.springframework.org/schema/aop 
 17     					http://www.springframework.org/schema/aop/spring-aop-3.0.xsd">
 18
 19  <!-- Scans for controllers -->
 20  <context:component-scan base-package="com.google.ie" />
 21
 22  <bean id="appConfig" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
 23    <!--reads application.properties file-->    
 24    <property name="location" value="classpath:application.properties"/>    
 25   </bean> 
 26  
 27  <!--   Services -->
 28
 29  <bean id="tagService" class="com.google.ie.business.service.impl.TagServiceImpl">
 30    <property name="tagDao" ref="tagDao" />
 31  </bean>
 32
 33  <bean id="commentService" class="com.google.ie.business.service.impl.IdeaCommentServiceImpl">
 34    <property name="commentDao" ref="commentDao" />
 35  </bean>
 36  <bean id="projectService" class="com.google.ie.business.service.impl.ProjectServiceImpl">
 37    <property name="projectDao" ref="projectDao" />
 38  </bean>
 39  <bean id="entityIndexService" class="com.google.ie.business.service.impl.EntityIndexServiceImpl">
 40    <property name="entityIndexDao" ref="entityIndexDao" />
 41  </bean>
 42  
 43  <bean id="userService" class="com.google.ie.business.service.impl.UserServiceImpl">
 44  </bean>
 45  
 46  <!--Initialize JDO pmf using config name given in jdoconfig.xml -->
 47  <bean id="persistenceManagerFactory"
 48    class="org.springframework.orm.jdo.LocalPersistenceManagerFactoryBean">
 49    <property name="persistenceManagerFactoryName" value="transactions-optional" />
 50  </bean>
 51
 52  <!-- Transaction manager for a JDO -->
 53  <bean id="transactionManager" class="org.springframework.orm.jdo.JdoTransactionManager"
 54    p:persistenceManagerFactory-ref="persistenceManagerFactory" />  
 55
 56  <!-- Data access objects -->
 57  <bean id="ideaDao" class="com.google.ie.business.dao.impl.IdeaDaoImpl">
 58    <property name="persistenceManagerFactory" ref="persistenceManagerFactory" />
 59  </bean>
 60
 61  <bean id="ideaCategoryDao" class="com.google.ie.business.dao.impl.IdeaCategoryDaoImpl">
 62    <property name="persistenceManagerFactory" ref="persistenceManagerFactory" />
 63  </bean>
 64
 65  <bean id="tagDao" class="com.google.ie.business.dao.impl.TagDaoImpl">
 66    <property name="persistenceManagerFactory" ref="persistenceManagerFactory" />
 67  </bean>
 68
 69  <bean id="commentDao" class="com.google.ie.business.dao.impl.CommentDaoImpl">
 70    <property name="persistenceManagerFactory" ref="persistenceManagerFactory" />
 71  </bean>
 72  
 73  <bean id="auditDao" class="com.google.ie.business.dao.impl.AuditDaoImpl">
 74  	<property name="persistenceManagerFactory" ref="persistenceManagerFactory" />
 75  </bean>
 76  
 77  <bean id="entityIndexDao" class="com.google.ie.business.dao.impl.EntityIndexDaoImpl">
 78  	<property name="persistenceManagerFactory" ref="persistenceManagerFactory" />
 79  </bean>
 80  
 81  <bean id="userDao" class="com.google.ie.business.dao.impl.UserDaoImpl">
 82  	<property name="persistenceManagerFactory" ref="persistenceManagerFactory" />
 83  </bean>
 84  
 85  <bean id="ideaVoteDao" class="com.google.ie.business.dao.impl.VoteDaoImpl">
 86  	<property name="persistenceManagerFactory" ref="persistenceManagerFactory" />
 87  </bean>
 88  
 89  <bean id="projectDao" class="com.google.ie.business.dao.impl.ProjectDaoImpl">
 90  	<property name="persistenceManagerFactory" ref="persistenceManagerFactory" />
 91  </bean>
 92  
 93 <bean id="shardedCounterDao" class="com.google.ie.business.dao.impl.ShardedCounterDaoImpl">
 94  	<property name="persistenceManagerFactory" ref="persistenceManagerFactory" />
 95  </bean>
 96  
 97  <bean id="badWordDao" class="com.google.ie.business.dao.impl.BadWordDaoImpl">
 98  	<property name="persistenceManagerFactory" ref="persistenceManagerFactory" />
 99  </bean>
100  <bean id="developerDao" class="com.google.ie.business.dao.impl.DeveloperDaoImpl">
101  	<property name="persistenceManagerFactory" ref="persistenceManagerFactory" />
102  </bean>
103  <bean id="adminRequestDao" class="com.google.ie.business.dao.impl.AdminRequestDaoImpl">
104    <property name="persistenceManagerFactory" ref="persistenceManagerFactory" />
105  </bean>
106
107  <!-- use annotation based transaction configuration -->
108  <tx:annotation-driven/>
109  
110  
111  
112 	<!--
113		- This bean resolves specific types of exceptions to corresponding logical 
114		- view names for error views. The default behavior of DispatcherServlet 
115		- is to propagate all exceptions to the servlet container: this will happen 
116		- here with all other types of exceptions.
117	-->
118  
119  <bean id="exceptionResolver"
120	class="com.google.ie.common.exception.IdeaExchangeExceptionResolver">
121	<property name="exceptionMappings">
122		<props>  
123                <prop key="org.springframework.dao.DataAccessException">error/system-error</prop>
124				<prop key="org.springframework.transaction.TransactionException">error/system-error</prop>
125 
126            </props>  
127	</property>
128	<property name="defaultErrorView" value="error/system-error" />
129</bean>
130<bean id="messageSource"
131	class="org.springframework.context.support.ResourceBundleMessageSource">
132	<property name="basenames">
133		<list>
134			<value>email</value>
135			<value>message</value>
136		</list>
137	</property>
138</bean>
139</beans>
140