batch
/subsystem=resource-adapters/resource-adapter=couchbaseQS:add(module=org.jboss.teiid.resource-adapter.couchbase)
/subsystem=resource-adapters/resource-adapter=couchbaseQS/connection-definitions=couchbaseDS:add(jndi-name="java:/couchbaseDS", class-name=org.teiid.resource.adapter.couchbase.CouchbaseManagedConnectionFactory, enabled=true, use-java-context=true)
/subsystem=resource-adapters/resource-adapter=couchbaseQS/connection-definitions=couchbaseDS/config-properties=ConnectionString:add(value="localhost")
/subsystem=resource-adapters/resource-adapter=couchbaseQS/connection-definitions=couchbaseDS/config-properties=Keyspace:add(value="default")
/subsystem=resource-adapters/resource-adapter=couchbaseQS/connection-definitions=couchbaseDS/config-properties=Namespace:add(value="default")
runbatch
Couchbase Data Sources
Couchbase data sources use a built-in Teiid specific JCA connector. There are many ways to create a Couchbase data source, using CLI, admin-console, etc. The example shown below uses the CLI tool, as this works in both Standalone and Domain modes.
Execute the following command using the CLI once you connected to the Server. Make sure you provide the correct URL and user credentials. Add any additional properties required by the connector by duplicating the "connection-definitions" command below. Edit the JNDI name to match the JNDI name you used in VDB.
To find out all the properties that are supported by this Couchbase Connector execute the following command in the CLI.
/subsystem=teiid:read-rar-description(rar-name=couchbase)
Tip
|
Developer’s Tip - If WildFly 19.1.0 is running in standalone mode, you can also manually edit the "<jboss-install>/standalone/configuration/standalone-teiid.xml" file and add the XML configuration defined in "<jboss-install>/docs/teiid/datasources/couchbase" directory under "resource-adapters" subsystem. Shutdown the server before you edit this file, and restart after the modifications are done. |