JBoss Community Archive (Read Only)

ModeShape 5

Database

Description

A binary store which stores values in database. The list of supported databases is: H2, MySQL, PostgreSQL and Oracle.

Configuration

JSON

Depending on whether or not the datasource is managed outside of ModeShape, there are two ways in which you can configure this binary store:

  "storage" : {        
        "binaryStorage" : {            
            "type"  : "database",
            "driverClass" : "org.h2.Driver",
            "url" : "jdbc:h2:mem:target/test/binary-store-db;DB_CLOSE_DELAY=-1",
            "username" : "sa",
            "password" : "sa"
        }
    }

or

"storage" : {        
        "binaryStorage" : {            
            "type"  : "database",
            "dataSourceJndiName" : "java:/testDS"
        }
    }

JBoss AS

<repository>
  <db-binary-storage data-source-jndi-name="java:jboss/datasources/ExampleDS"/>
</repository>

Attributes

Name

Required

Configuration

Description

driverClass

yes (when not using dataSourceJndiName)

JSON

the fully qualified name of the JDBC driver

url

yes (when not using dataSourceJndiName)

JSON

the JDBC connection URL

username

no

JSON

the JDBC connection user name

password

no

JSON

the JDBC connection password

dataSourceJndiName

yes (when not using driverClass and url)

JSON

the JNDI binding of the datasource

data-source-jndi-name

yes

JBoss AS

the JNDI binding of the datasource

plus the common attributes described here

JBoss.org Content Archive (Read Only), exported from JBoss Community Documentation Editor at 2020-03-11 12:12:57 UTC, last content change 2016-04-07 07:23:28 UTC.