Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/athiththan11/class-mediator-jndi-datasource
A Sample Class Mediator Implementation on Accessing an External JNDI Datasource
https://github.com/athiththan11/class-mediator-jndi-datasource
jndi-lookups mediator wso2 wso2-api-manager wso2-class-mediator
Last synced: about 6 hours ago
JSON representation
A Sample Class Mediator Implementation on Accessing an External JNDI Datasource
- Host: GitHub
- URL: https://github.com/athiththan11/class-mediator-jndi-datasource
- Owner: athiththan11
- Created: 2019-12-02T06:01:39.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2020-11-04T18:24:51.000Z (about 4 years ago)
- Last Synced: 2023-03-07T14:10:42.356Z (over 1 year ago)
- Topics: jndi-lookups, mediator, wso2, wso2-api-manager, wso2-class-mediator
- Language: Java
- Homepage:
- Size: 5.86 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# WSO2 Class Mediator & External JNDI Datasource
A sample `WSO2 Class Mediator` implementation on defining and accessing an external JNDI Datasource.
## How To
### Define JNDI Datasource
Define the external JNDI datasource in `master-datasource.xml` which is placed inside the `/repository/conf/datasource/` directory. You can use the following sample JNDI Datasource configuration
```xml
InHouseExternal_DB
The datasource used for external purposes
jdbc/InHouseExternal
jdbc:mysql://localhost:3306/external?useSSL=false
root
root
com.mysql.jdbc.Driver
80
60000
5
true
SELECT 1
30000
```
### Build Project
Clone or download and the class mediator implementation and make the related chanages to the Mediation flow and build the project.
> NOTE: Don't forget to change the Datasource lookup name in the constructor
Use the following command to build the project
```sh
mvn clean package
```After a successful build, copy the JAR artifact fromt the `/target` folder and place it inside the `/repository/components/lib` directory.
### Design In-Sequence
Design an `in-sequence` flow to invoke the class mediator implementation to connect and communicate with the defined external datasource. Given below is a sample `in-sequence` ...
```xml
```