13.4. Configure a Message Store

download PDF

Procedure 13.1. Task

  1. Open the global configuration file in a text editor: vi SOA_ROOT/jboss-as/server/PROFILE/deployers/esb.deployers/jbossesb-properties.xml.
  2. Scroll down to the section and edit it to suit your configuration:
    <properties name="dbstore">
      <!--  connection manager type -->
      <property name="org.jboss.soa.esb.persistence.db.conn.manager" value=
    "org.jboss.internal.soa.esb.persistence.manager.StandaloneConnectionManager"/>
        <!-- this property is only used for the j2ee connection manager -->
        <property name="org.jboss.soa.esb.persistence.db.datasource.name" 	
          value="java:/JBossesbDS"/>
        <!-- standalone connection pooling settings -->
        <!--  mysql
        <property name="org.jboss.soa.esb.persistence.db.connection.url" 	
          value="jdbc:mysql://localhost/jbossesb"/>
        <property name="org.jboss.soa.esb.persistence.db.jdbc.driver" 		
          value="com.mysql.jdbc.Driver"/>
        <property name="org.jboss.soa.esb.persistence.db.user" 				
          value="kstam"/> -->
        <!--  postgres 
        <property name="org.jboss.soa.esb.persistence.db.connection.url" 	
          value="jdbc:postgresql://localhost/jbossesb"/>
        <property name="org.jboss.soa.esb.persistence.db.jdbc.driver" 		
          value="org.postgresql.Driver"/>
        <property name="org.jboss.soa.esb.persistence.db.user" 				
          value="postgres"/>
        <property name="org.jboss.soa.esb.persistence.db.pwd" 				
          value="postgres"/> -->
        <!-- hsqldb -->
        <property name="org.jboss.soa.esb.persistence.db.connection.url" 	
          value="jdbc:hsqldb:hsql://localhost:9001/jbossesb"/>
        <property name="org.jboss.soa.esb.persistence.db.jdbc.driver" 		
          value="org.hsqldb.jdbcDriver"/>
        <property name="org.jboss.soa.esb.persistence.db.user" value="sa"/>
        <property name="org.jboss.soa.esb.persistence.db.pwd" value=""/>	
        <property name="org.jboss.soa.esb.persistence.db.pool.initial.size"	
          value="2"/>
        <property name="org.jboss.soa.esb.persistence.db.pool.min.size"		
          value="2"/>
        <property name="org.jboss.soa.esb.persistence.db.pool.max.size"		
          value="5"/>
        <!--table managed by pool to test for valid connections
            created by pool automatically -->
        <property name="org.jboss.soa.esb.persistence.db.pool.test.table"	
          value="pooltest"/>		
        <property name="org.jboss.soa.esb.persistence.db.pool.timeout.millis"
          value="5000"/> 
    </properties>
    

    Note

    You will find the scripts for the "required database" schema in the SOA_ROOT/jboss-as/server/PROFILE/deploy/jbossesb.esb/message-store-sql/DB_TYPE/create_database.sql file.
  3. Sill in the global configuration file, configure the database connection manager:
    <!--  connection manager type -->
    <property name="org.jboss.soa.esb.persistence.db.conn.manager" 
      value="org.jboss.internal.soa.esb.persistence.format.db.Standalone
    ConnectionManager"/>
    <!--  property name="org.jboss.soa.esb.persistence.db.conn.manager" 
    value="org.jboss.soa.esb.persistence.manager.J2eeConnectionManager"/ -->
    <!-- this property is only used for the j2ee connection manager -->
    <property name="org.jboss.soa.esb.persistence.db.datasource.name" 
      value="java:/JBossesbDS"/>
    

    Note

    The Stand-Alone Manager uses C3PO to manage the connection pooling logic whilst the J2eeConnectionManager, by contrast, employs a data-source. Use the latter when deploying Enterprise Service Bus end-points inside a container such as a JBoss Application Server.
  4. Save the file and exit.
  5. Alternatively, you could plug in a custom connection manager by implementing the org.jboss.internal.soa.esb.persistence.manager.ConnectionManager interface and then updating the Properties file by providing it with the name of the new class.
Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.