Advertisement
Guest User

:v

a guest
Apr 27th, 2015
198
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.50 KB | None | 0 0
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <beans xmlns="http://www.springframework.org/schema/beans"
  3. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tx="http://www.springframework.org/schema/tx"
  4. xmlns:context="http://www.springframework.org/schema/context"
  5. xsi:schemaLocation="
  6.  
  7. http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  8. http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd
  9. http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd">
  10.  
  11.  
  12. <!-- Beans Declaration -->
  13.  
  14. <bean id="Usuario" class="com.unbosque.info.entidad.Usuario" />
  15.  
  16. <!-- User Service Declaration -->
  17.  
  18. <bean id="UsuarioService" class="com.unbosque.info.service.UsuarioService">
  19. <property name="UsuarioDAO" ref="UsuarioDAO" />
  20. </bean>
  21.  
  22.  
  23. <!-- User DAO Declaration -->
  24.  
  25. <bean id="UsuarioDAO" class="com.unbosque.info.dao.UsuarioDAO">
  26. <property name="sessionFactory" ref="SessionFactory" />
  27. </bean>
  28.  
  29.  
  30. <!-- Data Source Declaration -->
  31. <bean id="DataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource"
  32. destroy-method="close">
  33. <property name="driverClass" value="org.postgresql.Driver" />
  34. <property name="jdbcUrl"
  35. value="jdbc:postgresql://localhost:5432/bosque" />
  36. <property name="user" value="postgres" />
  37. <property name="password" value="amarok2408" />
  38. <property name="maxPoolSize" value="10" />
  39. <property name="maxStatements" value="0" />
  40. <property name="minPoolSize" value="5" />
  41. </bean>
  42.  
  43. <!-- Session Factory Declaration -->
  44. <bean id="SessionFactory"
  45. class="org.springframework.orm.hibernate4.LocalSessionFactoryBean">
  46. <property name="dataSource" ref="DataSource" />
  47. <property name="annotatedClasses">
  48. <list>
  49.  
  50. <value>com.unbosque.info.entidad.Usuario</value>
  51. </list>
  52. </property>
  53. <property name="hibernateProperties">
  54. <props>
  55. <prop key="hibernate.dialect">org.hibernate.dialect.PostgreSQLDialect</prop>
  56. <prop key="hibernate.show_sql">true</prop>
  57. </props>
  58. </property>
  59. </bean>
  60.  
  61.  
  62. <tx:annotation-driven transaction-manager="txManager" />
  63.  
  64. <!-- Transaction Manager is defined -->
  65. <bean id="txManager"
  66. class="org.springframework.orm.hibernate4.HibernateTransactionManager">
  67. <property name="sessionFactory" ref="SessionFactory" />
  68. </bean>
  69.  
  70. </beans>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement