我同时使用了JBoss AS 4 (JBoss MQ)和JBoss AS 7 (Hornet )。我想配置存储队列的位置。在default AS 4/ JBoss /jboss/default/default的目标中,我有默认的-ds.xml,我相信这是在数据库中存储队列的配置:
DefaultDS<xa-datasource-class>org.h2.jdbcx.JdbcDataSource</xa-datasource-class>
<xa-datasource-property name="URL">jdbc:h2:${jboss.server.data.dir}${/}h2${/}localDB;LOCK_TIMEOUT=360000;DB_CLOSE_ON_EXIT=FALSE</xa-datasource-property>
<user-name>sa</user-name>
<min-pool-size>1</min-pool-size>
<max-pool-size>10</max-pool-size>
<track-connection-by-tx />
<metadata>
<type-mapping>Hypersonic SQL</type-mapping>
</metadata>
</xa-datasource>
我想知道在JBOSS AS 7 by hornetQ中是否有这样的文件,它可以帮助我配置存储队列。我需要在服务器重启之间保持队列,等等。文件在哪里?只有standalone.xml吗?
发布于 2014-10-29 05:04:40
HornetQ仅支持文件持久性。HornetQ使用一组二进制日志文件将消息存储在队列中。
默认情况下,信息存储在$JBOSS_HOME/standalone/data (messagingbindings, messagingjournal and messaginglargemessages directory)中。
您可以通过修改standalone.xml文件中的messaging subsystem来更改默认目录。
例如
<subsystem xmlns="urn:jboss:domain:messaging:1.1">
<hornetq-server>
<!-- first of all we want to use a journal on disk (this is important) -->
<persistence-enabled>true</persistence-enabled>
<journal-directory path="path/to/journal" relative-to="user.home"/>
<bindings-directory path="path/to/bindings" relative-to="user.home"/>
<large-messages-directory path="path/to/large-message" relative-to="user.home"/>
<paging-directory path="path/to/paging" relative-to="user.home"/>
<!-- ... -->
</hornetq-server>
</subsystem>注意:路径总是相对于相对属性(系统属性,在本例中是用户主页)。不能定义绝对路径。
https://stackoverflow.com/questions/26608844
复制相似问题