diff --git a/README.md b/README.md index ca241c3..7defd6a 100644 --- a/README.md +++ b/README.md @@ -24,21 +24,21 @@ Add the following dependency: # JDBC URLs -JDBC URLs using this drivers must start with 'jdbc:jcr:'. +JDBC URLs using this drivers must start with ```jdbc:jcr:```. The following JDBC URLs are supported: -- **jdbc:jcr:http(s)://...** (e.g, jdbc:jcr:http://localhost:8080/server/) -- **jdbc:jcr:file://...** -- **jdbc:jcr:jndi:...** -- **jdbc:jcr:** (e.g, jdbc:jcr:?repository.conf=repository.xml&repository.home=repository) +- ```jdbc:jcr:http(s)://...``` (e.g, ```jdbc:jcr:http://localhost:8080/server/```) +- ```jdbc:jcr:file://...``` +- ```jdbc:jcr:jndi:...``` +- ```jdbc:jcr:``` (e.g, ```jdbc:jcr:?repository.conf=repository.xml&repository.home=repository```) -The first one is to create a remote repository connection using SPI2DAVex with the given URL. +The first one is to create a remote repository connection using ```SPI2DAVex``` with the given URL. The second one is to create an embedded Jackrabbit repository located in the given directory. -The third one is to lookup JNDI for the named repository. See the org.apache.jackrabbit.commons.JndiRepositoryFactory +The third one is to lookup JNDI for the named repository. See the ```org.apache.jackrabbit.commons.JndiRepositoryFactory``` for more details. -The fourth one (with an empty location and repository parameters) is to create a TransientRepository. +The fourth one (with an empty location and repository parameters) is to create a ```TransientRepository```. -# Example to create JDBC Connection +# Example to create JDBC ```Connection``` ```java private Connection getConnection() throws SQLException { @@ -53,7 +53,23 @@ The fourth one (with an empty location and repository parameters) is to create a } ``` -# Example with Statement +# Example to define JNDI ```DataSource``` resource + +It assumes there is a JNDI resource (```jcr/repository```) as ```javax.jcr.Repository```. + +```xml + +``` + +# Example with ```Statement``` ```java // @@ -111,7 +127,7 @@ The fourth one (with an empty location and repository parameters) is to create a } ``` -# Example with PreparedStatement +# Example with ```PreparedStatement``` ```java final String sql2 =