XmlBlaster Logo

REQUIREMENT

queue.jdbc.firebird

XmlBlaster Logo


Type NEW
Priority HIGH
Status CLOSED
Topic XmlBlaster has an advanced queuing facility. Among others one tested persistence layer is offered by communicating with a Firebird database.
Des
cription

The generic plugin for jdbc based queues has been tested against Firebird 1.5.2.4731

To make xmlBlaster run with a persistent queue stored on Firebird it is necessary to first install Firebird. You can download it from the Main Downloads section at The Firebird Homepage. Please follow the instructions given there on how to download, install and initially configure Firebird. Keep in mind that you also need to install the jdbc driver that works with Firebird. You can download it from the Main Downloads section at The Firebird Homepage and put it somewhere in your classpath. To keep it simple you can put the jar file (for example jaybird-full-2.0.0.jar) in the $XMLBLASTER_HOME/lib directory.

Example
Java
Example of a connect() invocation which configures the callback queue settings:
<qos>
   ...
   <queue relating='callback' maxEntries='1000' maxBytes='4000000'
                                 onOverflow='deadMessage'>
</qos>
       
Configure

These parameters allow to configure a cache queue running with Firebird

Property Default Description Hot Impl
QueuePlugin[JDBC][1.0] org.xmlBlaster.util.queue.jdbc.JdbcQueueCommonTablePlugin specifies the JDBC implementing class to be used to store queue entries yes yes
StoragePlugin[JDBC][1.0] org.xmlBlaster.util.queue.jdbc.JdbcQueueCommonTablePlugin specifies the JDBC implementing class to be used to store the message content yes yes
queue/maxEntries 1000 specifies the maximum number of entries allowed in the ram portion of this queue yes yes
queue/maxBytes 2097152 (2MB) specifies the maximum total size for the ram portion allowed in this queue yes yes
queue/persistent/url jdbc:firebirdsql:localhost/3050:c:/Data/dbTest.fdb the url which specifies where to find the DB. Here firebirdsql is the db vendor name, localhost the hostname. Replace "c:/Data/dbTest.fdb" with the fully qualified path to your .fdb file yes yes
queue/persistent/user sysdba The db user under which to run yes yes
queue/persistent/password sysdba The unencrypted password for the user 'sysdba'. In this example, the password is 'sysdba'. yes yes
Additionally the configuration parameters for the ram queue and the jdbc queue must be defined.

How to switch to Firebird

Please edit xmlBlaster.properties following the example below, typically you need to change the url setting to suit your environment.

JdbcDriver.drivers=org.firebirdsql.jdbc.FBDriver:...

JdbcStorage[Firebird]=org.xmlBlaster.util.queue.jdbc.JdbcQueueCommonTablePlugin,\
      url=jdbc:firebirdsql:localhost/3050:c:/Firebird/Data/dbTest.fdb,\
      user=sysdba,\
      password=sysdba,\
      connectionPoolSize=1,\
      connectionBusyTimeout=90000,\
      maxWaitingThreads=300,\
      tableNamePrefix=XB_,\
      entriesTableName=ENTRIES,\
      dbAdmin=true

StoragePlugin[JDBC][1.0]=${JdbcStorage[Firebird]}
QueuePlugin[JDBC][1.0]=${JdbcStorage[Firebird]}

JdbcDriver.mapping[Firebird]=string=VARCHAR(128),"longint=decimal(18,0)",
                             int=integer,boolean=CHAR(1),blob=blob,blobVarName=msg

Since 'blob' is a reserved in Firebird, it cannot be used as a field name. Instead, xmlBlaster will use the value specified in blobVarName - which, in this example, is 'msg'

NOTE: Configuration parameters are specified on command line (-someValue 17) or in the xmlBlaster.properties file (someValue=17). See requirement "util.property" for details.
Columns named Impl tells you if the feature is implemented.
Columns named Hot tells you if the configuration is changeable in hot operation.

See API org.xmlBlaster.util.queue.I_Queue
See API org.xmlBlaster.util.queue.jdbc.CacheQueuePlugin
See API org.xmlBlaster.util.queue.QueuePluginManager
See API org.xmlBlaster.util.queue.I_QueueEntry
See API org.xmlBlaster.util.qos.storage.QueuePropertyBase
See API org.xmlBlaster.util.I_Plugin
See API org.xmlBlaster.util.Global
See REQ queue
See TEST org.xmlBlaster.test.classtest.queue.I_QueueTest
See TEST org.xmlBlaster.test.classtest.queue.JdbcQueueTest
See TEST org.xmlBlaster.test.classtest.queue.CacheQueueTest

This page is generated from the requirement XML file xmlBlaster/doc/requirements/queue.jdbc.firebird.xml

Back to overview