Author: supun
Date: Wed Jun 24 05:30:16 2009
New Revision: 39824
URL: http://wso2.org/svn/browse/wso2?view=rev&revision=39824

Log:
Adding mediator guides

Added:
   trunk/esb/java/docs/xdoc/mediators/dblookup.xml
   trunk/esb/java/docs/xdoc/mediators/dbreport.xml

Added: trunk/esb/java/docs/xdoc/mediators/dblookup.xml
URL: 
http://wso2.org/svn/browse/wso2/trunk/esb/java/docs/xdoc/mediators/dblookup.xml?pathrev=39824
==============================================================================
--- (empty file)
+++ trunk/esb/java/docs/xdoc/mediators/dblookup.xml     Wed Jun 24 05:30:16 2009
@@ -0,0 +1,171 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
+      "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd";>
+<html xmlns="http://www.w3.org/1999/xhtml";>
+<head>
+  <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
+  <title>WSO2 ESB - DBLookup Mediator </title>
+  <link href="css/esb-docs.css" rel="stylesheet" />
+  <link href="styles/dist-docs.css" rel="stylesheet" type="text/css"
+  media="all" />
+</head>
+
+<body>
+<h2>DBLookup Mediator</h2>
+
+<p>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. </p>
+
+<h3>Syntax</h3>
+<pre xml:space="preserve">&lt;dblookup&gt;
+   &lt;connection&gt;
+     &lt;pool&gt;
+      (
+       &lt;driver/&gt;
+       &lt;url/&gt;
+       &lt;user/&gt;
+       &lt;password/&gt;
+     |
+       &lt;dsName/&gt;
+       &lt;icClass/&gt;
+       &lt;url/&gt;
+       &lt;user/&gt;
+       &lt;password/&gt;
+     )
+       &lt;property name="name" value="value"/&gt;*
+     &lt;/pool&gt;
+   &lt;/connection&gt;
+   &lt;statement&gt;
+     &lt;sql&gt;select something from table where something_else = 
?&lt;/sql&gt;
+     &lt;parameter [value="" | expression=""] 
type="CHAR|VARCHAR|LONGVARCHAR|NUMERIC|DECIMAL|BIT|TINYINT|SMALLINT|INTEGER|BIGINT|REAL|FLOAT|DOUBLE|DATE|TIME|TIMESTAMP"/&gt;*
+     &lt;result name="string" column="int|string"/&gt;*
+   &lt;/statement&gt;+
+&lt;/dblookup&gt;</pre>
+
+<p>Apache DBCP connection pools support the following properties: </p>
+<ul>
+  <li>autocommit = true | false </li>
+  <li>isolation = Connection.TRANSACTION_NONE |
+    Connection.TRANSACTION_READ_COMMITTED |
+    Connection.TRANSACTION_READ_UNCOMMITTED |
+    Connection.TRANSACTION_REPEATABLE_READ |
+    Connection.TRANSACTION_SERIALIZABLE </li>
+  <li>initialsize = int </li>
+  <li>maxactive = int </li>
+  <li>maxidle = int </li>
+  <li>maxopenstatements = int </li>
+  <li>maxwait = long </li>
+  <li>minidle = int </li>
+  <li>poolstatements = true | false </li>
+  <li>testonborrow = true | false </li>
+  <li>testonreturn = true | false </li>
+  <li>testwhileidle = true | false </li>
+  <li>validationquery = String </li>
+</ul>
+
+<p>More than one statement may be specified, and the SQL statement may specify
+parameters which could be specified as values or XPath expressions. The types
+of parameters could be any valid SQL types. Only the first row of a result set
+will be considered and any others are ignored. The single &lt;result&gt;
+element contains the 'name' and the column' attributes. The 'name' attribute
+defines the name under which the result is stored in the Synapse message
+context, and the column attribute specifies a column number or name . </p>
+
+<h3>UI Configuration</h3>
+  <div class="image">
+    <img src="../dblookup-mediator/docs/images/dblookup-options.png" alt=""/>
+    <p>
+      Figure 1: DBLookup mediator options
+    </p>
+  </div>
+  <p>
+    DBLookup mediator options field descriptions,
+  </p>
+  <ul>
+    <li>
+      Connection Information - Specify whether the connection is
+      taken from a connection pool or from a data source
+    </li>
+    <li>Driver - Database driver</li>
+
+    <li>Url - JDBC URL of the database that data will be looked up.</li>
+    <li>User - Username that's used to connect to the database.</li>
+    <li>Password - Password used to connect to the database. </li>
+  </ul>
+  <h4>Data sources</h4>
+  <div>
+    <img src="../dblookup-mediator/docs/images/ds.png" alt="Data Source"/>
+  </div>
+  <h4>Existing</h4>
+  <p>If existing data source is choosen, clicking "Load Data Sources" will 
give the available datasource. Then a data source can be selected.</p>
+  <h4>Inline</h4>
+  <p>Like in Pool connection data source configuration properties should be 
specified.</p>
+  <h4>Adding properties</h4>
+  <p>
+    Figure 2 shows the screen after clicking Add Property,
+  </p>
+  <div class="image">
+    <img src="../dblookup-mediator/docs/images/add-properties.png" alt=""/>
+    <p>
+      Figure 2: Adding a property
+    </p>
+  </div>
+  <p>
+    Property field descriptions,
+  </p>
+  <ul>
+    <li> autocommit = true | false </li>
+    <li>
+      isolation = Connection.TRANSACTION_NONE |
+      Connection.TRANSACTION_READ_COMMITTED |
+      Connection.TRANSACTION_READ_UNCOMMITTED |
+      Connection.TRANSACTION_REPEATABLE_READ |
+      Connection.TRANSACTION_SERIALIZABLE
+    </li>
+    <li>initialsize = int </li>
+    <li> maxactive = int </li>
+    <li> maxidle = int </li>
+    <li> maxopenstatements = int </li>
+    <li> maxwait = long </li>
+    <li> minidle = int </li>
+    <li> poolstatements = true | false </li>
+    <li> testonborrow = true | false </li>
+    <li> testwhileidle = true | false </li>
+    <li> validationquery = String </li>
+  </ul>
+  <h4>Adding SQL statements</h4>
+  <ol>
+    <li>
+      Click Add Statement link shown in figure 2 and it'll open
+      up
+      the screen where you could enter SQL statement option. This is shown in
+      figure 3.
+    </li>
+    <li>More than one statement may be specified.</li>
+  </ol>
+  <ul>
+      <li>
+        The SQL statement may
+        specify parameters which could be specified as values or XPath
+        expressions.
+      </li>
+      <li>
+        The types of parameters could be any valid SQL types.
+        Only
+        the first row of a result set will be considered and any others are
+        ignored.
+      </li>    
+  </ul>
+  <div class="image">
+    <img src="../dblookup-mediator/docs/images/add-sql.png" alt=""/>
+    <p>
+      Figure 3: Adding SQL statements
+    </p>
+  </div>
+
+  <p></p>
+</body>
+</html>

Added: trunk/esb/java/docs/xdoc/mediators/dbreport.xml
URL: 
http://wso2.org/svn/browse/wso2/trunk/esb/java/docs/xdoc/mediators/dbreport.xml?pathrev=39824
==============================================================================
--- (empty file)
+++ trunk/esb/java/docs/xdoc/mediators/dbreport.xml     Wed Jun 24 05:30:16 2009
@@ -0,0 +1,134 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
+      "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd";>
+<html xmlns="http://www.w3.org/1999/xhtml";>
+<head>
+  <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
+  <title>WSO2 ESB - DBReport Mediator </title>
+  <link href="css/esb-docs.css" rel="stylesheet" />
+  <link href="styles/dist-docs.css" rel="stylesheet" type="text/css"
+  media="all" />
+</head>
+
+<body>
+<h2>DBReport Mediator</h2>
+
+<p>The dbreport mediator is very similar to the dblookup mediator, but writes
+information to a Database, using the specified insert SQL statement. </p>
+
+<h3>Syntax</h3>
+<pre xml:space="preserve">&lt;dbreport&gt;
+   &lt;connection&gt;
+     &lt;pool&gt;
+      (
+       &lt;driver/&gt;
+       &lt;url/&gt;
+       &lt;user/&gt;
+       &lt;password/&gt;
+     |
+       &lt;dsName/&gt;
+       &lt;icClass/&gt;
+       &lt;url/&gt;
+       &lt;user/&gt;
+       &lt;password/&gt;
+     )
+       &lt;property name="name" value="value"/&gt;*
+     &lt;/pool&gt;
+   &lt;/connection&gt;
+   &lt;statement&gt;
+     &lt;sql&gt;insert into something values(?, ?, ?, ?)&lt;/sql&gt;
+     &lt;parameter [value="" | expression=""] 
type="CHAR|VARCHAR|LONGVARCHAR|NUMERIC|DECIMAL|BIT|TINYINT|SMALLINT|INTEGER|BIGINT|REAL|FLOAT|DOUBLE|DATE|TIME|TIMESTAMP"/&gt;*
+    &lt;/statement&gt;+
+&lt;/dblreport&gt;</pre>
+  <h3>UI Configuration</h3>
+  <div class="image">
+    <img src="../dbreport-mediator/docs/images/dbreport-options.png" alt=""/>
+    <p>
+      Figure 1: DBReport options
+    </p>
+  </div>
+  <p>
+    DBReport mediator options field descriptions,
+  </p>
+  <ul>
+    <li>
+      Connection Information - Specify whether the connection is
+      taken from a connection pool or from a data source
+    </li>
+    <li>Driver - Database driver</li>
+    <li>Url - JDBC URL of the database that data will be looked up.</li>
+    <li>User - Username that's used to connect to the database.</li>
+    <li>
+      Password - Password used to connect to the
+      database.
+    </li>
+  </ul>
+  <h3>Data sources</h3>
+  <div class="image">
+  <img src="../dbreport-mediator/docs/images/ds.png" alt="Data Source"/>
+  </div>
+  <h4>Existing</h4>
+  <p>If existing data source is choosen, clicking "Load Data Sources" will 
give the available datasource. Then a data source can be selected.</p>
+  <h4>Inline</h4>
+  <p>Like in Pool connection data source configuration properties should be 
specified.</p>
+  <h4>Adding properties</h4>
+  <p>
+    Figure 2 shows the screen after clicking Add Property,
+  </p>
+  <div class="image">
+    <img src="../dbreport-mediator/docs/images/db-properties.png" alt=""/>
+    <p>Figure 2: Adding a property </p>
+  </div>
+  <p>Property field descriptions,</p>
+  <ul>
+    <li> autocommit = true | false </li>
+    <li>
+      isolation = Connection.TRANSACTION_NONE |
+      Connection.TRANSACTION_READ_COMMITTED |
+      Connection.TRANSACTION_READ_UNCOMMITTED |
+      Connection.TRANSACTION_REPEATABLE_READ |
+      Connection.TRANSACTION_SERIALIZABLE
+    </li>
+    <li>initialsize = int </li>
+    <li> maxactive = int </li>
+    <li> maxidle = int </li>
+    <li> maxopenstatements = int </li>
+    <li> maxwait = long </li>
+    <li> minidle = int </li>
+    <li> poolstatements = true | false </li>
+    <li> testonborrow = true | false </li>
+    <li> testwhileidle = true | false </li>
+    <li> validationquery = String </li>
+  </ul>
+  <h4>Adding SQL statements</h4>
+  <ol>
+    <li>
+      Click Add Statement link shown in figure 2 and it'll open
+      up
+      the screen where you could enter SQL statement option. This is shown in
+      figure 3.
+    </li>
+    <li>More than one statement may be specified.</li>
+  </ol>
+  <ul>    
+      <li>
+        The SQL statement may
+        specify parameters which could be specified as values or XPath
+        expressions.
+      </li>
+      <li>
+        The types of parameters could be any valid SQL types.
+        Only
+        the first row of a result set will be considered and any others are
+        ignored.
+      </li>    
+  </ul>
+  <div class="image">
+    <img src="../dbreport-mediator/docs/images/add-sql.png" alt=""/>
+    <p>
+      Figure 3: Adding SQL statements
+    </p>
+  </div>
+  <p></p>
+</body>
+</html>

_______________________________________________
Esb-java-dev mailing list
[email protected]
https://wso2.org/cgi-bin/mailman/listinfo/esb-java-dev

Reply via email to