Author: indika
Date: Thu Oct 18 00:53:17 2007
New Revision: 585894

URL: http://svn.apache.org/viewvc?rev=585894&view=rev
Log:
add synapse language construct for   dblookup and  dbreport mediators

Modified:
    
webservices/synapse/trunk/java/src/site/resources/Synapse_Configuration_Language.html

Modified: 
webservices/synapse/trunk/java/src/site/resources/Synapse_Configuration_Language.html
URL: 
http://svn.apache.org/viewvc/webservices/synapse/trunk/java/src/site/resources/Synapse_Configuration_Language.html?rev=585894&r1=585893&r2=585894&view=diff
==============================================================================
--- 
webservices/synapse/trunk/java/src/site/resources/Synapse_Configuration_Language.html
 (original)
+++ 
webservices/synapse/trunk/java/src/site/resources/Synapse_Configuration_Language.html
 Thu Oct 18 00:53:17 2007
@@ -373,7 +373,7 @@
 <h2><a name="mediator">Mediators</a></h2>
 
 <p>A mediator token refers to any of the following tokens:</p>
-<pre><a href="#send">send</a> | <a href="#drop">drop</a> | <a 
href="#log">log</a> | <a href="#makefault">makefault</a> | <a 
href="#xslt">transform</a> | <a href="#header">header</a> | <a 
href="#filter">filter</a> | <a href="#switch">switch</a> | <a 
href="#class">class</a> | <a href="#validate">validate</a> | <a 
href="#property">property</a> | <a href="#sequence">sequence ref</a> | <a 
href="#in">in</a> | <a href="#out">out</a> | RMSequence | Throttle | 
XQuery</pre>
+<pre><a href="#send">send</a> | <a href="#drop">drop</a> | <a 
href="#log">log</a> | <a href="#makefault">makefault</a> | <a 
href="#xslt">transform</a> | <a href="#header">header</a> | <a 
href="#filter">filter</a> | <a href="#switch">switch </a> | class | dblookup | 
dbreport | <a href="#validate">validate</a> | <a href="#property">property</a> 
| <a href="#sequence">sequence ref</a> | <a href="#in">in</a> | <a 
href="#out">out</a>| RMSequence | Throttle | XQuery </pre>
 
 <p>In addition to the above, Synapse will be able to load mediators via the
 J2SE Service Provider model. Mediator extensions must implement the
@@ -621,6 +621,148 @@
 message of the sequence also an XPath expression should be specified. With
 the version attribute the WS-RM specification version to be used can be
 specified, 1.0 or 1.1. </p>
+
+<p></p>
+
+<h3>Database Mediators </h3>
+
+<div>
+<h4>DB-lookup mediator </h4>
+
+<div>
+<pre>&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="int|string"/&gt;*
+     &lt;result name="string" column="int|string"/&gt;*
+   &lt;/statement&gt;+&lt;/dblookup&gt;   &gt;</pre>
+</div>
+
+<p></p>
+
+<p>The dblookup mediator has designed only for read/lookup from a simple
+database table. The &lt;driver&gt;,&lt;url&gt;,&lt;user/&gt; and
+&lt;password/&gt; are used to create a new custom DataSource and
+&lt;property&gt; defines the properties for the DataSource. Supported
+properties for custom DataSources</p>
+
+<p>* autocommit = true | false</p>
+
+<p>* isolation = Connection.TRANSACTION_NONE</p>
+
+<p>* | Connection.TRANSACTION_READ_COMMITTED</p>
+
+<p>* | Connection.TRANSACTION_READ_UNCOMMITTED</p>
+
+<p>* | Connection.TRANSACTION_REPEATABLE_READ</p>
+
+<p>* | Connection.TRANSACTION_SERIALIZABLE</p>
+
+<p>* initialsize = int</p>
+
+<p>* maxactive = int</p>
+
+<p>* maxidle = int</p>
+
+<p>* maxopenstatements = int</p>
+
+<p>* maxwait = long</p>
+
+<p>* minidle = int</p>
+
+<p>* poolstatements = true | false</p>
+
+<p>* testonborrow = true | false</p>
+
+<p>* testonreturn = true | false</p>
+
+<p>* testwhileidle = true | false</p>
+
+<p>* validationquery = String</p>
+
+<p></p>
+
+<p>The &lt;dsName&gt;&lt;icClass/&gt;,&lt;url&gt;,&lt;user/&gt; and
+&lt;password/&gt; are used to Lookup the DataSource on JNDI using the
+specified properties. The &lt;dsName&gt; defines the name of the DataSource
+and the &lt;icClass&gt; defines the initial context class for JNDI.</p>
+
+<p>A single &lt;statement&gt; defines the SQL query for which extract data
+from the database. If there are any attribute in the SQL query that do not
+know value in advance, can be specified with '?' character. Any of attribute
+value defined by '?' will be filled using &lt;parameter&gt; element. The
+single &lt;parameter&gt; element contains 'value' or 'expression' and
+'type'.The 'type' should valid SQL type. Only the first row of a result set
+will be considered and others are ignored. The single &lt;result&gt; element
+contains the 'name' and the column' attributes. The 'name' attribute defines
+the name that used the key when a result is setting to Synapse Message
+Context. The 'column' indicates column name or column number. Each result
+will set to MessageContext as a key-value fair and the key will be 'name'
+attribute and the value will be the value at the column number or the column
+name .</p>
+
+<div>
+
+<div>
+<h4>DB-report mediator</h4>
+
+<div>
+<pre>&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;select something from table where something_else = 
?&lt;/sql&gt;
+     &lt;parameter [value="" | expression=""] type="int|string"/&gt;*
+    &lt;/statement&gt;+&lt;/dblreport&gt;   &gt;</pre>
+
+<div>
+<p></p>
+
+<p>The dbreport mediator has designed for writes (i.e. inserts one row) to a
+table using message information.. The information about this mediator is same
+as dblookup mediator. Only one difference here is ,there are no
+&lt;result&gt; elements.</p>
+</div>
+</div>
+
+<p></p>
+
+<p></p>
+</div>
+</div>
+</div>
 
 <h3>Extension mediator</h3>
 



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to