"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" } }
A binary store which stores values in database. The list of supported databases is: H2, MySQL, PostgreSQL and Oracle.
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" } }
<repository> <db-binary-storage data-source-jndi-name="java:jboss/datasources/ExampleDS"/> </repository>
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