Details | Last modification | View Log | RSS feed
| Rev | Author | Line No. | Line |
|---|---|---|---|
| 1 | espaco | 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:aop="http://www.springframework.org/schema/aop" |
||
| 4 | xmlns:context="http://www.springframework.org/schema/context" |
||
| 5 | xmlns:lang="http://www.springframework.org/schema/lang" xmlns:tx="http://www.springframework.org/schema/tx" |
||
| 6 | xmlns:jee="http://www.springframework.org/schema/jee" xmlns:util="http://www.springframework.org/schema/util" |
||
| 7 | xmlns:jaxws="http://cxf.apache.org/jaxws" |
||
| 8 | xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd |
||
| 9 | http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd |
||
| 10 | http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd |
||
| 11 | http://www.springframework.org/schema/lang http://www.springframework.org/schema/lang/spring-lang-3.0.xsd |
||
| 12 | http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd |
||
| 13 | http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-3.0.xsd |
||
| 14 | http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.0.xsd |
||
| 15 | http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd |
||
| 16 | http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd"> |
||
| 17 | |||
| 18 | <description> |
||
| 19 | Arquivo context principal do Spring |
||
| 20 | </description> |
||
| 21 | |||
| 22 | <context:spring-configured/> |
||
| 23 | |||
| 24 | <import resource="classpath:META-INF/security-context.xml"/> |
||
| 25 | <import resource="classpath:META-INF/framework-context.xml"/> |
||
| 26 | <import resource="classpath:META-INF/scg-modal-context.xml"/> |
||
| 27 | |||
| 28 | <!-- remover linhas abaixo --> |
||
| 29 | <util:properties id="webServiceProperties" location="classpath:META-INF/webservice.properties"/> |
||
| 30 | <util:properties id="securityProperties" location="classpath:META-INF/cas.properties"/> |
||
| 31 | <!-- remover linhas acima --> |
||
| 32 | |||
| 33 | <!-- Habilita suporte a annotations para componentes --> |
||
| 34 | <context:annotation-config/> |
||
| 35 | |||
| 36 | <!-- Pacote base para scanear componentes anotados --> |
||
| 37 | <context:component-scan base-package="br.gov.al.saude"/> |
||
| 38 | <context:component-scan base-package="rhd-*.jar!br.gov.al.saude"/> |
||
| 39 | <context:component-scan base-package="sesau-*.jar!br.gov.al.saude" /> |
||
| 40 | |||
| 41 | <!-- Tomcat --> |
||
| 42 | <tx:annotation-driven transaction-manager="transactionManager" /> |
||
| 43 | <bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager"> |
||
| 44 | <property name="entityManagerFactory" ref="entityManagerFactory" /> |
||
| 45 | </bean> |
||
| 46 | <jee:jndi-lookup id="dataSource" jndi-name="jdbc/rhdDS" /> |
||
| 47 | <jee:jndi-lookup id="dataSourceScgModalFramework" jndi-name="jdbc/scgDS" /> |
||
| 48 | <bean id="entityManagerFactory" |
||
| 49 | class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean"> |
||
| 50 | <property name="dataSource" ref="dataSource" /> |
||
| 51 | <property name="persistenceUnitName" value="rhdPU" /> |
||
| 52 | </bean> |
||
| 53 | <!-- Tomcat-FIM --> |
||
| 54 | |||
| 55 | <!-- Glassfish --> <!-- |
||
| 56 | <bean id="txManager" class="org.springframework.transaction.jta.JtaTransactionManager" /> |
||
| 57 | <tx:annotation-driven transaction-manager="txManager"/> |
||
| 58 | |||
| 59 | <tx:advice id="txAdvice" transaction-manager="txManager"> |
||
| 60 | <tx:attributes> |
||
| 61 | <tx:method name="*" /> |
||
| 62 | </tx:attributes> |
||
| 63 | </tx:advice> |
||
| 64 | |||
| 65 | <bean id="dataSource" class="org.springframework.jndi.JndiObjectFactoryBean"> |
||
| 66 | <property name="jndiName" value="jdbc/rhdDS"/> |
||
| 67 | </bean> |
||
| 68 | |||
| 69 | <bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean"> |
||
| 70 | <property name="dataSource" ref="dataSource"/> |
||
| 71 | <property name="persistenceUnitName" value="rhdPU"/> |
||
| 72 | <property name="loadTimeWeaver"> |
||
| 73 | <bean class="org.springframework.instrument.classloading.glassfish.GlassFishLoadTimeWeaver"/> |
||
| 74 | </property> |
||
| 75 | <property name="persistenceProvider"> |
||
| 76 | <bean class="org.hibernate.ejb.HibernatePersistence"/> |
||
| 77 | </property> |
||
| 78 | </bean> |
||
| 79 | --> |
||
| 80 | <!-- Glassfish-FIM --> |
||
| 81 | |||
| 82 | <bean id="securityRepository" class="br.gov.al.saude.sca.security.repository.SecurityRepositoryImpl"> |
||
| 83 | <property name="entityManager"> |
||
| 84 | <bean class="org.springframework.orm.jpa.support.SharedEntityManagerBean"> |
||
| 85 | <property name="entityManagerFactory" ref="entityManagerFactory" /> |
||
| 86 | </bean> |
||
| 87 | </property> |
||
| 88 | </bean> |
||
| 89 | |||
| 90 | <!-- Habilita suporte a bean validation --> |
||
| 91 | <bean id="validator" class="org.springframework.validation.beanvalidation.LocalValidatorFactoryBean"/> |
||
| 92 | <bean id="passwordEncoder" class="org.springframework.security.authentication.encoding.Md5PasswordEncoder"/> |
||
| 93 | |||
| 94 | <!-- Suporte a annotations @Controller e @RequestMapping a nĂvel de classe --> |
||
| 95 | <bean class="org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping"/> |
||
| 96 | |||
| 97 | <bean class="org.springframework.beans.factory.config.CustomScopeConfigurer"> |
||
| 98 | <property name="scopes"> |
||
| 99 | <map> |
||
| 100 | <entry key="view"> |
||
| 101 | <bean class="br.gov.al.saude.framework.web.scope.ViewScope"/> |
||
| 102 | </entry> |
||
| 103 | </map> |
||
| 104 | </property> |
||
| 105 | </bean> |
||
| 106 | |||
| 107 | </beans> |