惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

V
Visual Studio Blog
罗磊的独立博客
宝玉的分享
宝玉的分享
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
V
V2EX
酷 壳 – CoolShell
酷 壳 – CoolShell
T
Tailwind CSS Blog
博客园_首页
量子位
月光博客
月光博客
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
博客园 - 司徒正美
人人都是产品经理
人人都是产品经理
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
爱范儿
爱范儿
S
SegmentFault 最新的问题
雷峰网
雷峰网
小众软件
小众软件
博客园 - 聂微东
美团技术团队
Apple Machine Learning Research
Apple Machine Learning Research
WordPress大学
WordPress大学
Jina AI
Jina AI
Hugging Face - Blog
Hugging Face - Blog

博客园 - 金江

SaeweedFS操作 15019:Only the instance admin may alter the PermSize attribute sqlplus连接oracle语法 Timesten 日常管理命令合集 TT8509: PL/SQL execution terminated; PLSQL_TIMEOUT exceeded Permanent data region free space insufficient to allocate 64792 bytes of memory TimesTen启动停止命令 TimesTen客户端DSN配置 Unable to connect to data source (DSN: shangjihuiclient; Network Address: ; Port Number: 53397). Cannot connect to TimesTen Server. Verify that the TimesTen Server is running or verify that your TCP PORT is set correctly. [TimesTen]TT7001: User authentication failed Kibana修改Time日志格式 [原创]hibernate更新后jdbc读取不到数据问题 数百条线程为何频繁断开,回调函数为何迟迟没有结果 [原创]II7/IIS8屏蔽YisouSpider蜘蛛 360安全卫士qurl.f.360.cn分析 GPFS文件系统笔记 [原创]解决DataSet的GetXml()方法空列不返回问题 Redis新的存储模式diskstore 在多台服务器上简单实现Redis的数据主从复制
[原创]Dubbo配置(Spring4+Hiberante4+Druid)
金江 · 2015-01-26 · via 博客园 - 金江

如果dubbo使用注解,并且spring也使用注解,如使用事务,则dubbo加过注解的类无法发布。

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tx="http://www.springframework.org/schema/tx"
    xmlns:aop="http://www.springframework.org/schema/aop"
    xsi:schemaLocation="http://www.springframework.org/schema/beans
        http://www.springframework.org/schema/beans/spring-beans.xsd
        http://www.springframework.org/schema/tx  
     http://www.springframework.org/schema/tx/spring-tx-3.1.xsd
     http://www.springframework.org/schema/aop 
     http://www.springframework.org/schema/aop/spring-aop-2.0.xsd 
     ">

    <!-- 配置数据源 -->
    <bean id="dataSource" class="com.alibaba.druid.pool.DruidDataSource"
        destroy-method="close">
        <property name="driverClassName" value="oracle.jdbc.driver.OracleDriver" />
        <property name="url" value="jdbc:oracle:thin:@127.0.0.1:1521:ORCL" />
        <property name="username" value="test1" />
        <property name="password" value="123456" />
        <property name="filters" value="wall" />
        <property name="initialSize" value="2" />
        <property name="minIdle" value="2" />
        <property name="maxActive" value="200" />
        <property name="maxWait" value="60000" />
        <property name="minEvictableIdleTimeMillis" value="300000" />
        <property name="validationQuery" value="select 1 from dual" />
        <property name="testWhileIdle" value="true" />
        <property name="testOnBorrow" value="false" />
        <property name="testOnReturn" value="false" />
        <property name="timeBetweenEvictionRunsMillis" value="60000" />
        <property name="poolPreparedStatements" value="true" />
        <property name="maxOpenPreparedStatements" value="100" />
    </bean>

    <!-- 配置hibernate SessionFactory -->
    <bean id="sessionFactory"
        class="org.springframework.orm.hibernate4.LocalSessionFactoryBean">
        <property name="dataSource" ref="dataSource" />
        <property name="hibernateProperties">
            <props>
                <prop key="hibernate.dialect">org.hibernate.dialect.Oracle10gDialect</prop>
                <prop key="hibernate.show_sql">true</prop>
                <prop key="hiberante.format_sql">true</prop>
                <prop key="hibernate.autoReconnect">true</prop>
            </props>
        </property>

        <!-- 扫描hibernate的注解 -->
        <property name="packagesToScan" value="com.br.model" />
    </bean>

    <!-- 事务管理器 -->
    <bean id="transactionManager"
        class="org.springframework.orm.hibernate4.HibernateTransactionManager">
        <property name="sessionFactory" ref="sessionFactory" />
    </bean>

    <!--启动注解用注解来管理事务 -->
    <tx:annotation-driven transaction-manager="transactionManager" />
</beans>