DB Lookup Mediator

The dblookup mediator is capable of executing an arbitrary SQL select statement, and then set some resulting values as local message properties on the message context. The DB connection used maybe looked up from an external DataSource or specified in-line, in which case an Apache DBCP connection pool is established and used.

Adding a DBLookup mediator

Go to Advanced and click DBLookup to add a DBLookup mediator. Figure 1 illustrate this,

Figure 1: Adding a DBLookup mediator

DBLookup mediator options

Clicking on the DBLookup mediator created as in figure 1 will open up DBLookup mediator specific options. Figure 2 illustrate this,

Figure 2: DBLookup mediator options

DBLookup mediator options field descriptions,

Data sources

Data Source

Existing

If existing data source is choosen, clicking "Load Data Sources" will give the available datasource. Then a data source can be selected.

Inline

Like in Pool connection data source configuration properties should be specified.

Adding properties

s Figure 3 shows the screen after clicking Add Property,

Figure 3: Adding a property

Property field descriptions,

Adding SQL statements

  1. Click Add Statement link shown in figure 3 and it'll open up the screen where you could enter SQL statement option. This is shown in figure 4.
  2. More than one statement may be specified.

Figure 4: Adding SQL statements