Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TEIID-3412: add steup ucanaccess datasource docs
- Loading branch information
1 parent
ead8f25
commit 31403a6
Showing
10 changed files
with
170 additions
and
309 deletions.
There are no files selected for viewing
9 changes: 9 additions & 0 deletions
9
build/kits/jboss-as7/docs/teiid/datasources/ucanaccess/create-ucanaccess-ds.cli
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# The value of 'driver-module-name' match to the ucanaccess driver module added in JBoss server | ||
/subsystem=datasources/jdbc-driver=ucanaccess:add(driver-name=ucanaccess,driver-module-name=net.ucanaccess,driver-class-name=net.ucanaccess.jdbc.UcanaccessDriver) | ||
|
||
/subsystem=datasources/data-source=ucanaccessDS:add(jndi-name=java:/ucanaccessDS, driver-name=ucanaccess, enabled=true,use-java-context=true, connection-url=jdbc:ucanaccess://{<mdb or accdb file path>},user-name={user}, password={password}) | ||
|
||
/subsystem=datasources/data-source=ucanaccessDS:test-connection-in-pool() | ||
|
||
## If you are working in a clustered environment, prepend "/profile=ha" to all the above commands that start with "/subsystem=.." | ||
|
17 changes: 17 additions & 0 deletions
17
...d/kits/jboss-as7/docs/teiid/datasources/ucanaccess/modules/net/ucanaccess/main/module.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?xml version="1.0" ?> | ||
|
||
<module xmlns="urn:jboss:module:1.1" name="net.ucanaccess"> | ||
|
||
<resources> | ||
<resource-root path="ucanaccess-[version].jar"/> | ||
<resource-root path="hsqldb.jar"/> | ||
<resource-root path="jackcess-[version].jar"/> | ||
<resource-root path="commons-lang-[version].jar"/> | ||
<resource-root path="commons-logging-[version].jar"/> | ||
</resources> | ||
|
||
<dependencies> | ||
<module name="javax.api"/> | ||
<module name="javax.transaction.api"/> | ||
</dependencies> | ||
</module> |
28 changes: 28 additions & 0 deletions
28
build/kits/jboss-as7/docs/teiid/datasources/ucanaccess/readme.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
There are two parts to creating a datasource, depending upon whether this is the first time you are doing this, | ||
you can skip the deploying JDBC driver for the database, if you have previously already done this. | ||
|
||
Note that all instances of [version] should be replaced by the appropriate ucanaccess and it's dependency version. | ||
|
||
Step 1: Installing the Driver Module | ||
|
||
1) Download ucanaccess 2.0.9.4 or later(https://sourceforge.net/projects/ucanaccess/files/) | ||
|
||
2) Overlay the "modules" directory on the "<jboss-as>/modules" directory | ||
|
||
3) Unzip 1) will get 5 jars(ucanaccess-[version].jar,hsqldb.jar,jackcess-[version].jar,commons-lang-[version].jar,commons-logging-[version].jar), copy all these jars into the "<jboss-as>/modules/org/apache/phoenix/main" directory. | ||
|
||
4) Start server | ||
|
||
Step 2: Creating the datasource | ||
|
||
Option 1: Edit the standalone-teiid.xml or domain-teiid.xml file and add contents of the "ucanaccess.xml" | ||
file under the "datasources" subsystem. You may have to edit contents according to where your Access File | ||
is located and credentials you need to use to access it. | ||
|
||
Option 2: Take a look at create-ucanaccess-ds.cli script, and modify and execute using JBoss CLI tool as below | ||
|
||
./bin/jboss-cli.sh --connect --file=create-ucanaccess-ds.cli | ||
|
||
Option 3: Deploy ucanaccess-ds.xml file. You may have to edit contents according to where your Access File | ||
is located and credentials you need to use to access it. | ||
|
16 changes: 16 additions & 0 deletions
16
build/kits/jboss-as7/docs/teiid/datasources/ucanaccess/ucanaccess-ds.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<!-- Add the below contents under "datasources" subsystem in the standalone-teiid.xml or deploy as -ds.xml file --> | ||
<datasources> | ||
<datasource jndi-name="java:jboss/datasources/ucanaccessDS" enabled="true" use-java-context="true" pool-name="ucanaccessDS"> | ||
<connection-url>jdbc:ucanaccess://{<mdb or accdb file path>}</connection-url> | ||
<driver>ucanaccess</driver> | ||
<security> | ||
<user-name>{user}</user-name> | ||
<password>{password}</password> | ||
</security> | ||
</datasource> | ||
<drivers> | ||
<driver name="ucanaccess" module="net.ucanaccess"> | ||
<driver-class>net.ucanaccess.jdbc.UcanaccessDriver</driver-class> | ||
</driver> | ||
</drivers> | ||
</datasources> |
21 changes: 21 additions & 0 deletions
21
build/kits/jboss-as7/docs/teiid/datasources/ucanaccess/ucanaccess.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<!-- Add the below contents under "datasources" subsystem in the standalone-teiid.xml or deploy as -ds.xml file --> | ||
<subsystem xmlns="urn:jboss:domain:datasources:1.2"> | ||
<datasources> | ||
<datasources> | ||
<datasource jndi-name="java:jboss/datasources/ucanaccessDS" enabled="true" use-java-context="true" pool-name="ucanaccessDS"> | ||
<connection-url>jdbc:ucanaccess://{<mdb or accdb file path>}</connection-url> | ||
<driver>ucanaccess</driver> | ||
<security> | ||
<user-name>{user}</user-name> | ||
<password>{password}</password> | ||
</security> | ||
</datasource> | ||
<drivers> | ||
<driver name="ucanaccess" module="net.ucanaccess"> | ||
<driver-class>net.ucanaccess.jdbc.UcanaccessDriver</driver-class> | ||
</driver> | ||
</drivers> | ||
</datasources> | ||
</subsystem> | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.