Description
I'm using version 2.0.0 of weblogic-deploy-tooling that supports the new compact domain topology profile (thanks for adding that by the way). There is an issue when using compact domains if you want to use a non derby database for any of the RCU datasources.
I'm running the following command...
$ createDomain.cmd -domain_parent target -domain_type OSEF -model_file osefDomain.yml
This is my osefDomain.yml template file...
domainInfo:
AdminPassword: welcome1
ServerStartMode: dev
RCUDbInfo:
rcu_prefix: OSEF
rcu_schema_password: xxxxxxxx
rcu_db_conn_string: 'localhost:1521/XE'
rcu_db_user: OSEF_STB
topology:
Name: DefaultDomain
AdminServerName: DefaultServer
Server:
DefaultServer:
ListenAddress: localhost
SSL:
HostnameVerificationIgnored: true
TwoWaySSLEnabled: true
Enabled: true
resources:
JDBCSystemResource:
LocalSvcTblDataSource:
Target: DefaultServer
JdbcResource:
JDBCConnectionPoolParams:
StatementCacheSize: 10
InitialCapacity: 1
MinCapacity: 1
TestTableName: SQL SELECT 1 FROM DUAL
StatementCacheType: LRU
MaxCapacity: 15
JDBCDataSourceParams:
GlobalTransactionsProtocol: None
JNDIName: jdbc/LocalSvcTblDataSource
JDBCDriverParams:
URL: 'jdbc:oracle:thin:@//localhost:1521/XE'
PasswordEncrypted: 'xxxxxxxx'
DriverName: oracle.jdbc.OracleDriver
Properties:
user:
Value: OSEF_STB
Notice above I specify the LocalSvcTblDataSource datasource to be jdbc:oracle:thin:@//localhost:1521/XE
.
This is my wdt_custom_config\typesdefs\OSEF.json
file...
{
"copyright": "Copyright (c) 2021 Energy Queensland. All rights reserved.",
"name": "OSEF",
"description": "OSEF type domain definitions",
"topologyProfile": "Compact",
"versions": {
"12.2.1.4": "OSEF_12CR2",
"14.1": "NOT_SUPPORTED"
},
"definitions": {
"OSEF_12CR2": {
"baseTemplate": "Basic WebLogic Server Domain",
"extensionTemplates": [
"Oracle Service Bus"
],
"rcuSchemas": [ ]
}
}
}
The topologyProfile is specified as Compact.
When the domain is generated, I can see this in the output log, showing that it is trying to update the LocalSvcTblDatasource...
####<02/02/2022 8:17:58 PM> <INFO> <DatasourceDeployer> <_add_named_elements> <WLSDPLY-09608> <Updating JDBCSystemResource LocalSvcTblDataSource>
####<02/02/2022 8:17:58 PM> <INFO> <DatasourceDeployer> <_add_model_elements> <WLSDPLY-09604> <Updating JdbcResource for JDBCSystemResource LocalSvcTblDataSource>
####<02/02/2022 8:17:58 PM> <INFO> <DatasourceDeployer> <_add_model_elements> <WLSDPLY-09603> <Updating JDBCConnectionPoolParams for JdbcResource>
####<02/02/2022 8:17:59 PM> <INFO> <DatasourceDeployer> <_add_model_elements> <WLSDPLY-09603> <Updating JDBCDataSourceParams for JdbcResource>
####<02/02/2022 8:17:59 PM> <INFO> <DatasourceDeployer> <_add_model_elements> <WLSDPLY-09603> <Updating JDBCDriverParams for JdbcResource>
####<02/02/2022 8:17:59 PM> <INFO> <DatasourceDeployer> <_add_named_elements> <WLSDPLY-09609> <Updating Properties user in JDBCDriverParams>
####<02/02/2022 8:17:59 PM> <INFO> <DatasourceDeployer> <_add_named_elements> <WLSDPLY-09606> <Adding Properties SendStreamAsBlob to JDBCDriverParams>
####<02/02/2022 8:17:59 PM> <INFO> <DatasourceDeployer> <_add_named_elements> <WLSDPLY-09606> <Adding Properties oracle.net.CONNECT_TIMEOUT to JDBCDriverParams>
####<02/02/2022 8:17:59 PM> <INFO> <DatasourceDeployer> <_add_named_elements> <WLSDPLY-09606> <Adding Properties weblogic.jdbc.crossPartitionEnabled to JDBCDriverParams>
But this is how the LocalSvcTblDataSource actually looks when the domain is generated. Notice it's using derby...
<?xml version="1.0" encoding="UTF-8"?>
<jdbc-data-source xsi:schemaLocation="http://www.bea.com/ns/weblogic/jdbc-data-source http://www.bea.com/ns/weblogic/jdbc-data-source/1.0/jdbc-data-source.xsd" xmlns="http://xmlns.oracle.com/weblogic/jdbc-data-source" xmlns:sec="http://www.bea.com/ns/weblogic/90/security" xmlns:wls="http://www.bea.com/ns/weblogic/90/security/wls" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<name>LocalSvcTblDataSource</name>
<jdbc-driver-params>
<url>jdbc:derby://localhost:1527/demoDB;ServerName=localhost;databaseName=demoDB</url>
<driver-name>org.apache.derby.jdbc.ClientDataSource</driver-name>
<properties>
<property>
<name>user</name>
<value>demoDB</value>
</property>
<property>
<name>portNumber</name>
<value>1527</value>
</property>
<property>
<name>databaseName</name>
<value>demoDB;create=true</value>
</property>
<property>
<name>serverName</name>
<value>localhost</value>
</property>
</properties>
<password-encrypted>{AES256}zC5YghWFY3bxD66bj14bSjDJmTBoxa7Ac7CSB9cAlUQ=</password-encrypted>
</jdbc-driver-params>
<jdbc-connection-pool-params>
<test-table-name>SQL SELECT 1 FROM SYS.SYSTABLES</test-table-name>
</jdbc-connection-pool-params>
<jdbc-data-source-params>
<jndi-name>jdbc/LocalSvcTblDataSource</jndi-name>
<global-transactions-protocol>None</global-transactions-protocol>
</jdbc-data-source-params>
</jdbc-data-source>
I recently raised an Oracle Service Request for this issue (SR 3-27711535361 : wlst writeDomain with Compact Topology always generate datasources use derby). The only way to use non derby datasources in a compact domain, is to call setOption('UseSampleDatabase', 'false')
in wlst, before the writeDomain()
call. Is there a way to either have weblogic-deploy-tooling detect that an RCU datasource has been configured and have it automatically call setOption('UseSampleDatabase', 'false')
, or for the user to be able to specify a configuration option in the domain template that will cause this option to be set?