Subversion Repositories Integrator Subversion

Rev

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
         <!-- Habilita suporte a annotations para componentes -->
29
        <context:annotation-config/>
30
 
31
        <!-- Pacote base para scanear componentes anotados -->    
32
        <context:component-scan base-package="br.gov.al.saude"/>
33
        <context:component-scan base-package="srv-*.jar!br.gov.al.saude"/>
34
        <context:component-scan base-package="sesau-*.jar!br.gov.al.saude" />
35
 
36
<!-- Tomacat    
37
        <tx:annotation-driven transaction-manager="transactionManager" />
38
        <bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager">
39
                <property name="entityManagerFactory" ref="entityManagerFactory" />
40
        </bean>
41
        <jee:jndi-lookup id="dataSource" jndi-name="jdbc/srvDS" />
42
        <bean id="entityManagerFactory"
43
                class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
44
                <property name="dataSource" ref="dataSource" />
45
                <property name="persistenceUnitName" value="srvPU" />
46
        </bean>-->
47
 
48
 
49
<!-- Glassfish   -->
50
 
51
        <tx:annotation-driven transaction-manager="transactionManager" />
52
        <bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager">
53
                <property name="entityManagerFactory" ref="entityManagerFactory" />
54
        </bean>
55
        <jee:jndi-lookup id="dataSource" jndi-name="jdbc/srvDS" />
56
 
57
        <bean id="entityManagerFactory"
58
                class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
59
                <property name="dataSource" ref="dataSource" />
60
                <property name="persistenceUnitName" value="srvPU" />
61
        </bean>
62
 
63
 
64
        <bean id="securityRepository" class="br.gov.al.saude.sca.security.repository.SecurityRepositoryImpl">
65
                 <property name="entityManager">
66
                <bean class="org.springframework.orm.jpa.support.SharedEntityManagerBean">
67
                    <property name="entityManagerFactory" ref="entityManagerFactory" />
68
                </bean>
69
            </property>
70
        </bean>
71
 
72
        <!-- Habilita suporte a bean validation -->
73
        <bean id="validator" class="org.springframework.validation.beanvalidation.LocalValidatorFactoryBean"/>
74
        <bean id="passwordEncoder" class="org.springframework.security.authentication.encoding.Md5PasswordEncoder"/>
75
 
76
        <!-- Suporte a annotations @Controller e @RequestMapping a nĂ­vel de classe -->
77
        <bean class="org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping"/>
78
 
79
        <bean class="org.springframework.beans.factory.config.CustomScopeConfigurer">
80
            <property name="scopes">
81
                <map>
82
                    <entry key="view">
83
                        <bean class="br.gov.al.saude.framework.web.scope.ViewScope"/>
84
                    </entry>
85
                </map>
86
            </property>
87
        </bean>
88
 
89
</beans>