xmlBlaster 2.1.0 API

org.xmlBlaster.contrib.dbwriter
Class DbWriterExample

java.lang.Object
  extended by org.xmlBlaster.contrib.dbwriter.DbWriterExample

public class DbWriterExample
extends java.lang.Object

Example code to run DbWriter as a standalone application.

You can edit this file and change the configuration settings.

Simple usage example:

java org.xmlBlaster.contrib.dbwriter.Example -db.password secret

java -Djava.util.logging.config.file=testlog.properties org.xmlBlaster.contrib.dbwriter.Example -db.password secret

java -Djdbc.drivers=com.microsoft.sqlserver.jdbc.SQLServerDriver -Ddb.url=jdbc:sqlserver://localhost:1433/database=xmlBlaster -Ddb.user=xmlblast -Ddb.password=secret org.xmlBlaster.contrib.dbwriter.DbWriterExample -protocol SOCKET -plugin/socket/hostname laghi


Field Summary
private static java.util.logging.Logger log
           
 
Constructor Summary
DbWriterExample()
           
 
Method Summary
static java.util.prefs.Preferences loadArgs(java.lang.String[] args)
          Parse command line arguments
static void main(java.lang.String[] args)
          Example code.
private  void pollingExample(java.util.prefs.Preferences prefs)
          Example for polling the DB
private static void setPref(java.lang.String key, java.lang.String defVal, java.util.prefs.Preferences prefs)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

private static java.util.logging.Logger log
Constructor Detail

DbWriterExample

public DbWriterExample()
Method Detail

pollingExample

private void pollingExample(java.util.prefs.Preferences prefs)
                     throws java.lang.Exception
Example for polling the DB

Parameters:
prefs - Configuration
Throws:
java.lang.Exception - Can be of any type

main

public static void main(java.lang.String[] args)
Example code.

java -Djava.util.logging.config.file=testlog.properties org.xmlBlaster.contrib.dbwatcher.Example -alertScheduler.pollInterval 10000 -db.password secret

Parameters:
args - Command line

setPref

private static void setPref(java.lang.String key,
                            java.lang.String defVal,
                            java.util.prefs.Preferences prefs)

loadArgs

public static java.util.prefs.Preferences loadArgs(java.lang.String[] args)
Parse command line arguments

Parameters:
args - Command line
Returns:
Configuration

xmlBlaster 2.1.0 API

Copyright © 1999-2011 The xmlBlaster.org contributers.