> ## Documentation Index
> Fetch the complete documentation index at: https://docs.flexagon.com/llms.txt
> Use this file to discover all available pages before exploring further.

# readWebLogicDataSources

> Reads Weblogic Data Sources from domain configurations and writes them into properties files. A separate properties file will be created for each Data

Reads Weblogic Data Sources from domain configurations and writes them into properties files. A separate properties file will be created for each Data Source.

These Properties files can be checked into source control and/or used as input to the CreateOrUpdateDataSources operation. It helps to automate the initial setup process for Data Sources by reducing the manual effort required to create the Property Files with the extracted datasource properties.

# Blog Posts

*  [https://flexagon.com/2018/06/read-all-your-weblogic-data-sources-in-a-click/](https://flexagon.com/2018/06/read-all-your-weblogic-data-sources-in-a-click/)

# Target Properties

<table><colgroup><col /><col /><col /><col /></colgroup><tbody><tr><th>**Property Name**</th><th>**Property Code**</th><th>**Required**</th><th>**Description**</th></tr><tr><td>Oracle Weblogic Home (WL\_HOME)</td><td>`FDWLS_WEBLOGIC_HOME`</td><td>Yes</td><td>WebLogic Home Directory. (e.g. /u01/oracle/products/fmw/wlserver)</td></tr><tr><td>Weblogic Domain Name</td><td>`FDWLS_DOMAIN_NAME`</td><td>Yes</td><td>WebLogic Domain Name.</td></tr><tr><td>Weblogic Admin Listen Address</td><td>`FDWLS_ADMIN_LISTEN_ADDRESS`</td><td>Yes</td><td>The listener address of the WLS admin server. (e.g. localhost)</td></tr><tr><td>Weblogic Admin Listen Port</td><td>`FDWLS_ADMIN_LISTEN_PORT`</td><td>Yes</td><td>The port of the WLS admin server. (e.g. 7001)</td></tr><tr><td>Weblogic Admin SSL Connection</td><td>`FDWLS_ADMIN_USE_SSL`</td><td>No</td><td>Indicates whether the admin server is using SSL.</td></tr><tr><td>Weblogic Admin User</td><td>`FDWLS_ADMIN_USER`</td><td>Yes</td><td>The username for the WLS admin server.</td></tr><tr><td>Weblogic Admin Password</td><td>`FDWLS_ADMIN_PASSWORD`</td><td>Yes</td><td>The password for `Weblogic Admin User`.</td></tr><tr><td>Weblogic Admin Domain Directory</td><td>`FDWLS_ADMIN_DOMAIN_DIRECTORY`</td><td>No</td><td>Weblogic Domain Directory for AdminServer. If not provided, `Weblogic Domain Directory` will be used.</td></tr><tr><td>Weblogic Domain Directory</td><td>`FDWLS_DOMAIN_DIRECTORY`</td><td>Yes</td><td>Weblogic Domain Directory.(e.g. `/u01/oracle/config/domains/soa_domain`)</td></tr></tbody></table>

# Inputs

<table><colgroup><col /><col /><col /><col /></colgroup><tbody><tr><th>**Input Name**</th><th>**Input Code**</th><th>**Required**</th><th>**Description**</th></tr><tr><td>File Path to Write Properties</td><td>`FILE_PATH_TO_WRITE_PROPERTIES`</td><td>No</td><td>Directory to store the Data Source properties files. If relative paths are given, paths inside of the FD\_TEMP\_DIR will be assumed.If it is left empty, the files will be created in the FD\_TEMP\_DIR.</td></tr><tr><td>WebLogic Partition Name</td><td>`FDWLS_INP_PARTITION`</td><td>No</td><td> Partition Name to retrieve the associated Data Sources. Provide input only if WebLogic Server version is 12.2x.</td></tr><tr><td>WebLogic ResourceGroup Name</td><td>`FDWLS_INP_RESOURCEGROUP`</td><td>No</td><td> ResourceGroup Name to retrieve the associated Data Sources. Provide input only if WebLogic Server version is 12.2x.</td></tr><tr><td>WebLogic ResourceGroup Template </td><td>`FDWLS_INP_RESOURCEGROUP_TEMPLATE`</td><td>No</td><td> ResourceGroup Template Name to retrieve the associated Data Sources. Provide input only if WebLogic Server version is 12.2x.</td></tr></tbody></table>

# Artifacts

This operation Produces properties-file artifacts.

# Endpoint Selection

This operation will select all available endpoints associated to the Target which have a resource type of **WLS Admin Server**. Since the admin server only runs on one server, it is expected that for a given domain, there will only be one endpoint with a resource type set to **WLS Admin Server**

# Endpoint Execution

This operation will execute on the Admin Server endpoint selected using the WLS Admin Server resource type.

# Special Considerations

If `File Path to Write Properties` is not specified, the `FD_TEMP_DIR` folder will be used. If a relative path is specified, the path will be relative to the `FD_TEMP_DIR` directory.

## Example Folder Structure

![Image](https://mintcdn.com/flexagon-llc-ce77a95c/NkeZh5D-Nf8j_WaD/images/fd111/12596423777.jpg?fit=max\&auto=format\&n=NkeZh5D-Nf8j_WaD\&q=85\&s=28e4bcf418d3bfdf6f39ddacf4256862)

## Properties File Naming

Properties files are named by the pattern \<DSName>.properties, removing all spaces in the name. See Example Properties File below.

* `SOADataSources.properties` – This is the properties file. The path to write and store the file is referenced by the `File Path to Write Properties` input.

## Example Property File

The sample file defines simple data source with a sub-set of the available Required properties.

> [!TIP]
>
> ### Backslash in Properties file
>
> If you want \ (backslash) in any property value, use \\\ or \u005c. This is Java properties file [load](http://docs.oracle.com/javase/7/docs/api/java/util/Properties.html#load%28java.io.Reader%29) syntax.

```
DSList=DS1

#DataSource Properties
#Thu Jun 13 10:00:52 CDT 2018
DS1.DataSourceType=Generic
DS1.URL=jdbc:oracle:thin:@localhost:1521:xe
DS1.ConnectionClass=oracle.jdbc.OracleDriver
DS1.DSName=DS1
DS1.User=${{FLX_DB_USER_FDADMIN}}
DS1.Targets=MS1
DS1.JNDINames=jdbc/DS1
DS1.Password=${{FLX_DB_PASSWORD_FDADMIN}}
DS1.MinCapacity=0
```

For more details on the types of Data Sources and their list of optional/required Properties, please refer the following link [createOrUpdateDataSources Operation](https://flexagon.atlassian.net/wiki/x/_oSZF)
