ServiceContext.xml 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  1. <beans xmlns="http://www.springframework.org/schema/beans"
  2. xmlns:p="http://www.springframework.org/schema/p" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  3. xmlns:context="http://www.springframework.org/schema/context"
  4. xsi:schemaLocation="http://www.springframework.org/schema/beans
  5. http://www.springframework.org/schema/beans/spring-beans.xsd
  6. http://www.springframework.org/schema/context
  7. http://www.springframework.org/schema/context/spring-context.xsd">
  8. <context:component-scan base-package="id.co.hanoman.btn.rekon" />
  9. <!-- java:comp/env/ -->
  10. <bean id="mwappDataSource" class="org.springframework.jndi.JndiObjectFactoryBean">
  11. <property name="jndiName" value="jdbc/db2/mwapp_rekon_ds" />
  12. <property name="defaultObject" ref="developmentDataSource" />
  13. </bean>
  14. <bean id="dataSource" class="org.springframework.jndi.JndiObjectFactoryBean">
  15. <property name="jndiName" value="jdbc/db2/mwapp_rekon_ds" />
  16. <property name="defaultObject" ref="developmentDataSource" />
  17. </bean>
  18. <!-- fall back datasource if JNDI look up of main datasource fails -->
  19. <bean id="developmentDataSource" class="org.apache.commons.dbcp.BasicDataSource"
  20. destroy-method="close">
  21. <property name="driverClassName" value="${jdbc.driverClassName}" />
  22. <property name="url" value="${jdbc.url}" />
  23. <property name="username" value="${jdbc.username}" />
  24. <property name="password" value="${jdbc.password}" />
  25. <property name="initialSize">
  26. <value>10</value>
  27. </property>
  28. <property name="maxActive">
  29. <value>100</value>
  30. </property>
  31. <property name="maxWait">
  32. <value>5000</value>
  33. </property>
  34. </bean>
  35. <bean id="mwlogDataSource" class="org.springframework.jndi.JndiObjectFactoryBean">
  36. <property name="jndiName" value="jdbc/db2/mwlog_rekon_ds" />
  37. <property name="defaultObject" ref="developmentMwLogDataSource" />
  38. </bean>
  39. <!-- fall back datasource if JNDI look up of main datasource fails -->
  40. <bean id="developmentMwLogDataSource" class="org.apache.commons.dbcp.BasicDataSource"
  41. destroy-method="close">
  42. <property name="driverClassName" value="${jdbc.driverClassName}" />
  43. <property name="url" value="${jdbc.mwlog.url}" />
  44. <property name="username" value="${jdbc.username}" />
  45. <property name="password" value="${jdbc.password}" />
  46. <property name="initialSize">
  47. <value>10</value>
  48. </property>
  49. <property name="maxActive">
  50. <value>100</value>
  51. </property>
  52. <property name="maxWait">
  53. <value>5000</value>
  54. </property>
  55. </bean>
  56. <bean id="mwtempDatasource" class="org.springframework.jndi.JndiObjectFactoryBean">
  57. <property name="jndiName" value="jdbc/db2/mwtemp_rekon_ds" />
  58. <property name="defaultObject" ref="devMwtempDataSource" />
  59. </bean>
  60. <!-- fall back datasource if JNDI look up of main datasource fails -->
  61. <bean id="developmentMwtempDataSource" class="org.apache.commons.dbcp.BasicDataSource"
  62. destroy-method="close">
  63. <property name="driverClassName" value="${jdbc.driverClassName}" />
  64. <property name="url" value="${jdbc.mwtemp.url}" />
  65. <property name="username" value="${jdbc.username}" />
  66. <property name="password" value="${jdbc.password}" />
  67. <property name="initialSize">
  68. <value>10</value>
  69. </property>
  70. <property name="maxActive">
  71. <value>100</value>
  72. </property>
  73. <property name="maxWait">
  74. <value>5000</value>
  75. </property>
  76. </bean>
  77. <!-- fall back datasource if JNDI look up of main datasource fails -->
  78. <bean id="devMwtempDataSource" class="org.apache.commons.dbcp.BasicDataSource"
  79. destroy-method="close">
  80. <property name="driverClassName" value="${jdbc.driverClassName}" />
  81. <property name="url" value="${jdbc.dev.mwtemp.url}" />
  82. <property name="username" value="${jdbc.dev.username}" />
  83. <property name="password" value="${jdbc.dev.password}" />
  84. <property name="initialSize">
  85. <value>10</value>
  86. </property>
  87. <property name="maxActive">
  88. <value>0</value>
  89. </property>
  90. <property name="maxWait">
  91. <value>5000</value>
  92. </property>
  93. </bean>
  94. <bean id="propertyConfigurer"
  95. class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
  96. <property name="locations">
  97. <list>
  98. <value>WEB-INF/jdbc.properties</value>
  99. </list>
  100. </property>
  101. </bean>
  102. <bean id="transactionManager"
  103. class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
  104. <property name="dataSource" ref="dataSource" />
  105. </bean>
  106. <bean id="servletContext" class="org.springframework.web.context.support.ServletContextFactoryBean"/>
  107. <bean id="webInfPath" class="id.co.hanoman.shared.ContextPathFactory" factory-method="getContextPath" >
  108. <constructor-arg type="javax.servlet.ServletContext" ref="servletContext" />
  109. <constructor-arg type="java.lang.String" value="WEB-INF" />
  110. </bean>
  111. <bean id="persistanceFactory" class="id.co.hanoman.shared.PersistanceServiceFactory">
  112. <property name="servletContext" ref="servletContext" ></property>
  113. </bean>
  114. <bean class="id.co.hanoman.btn.utils.SQLConnection">
  115. <property name="mwappDataSource" ref="dataSource"></property>
  116. <property name="mwtempDataSource" ref="mwtempDatasource"></property>
  117. <property name="mwlogDataSource" ref="mwlogDataSource"></property>
  118. </bean>
  119. <bean id="appDaoClient" factory-bean="persistanceFactory" factory-method="getAppDaoClient"></bean>
  120. <bean id="configDaoClient" factory-bean="persistanceFactory" factory-method="getConfigDaoClient"></bean>
  121. <bean id="appUserValidation" class="id.co.hanoman.ePayment.validation.AppUserValidation">
  122. <property name="psi" ref="appDaoClient"></property>
  123. </bean>
  124. </beans>