Hi All,
I have been trying to deploy the custom datasource using jboss cli after installing the jdbc driver.
The deployment is successfull but the values that I am reading from properties files does seem to propagating to my datasource
Cli file
/profile=ha/subsystem=datasources/jdbc-driver=sqlserver:add(driver-n
ame=sqlserver,driver-module-name=net.sourceforge.jtds,driver-class-n
ame="${db.driver}")
/profile=ha/subsystem=datasources/data-source=sqlserverDS45:add(jndi
-name="${db.jndi_name}", driver-name=sqlserver, connection-url=${d
b.url}, user-name="${db.user}", password="${db.password}", enabled=t
rue, use-java-context=true )
Properties file
db.driver=net.sourceforge.jtds.jdbc.Driver
db.jndi_name=java:jboss/datasources/CompanysDS2
db.url=jdbc:jtds:sqlserver://172.31.30.17:1433/Companys;instance=MSSQLSERVER
db.user=sa
db.password=XXX
When I run the above file using
./teiid/teiid-8.11.0.Final/bin/jboss-cli.sh --connect controller=10.95.107.55 --file=sqlserverds/create-jtds-ds.cli --properties=sqlserverds/create-jtds-ds.properties
I was getting error could not create instance for class ${db.driver}.
The once I hardcoded the driver name in the cli file(which is net.sourceforge.jtds.jdbc.Driver )I was able to see that datasource got created(in the admin console) with JNDI name as ${db.jndi_name} and connection url ${db.url}. So for some reasons the values from the properties files are not getting used during the datasource creation.
Request you let me know If I am missing any steps as part of this deployment
Thanks
Anil
$driver}