Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
dev:jdbc:router [2009/11/30 16:21]
tdo
dev:jdbc:router [2016/06/28 22:38] (current)
Line 191: Line 191:
 </​code>​ </​code>​
  
-Declaring business rules using Java+===== Declaring business rules using Java =====
  
 Business rules that use Java are declared in the configuration file using the following settings: Business rules that use Java are declared in the configuration file using the following settings:
Line 209: Line 209:
  
 The following examples show how rules that use Java are declared in the configuration file: The following examples show how rules that use Java are declared in the configuration file:
 +<code xml>
 <​rules>​ <​rules>​
   <​rule>​   <​rule>​
Line 233: Line 233:
   <​initialRule>​org.mycompany.omnidex.routeQueries</​initialRule>​   <​initialRule>​org.mycompany.omnidex.routeQueries</​initialRule>​
 </​rules>​ </​rules>​
-  +</​code>​  
- +===== Writing Extended Classes in Java =====
-Writing Extended Classes in Java+
  
 The Omnidex JDBC Intelligent Router provides a set of base classes that can be extended for each Java-based rule declared in the configuration file.  From within this class, the author can obtain the SQL Statement, evaluate the SQL statement using whatever approach they wish, and even alter the SQL statement. ​ The class returns an OdxJDBCRouterServer object indicating which server should be used.  This server object may be looked up in the configuration file, and the connection string and connection pooling information may then be modified if needed. ​ It is also possible to create an OdxJDBCRouterServer object dynamically without first looking it up in the configuration file. The Omnidex JDBC Intelligent Router provides a set of base classes that can be extended for each Java-based rule declared in the configuration file.  From within this class, the author can obtain the SQL Statement, evaluate the SQL statement using whatever approach they wish, and even alter the SQL statement. ​ The class returns an OdxJDBCRouterServer object indicating which server should be used.  This server object may be looked up in the configuration file, and the connection string and connection pooling information may then be modified if needed. ​ It is also possible to create an OdxJDBCRouterServer object dynamically without first looking it up in the configuration file.
Line 248: Line 247:
  
 <code java> <code java>
- 
 package org.mycompany.omnidex;​ package org.mycompany.omnidex;​
  
Line 258: Line 256:
   /**   /**
    * Process the rule, which returns a single    * Process the rule, which returns a single
-   ​* ​<​code>​OdxJDBCRouterServer</​code> ​object.+   * OdxJDBCRouterServer object.
    *    *
-   * @return a <​code>​OdxJDBCRouterServer</​code> ​object that contains the server +   * @return a OdxJDBCRouterServer object that contains the server 
-   ​* ​        ​information or <​code>​null</​code> ​object if the rule is not passed.+   ​* ​        ​information or null object if the rule is not passed.
    * @exception Exception if an error occurs.    * @exception Exception if an error occurs.
    */    */
 
Back to top
dev/jdbc/router.1259598093.txt.gz · Last modified: 2016/06/28 22:38 (external edit)