REQUIREMENT contrib.dbwriter |
Type | NEW |
Priority | HIGH |
Status | CLOSED |
Topic | DbWriter writes to a Database entries received as XmlBlaster Messages. It is the ideal sink for its counterpart DbWatcher. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Des cription |
DbWriter overviewDbWriter is a little framework of plugins which writes to a Database messages which have been published either by the DbWatcher or following its message content xml-syntax. DbWriter is extendable through a set of plugin interfaces. For standard cases we provide useful plugins. DbWriter may be useful when running xmlBlaster to integrate legacy applications where data needs to be writter to a database. Typical uses are for example database partial- or complete replication with- or without modification/manipulation. The Message Content is an XML Representation of the JDBC ResultSet of a query. Its syntax if fully compatible with the syntax generated by the DbWatcher. In fact this interchange format is the contract between these two plugin frameworks. This contract is defined in the DbWatchwer/DbWriter Contract XSD Schema Now that you know what DbWriter can do for you we should look into its design. DbWriter designDbWriter makes use of a set of interfaces. Some of them are shared with the DbWatcher (as for example I_ChangePublisher, I_DbPool and I_Info), while others as the I_Parser and I_Writer are exclusive for the DbWriter. Additionally, to make it easier for the user, there is a set of info objects encapsulating the XML Message content as a set of java classes. These classes are defined in the info package.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Configure |
The plugin is configured in the xmlBlasterPlugins.xml configuration file. If you run DbWatcher outside of xmlBlaster the I_Info interface must return those settings.
If you use the default configuration for mom.class, then the following configuration attributes may/shall be used:
NOTE: Configuration parameters are specified on command line (-someValue 17) or in the
xmlBlaster.properties file (someValue=17). See requirement "util.property" for details. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Todo |
Port testsuite to run with HSQLDB and MS-SQLServer, currently the SQL statements from the testsuite are Oracle specific, currently you need a running Oracle, a running xmlBlaster and start the tests separately: java -Ddb.password=secret junit.swingui.TestRunner -noloading org.xmlBlaster.test.contrib.dbwatcher.TestResultSetToXmlConverter java -Ddb.password=secret junit.swingui.TestRunner -noloading org.xmlBlaster.test.contrib.dbwatcher.TestTimestamp Add other I_ChangeDetector plugins which scale better for tables with huge amount of entries. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
See API | org.xmlBlaster.contrib.dbwriter.DbWriter | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
See API | org.xmlBlaster.contrib.dbwriter.I_Parser | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
See API | org.xmlBlaster.contrib.dbwriter.I_Writer | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
See API | org.xmlBlaster.contrib.dbwriter.info.SqlInfo | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
See API | org.xmlBlaster.contrib.dbwatcher.DbWatcher | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
See REQ | engine.runlevel | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
See REQ | contrib.dbwatcher | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
See TEST | org.xmlBlaster.test.contrib.dbwriter.TestRecordParsing |
This page is generated from the requirement XML file xmlBlaster/doc/requirements/contrib.dbwriter.xml