how to change activemq's persistence database

原创 2011年01月25日 15:34:00

how to change activemq's persistence database

 

1、编辑D:/Java/apache-servicemix-4.3.0-fuse-03-00/etc/activemq-broker.xml,

(1)将<persistenceAdapter>
                <kahaDB directory="${karaf.data}/activemq/default/kahadb"/>
            </persistenceAdapter>
替换为<persistenceAdapter>
                <jdbcPersistenceAdapter dataSource="#mysql-ds"/>
            </persistenceAdapter>
或者<persistenceFactory>
              <journaledJDBC journalLogFiles="5" dataSource="#mysql-ds" />
          </persistenceFactory>

(2)在</blueprint>之前添加:

<bean id="mysql-ds" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
        <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
        <property name="url" value="jdbc:mysql://localhost/jms?relaxAutoCommit=true"/>
        <property name="username" value="root"/>
        <property name="password" value=""/>
        <property name="poolPreparedStatements" value="true"/>
    </bean>
2、启动apache-servicemix-4.3.0-fuse-03-00:activemq-broker.xml为“installed”

注意:一定要先修改activemq-broker.xml,再启动servicemix

3、install commons-dbcp 包:

osgi:install -s mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.commons-dbcp/1.2.2_5

4、osgi:restart (activemq-broker.xml的osgi id)  或重启servicemix

 

 

 

 

 

 

 

 

 

 

 

版权声明:本文为博主原创文章,未经博主允许不得转载。

相关文章推荐

178: ISAM error: Database is locked; pending change to logging mode 解决办法整理

这个问题也许可以解决,不用重装informix 这个问题我也遇到了,而且是生产环境,并且我们单位的生产环境只运行在一台主机上,没有备机,当时在压力确实很大。因为当时不只是数据库被锁了,且inform...

How To Change the Partition Column Of A Partitioned Table Using DBMS_Redefinition [ID 846405.1]

How To Change the Partition Column Of A Partitioned Table Using DBMS_Redefinition [ID 846405.1] ...

How to Change Login User in SharePoint2013?

在SharePoint 2010中,我们可以在网站右上角Login User的下拉列表中找到Sign in as Different User切换登录用户使用。但是SharePoint 2013版本去...

How to programmatically change the default view of an InfoPath form

Microsoft Office InfoPath forms support multiple views. One view is the default view. When you open ...

How to Change the Hostname of a Linux System

原文:http://www.ducea.com/2006/08/07/how-to-change-the-hostname-of-a-linux-system/ Normally we ...
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:深度学习:神经网络中的前向传播和反向传播算法推导
举报原因:
原因补充:

(最多只允许输入30个字)