[jboss-dev-forums] [Design of JBoss ESB] - JSR-170 message store

derek.adams do-not-reply at jboss.com
Tue Apr 10 16:46:50 EDT 2007


There have been a few posts about implementing a JSR-170 (aka JCR) message store as an alternative to the default database implementation. I wrote a simple implementation using the Apache Jackrabbit libraries as a base. The new implementation has been checked into the SVN trunk and is available for testing. The required libraries and configuration files are now packaged as part of the jbossesb.sar. 

To enable the JCR message store, add the following property to the "core" section of jbossesb-properties.xml in the root of the jboss-esb.sar:


  | <property name="org.jboss.soa.esb.persistence.base.plugin.jcr" value="org.jboss.internal.soa.esb.persistence.format.jcr.JCRMessageStorePlugin"/>
  | 

This adds the JCR plugin to the MessageStoreFactory plugins list. The JCR message store can use an existing repository via JNDI or can create a standalone instance locally on the app server. The following list of properties should be added in the "dbstore" section of jbossesb-properties.xml to configure repository access:


  | <property name="org.jboss.soa.esb.persistence.jcr.jndi.path" value="jcr"/>
  | <property name="org.jboss.soa.esb.persistence.jcr.username" value="username"/>
  | <property name="org.jboss.soa.esb.persistence.jcr.password" value="password"/>
  | <property name="org.jboss.soa.esb.persistence.jcr.root.node.path" value="JBossESB/MessageStore"/>
  | 

jcr.jndi.path - optional path in JNDI where the repository is found. If not specified, a new repository will be created based on the repository.xml located in the root of jbossesb.sar. In this case, repository data is stored in the JBossAS/server/{servername}/data/repository directory.

jcr.username - username for getting a repository session

jcr.password - password for gettging a repository session

jcr.root.node.path - the path relative to the root of the repository where messages will be stored

An easy test for whether the JCR message store is configured properly is to add the org.jboss.soa.esb.actions.persistence.StoreJCRMessage action onto an existing service. The action will attempt to store the current message to the JCR store. 

Let me know if you run into any problems. 

Thanks, 
Derek

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4036126#4036126

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4036126



More information about the jboss-dev-forums mailing list