Skip to content

WSO2 ESB mediator that returns more than one reslt from the resultset returned by a given query as a body of the original request.

Notifications You must be signed in to change notification settings

vklevko/dbMultipleLookup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

dbMultipleLookup

WSO2 ESB (http://wso2.com/products/enterprise-service-bus/) mediator that performs look up against defined connection or data source and puts returned result set as a message context property for further use. This mediator was designed based on abstract database mediator, serializer and factory so it shares common configuration and processing approach of well known dblookup mediator. The difference in these two is that dbMultipleLookup returns a result set rather than a single result.

Usage:

Drop the built artifact multiple-dblookup-mediator-1.0.jar into:

<WSO2_ESB_HOME>/repository/components/dropins

Configuration using JNDI data source:

<dbMultipleLookup>
    <connection>
        <pool>
            <dsName>jndi/DATASOURCE</dsName>
        </pool>
    </connection>
    <statement>
        <sql>SELECT * FROM `SOME_TABLE`</sql>
        <result name="RES_1" column="COL_1"/>
        <result name="RES_2" column="COL_2"/>
    </statement>
</dbMultipleLookup>

Configuration with custom connection:

<dbMultipleLookup>
    <connection>
         <driver>com.example.Driver</driver>
         <url>jdbc://example.com/database</url>
         <user/>
         <password/>
    </connection>
    <statement>
        <sql>SELECT * FROM `SOME_TABLE`</sql>
        <result name="RES_1" column="COL_1"/>
        <result name="RES_2" column="COL_2"/>
    </statement>
</dbMultipleLookup>

Getting Multiple DB Lookup Result set:

<property name="RESULT_SET" expression="get-property('DB_MULTIPLE_LOOKUP_RESULTSET')"/>
some other examples...

About

WSO2 ESB mediator that returns more than one reslt from the resultset returned by a given query as a body of the original request.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages