Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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







```