This binary store implementation establishes a connection to the specified database and then attempts to determine which type of database is being used. ModeShape is aware of the following database types:
mysql
postgres
derby
hsql
h2
sqlite
db2
db2_390
informix
interbase
firebird
sqlserver
access
oracle
sybase
These statements are read from a property file named "binary_store_{type}_database.properties
", where where " {type}
" is one of the above-mentioned database type strings. These properties files are expected to be found on the classpath directly under "org/modeshape/jcr/database". If the corresponding file is not found on the classpath, then the " binary_store_default_database.properties
" file provided by ModeShape is used.
ModeShape provides out-of-the-box database-specific files for several of the DBMSes that are popular within the open source community. The properties files for the other database types are not provided (though the ModeShape community will gladly incorporate them if you wish to make them available to us); in such cases, simply copy one of the provided properties files (e.g., "binary_store_default_database.properties
" is often a good start) and customize it for your particular DBMS, naming it according to the pattern described above and including it on the classpath.
Note that this mechanism can also be used to override the statements that ModeShape does provide out-of-the-box. In such cases, be sure to place the file on the classpath before the ModeShape JARs so that your file will be discovered first.
The JDBC driver used needs to be at least JDBC 1.4 (JDK 6) compliant, because {@link PreparedStatement#setBinaryStream(int parameterIndex,java.io.InputStream x)} is being used.
|
|