Subversion Repositories Integrator Subversion

Rev

Rev 140 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
106 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
        <import resource="sis-web-seguranca-context.xml"/>
19
 
20
        <context:spring-configured/>
21
 
22
    <context:annotation-config />
23
 
24
    <context:component-scan base-package="br.com.ec" />
25
    <context:component-scan base-package="*.jar!br.com.ec" />
26
 
27
    <tx:annotation-driven transaction-manager="transactionManager" />
28
 
29
    <!-- Pós-processador de anotações JPA -->
30
        <bean class="org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor"/>
31
 
32
        <!-- Tradutor de exceções JPA -->
33
        <bean class="org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor"/>
34
 
140 espaco 35
        <!-- BANCO DE DADOS (DEDICADO) -->
106 espaco 36
        <!-- <jee:jndi-lookup id="dataSource" jndi-name="jdbc/sisDS" /> -->
37
 
140 espaco 38
        <!-- BANCO DE DADOS (INTERNO) -->
106 espaco 39
        <jee:jndi-lookup id="dataSource" jndi-name="jdbc/sisEC" />
40
 
41
        <!-- BANCO DE DADOS (RANCHOVEIODABARRA) -->
42
        <!-- <jee:jndi-lookup id="dataSource" jndi-name="jdbc/sisRB" /> -->
43
 
44
        <!-- Configuração da unidade de persistência -->
45
        <bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
46
                <property name="dataSource" ref="dataSource" />
47
                <property name="persistenceUnitName" value="sisPU"/>
48
        </bean>
49
 
50
    <bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager" autowire-candidate="default">
51
        <property name="entityManagerFactory" ref="entityManagerFactory" />
52
    </bean>
53
 
54
    <!-- Habilita suporte a bean validation -->
55
        <bean id="validator" class="org.springframework.validation.beanvalidation.LocalValidatorFactoryBean"/>
56
 
57
        <!-- Suporte a annotations @Controller e @RequestMapping a nível de classe -->
58
        <bean class="org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping"/>
59
 
60
        <bean class="org.springframework.beans.factory.config.CustomScopeConfigurer">
61
            <property name="scopes">
62
                <map>
63
                    <entry key="view">
195 espaco 64
                        <bean class="br.com.ec.web.scope.ViewScope"/>
106 espaco 65
                    </entry>
66
                </map>
67
            </property>
68
        </bean>
69
 
70
</beans>