xmlBlaster 2.2.0 client API

org.xmlBlaster.util.queue.jdbc
Class CommonTableDatabaseAccessorDelegate

java.lang.Object
  extended by org.xmlBlaster.util.queue.jdbc.CommonTableDatabaseAccessor
      extended by org.xmlBlaster.util.queue.jdbc.CommonTableDatabaseAccessorDelegate
All Implemented Interfaces:
I_StorageProblemListener, I_StorageProblemNotifier

public class CommonTableDatabaseAccessorDelegate
extends CommonTableDatabaseAccessor


Field Summary
 
Fields inherited from interface org.xmlBlaster.util.queue.I_StorageProblemListener
AVAILABLE, UNAVAILABLE, UNDEF
 
Constructor Summary
CommonTableDatabaseAccessorDelegate(JdbcConnectionPool pool, I_EntryFactory factory, java.lang.String managerName, I_Storage storage)
           
 
Method Summary
 int[] addEntries(java.lang.String queueName, I_Entry[] entries)
          Adds several rows to the specified queue table in batch mode to improve performance
 boolean[] deleteEntries(java.lang.String queueName, long[] uniqueIds)
          2008-02-11 10:37:41.710 SEVERE 97-pool-1-thread-65 RL10 org.xmlBlaster.Main newException: PANIC: Doing immediate shutdown caused by exception: XmlBlasterException errorCode=[resource.db.unknown] serverSideException=true location=[JdbcManagerCommonTable.deleteEntries] message=[#16564M An unknown error with the backend database using JDBC occurred -> http://www.xmlblaster.org/xmlBlaster/doc/requirements/admin.errorcodes.listing.html#resource.db.unknown : com.microsoft.sqlserver.jdbc.SQLServerException: Transaction (Process ID 76) was deadlocked on lock | communication buffer resources with another process and has been chosen as the deadlock victim.
 java.util.ArrayList getEntries(StorageId storageId, int numOfEntries, long numOfBytes, I_EntryFilter entryFilter)
          gets the first numOfEntries of the queue.
 long modifyEntry(java.lang.String queueName, I_Entry entry, I_Entry oldEntry)
          modifies a row in the specified queue table
 
Methods inherited from class org.xmlBlaster.util.queue.jdbc.CommonTableDatabaseAccessor
addEntry, checkIfDBLoss, checkIfDBLoss, cleanUp, createInstance, deleteAllTransient, deleteEntry, deleteFirstEntries, dumpMetaData, getAndDeleteLowest, getEntries, getEntriesByPriority, getEntriesBySamePriority, getEntriesLike, getEntriesWithLimit, getNumOfAll, getNumOfBytes, getNumOfEntries, getNumOfPersistents, getPool, getSizeOfPersistents, getStorageProblemListenerArr, isDB2, isFirebird, isHSQLDatabaseEngine, isLdbc, isMicrosoftSQLServer, isMySql, isOracle, isPostgres, isSQLite, main, pingDatabase, registerQueue, registerStorageProblemListener, removeEntriesWithLimit, setUp, shutdown, storageAvailable, storageUnavailable, tablesCheckAndSetup, unregisterQueue, unRegisterStorageProblemListener, wipeOutDB, wipeOutDB
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CommonTableDatabaseAccessorDelegate

public CommonTableDatabaseAccessorDelegate(JdbcConnectionPool pool,
                                           I_EntryFactory factory,
                                           java.lang.String managerName,
                                           I_Storage storage)
                                    throws XmlBlasterException
Throws:
XmlBlasterException
Method Detail

deleteEntries

public boolean[] deleteEntries(java.lang.String queueName,
                               long[] uniqueIds)
                        throws XmlBlasterException
2008-02-11 10:37:41.710 SEVERE 97-pool-1-thread-65 RL10 org.xmlBlaster.Main newException: PANIC: Doing immediate shutdown caused by exception: XmlBlasterException errorCode=[resource.db.unknown] serverSideException=true location=[JdbcManagerCommonTable.deleteEntries] message=[#16564M An unknown error with the backend database using JDBC occurred -> http://www.xmlblaster.org/xmlBlaster/doc/requirements/admin.errorcodes.listing.html#resource.db.unknown : com.microsoft.sqlserver.jdbc.SQLServerException: Transaction (Process ID 76) was deadlocked on lock | communication buffer resources with another process and has been chosen as the deadlock victim. Rerun the transaction.] [See URL http://www.xmlblaster.org/xmlBlaster/doc/requirements/admin.errorcodes.listing.html#resource.db.unknown] 2008-02-11 10:37:41.882 SEVERE 97-pool-1-thread-65 RL10 org.xmlBlaster.Main newException: errorCode=resource.db.unknown message=#16564M An unknown error with the backend database using JDBC occurred -> http://www.xmlblaster.org/xmlBlaster/doc/requirements/admin.errorcodes.listing.html#resource.db.unknown : com.microsoft.sqlserver.jdbc.SQLServerException: Transaction (Process ID 76) was deadlocked on lock | communication buffer resources with another process and has been chosen as the deadlock victim. Rerun the transaction. at org.xmlBlaster.util.queue.jdbc.JdbcManagerCommonTable.deleteEntriesNoSplit(JdbcManagerCommonTable.java:1673) at org.xmlBlaster.util.queue.jdbc.JdbcManagerCommonTable.deleteEntries(JdbcManagerCommonTable.java:1626) at org.xmlBlaster.util.queue.jdbc.JdbcQueueCommonTablePlugin.removeRandom(JdbcQueueCommonTablePlugin.java:792) at org.xmlBlaster.util.queue.cache.CacheQueueInterceptorPlugin.takeLowest(CacheQueueInterceptorPlugin.java:683) at org.xmlBlaster.engine.TopicHandler.publish(TopicHandler.java:708) at org.xmlBlaster.engine.RequestBroker.publish(RequestBroker.java:1595) at org.xmlBlaster.engine.RequestBroker.publish(RequestBroker.java:1369) at org.xmlBlaster.engine.RequestBroker.publish(RequestBroker.java:1357) at org.xmlBlaster.engine.XmlBlasterImpl.publishArr(XmlBlasterImpl.java:198) at org.xmlBlaster.util.protocol.RequestReplyExecutor.receiveReply(RequestReplyExecutor.java:408) at org.xmlBlaster.protocol.socket.HandleClient.handleMessage(HandleClient.java:230) at org.xmlBlaster.protocol.socket.HandleClient$1.run(HandleClient.java:388) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:665) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:690) at java.lang.Thread.run(Thread.java:595)

Overrides:
deleteEntries in class CommonTableDatabaseAccessor
uniqueIds - the array containing all the uniqueId for the entries to delete.
Throws:
XmlBlasterException

getEntries

public java.util.ArrayList getEntries(StorageId storageId,
                                      int numOfEntries,
                                      long numOfBytes,
                                      I_EntryFilter entryFilter)
                               throws XmlBlasterException
Description copied from class: CommonTableDatabaseAccessor
gets the first numOfEntries of the queue. If there are not so many entries in the queue, all elements in the queue are returned.

Is public for testsuite only.

Overrides:
getEntries in class CommonTableDatabaseAccessor
numOfEntries - Access num entries, if -1 access all entries currently found
numOfBytes - is the maximum size in bytes of the array to return, -1 is unlimited .
Throws:
XmlBlasterException

addEntries

public int[] addEntries(java.lang.String queueName,
                        I_Entry[] entries)
                 throws XmlBlasterException
Description copied from class: CommonTableDatabaseAccessor
Adds several rows to the specified queue table in batch mode to improve performance

Overrides:
addEntries in class CommonTableDatabaseAccessor
Parameters:
queueName - The name of the queue on which to perform the operation
entries - the entries to store
Returns:
array of boolean telling which entries where stored and which not.
Throws:
XmlBlasterException - if an error occured when trying to get a connection

modifyEntry

public long modifyEntry(java.lang.String queueName,
                        I_Entry entry,
                        I_Entry oldEntry)
                 throws XmlBlasterException
Description copied from class: CommonTableDatabaseAccessor
modifies a row in the specified queue table

Overrides:
modifyEntry in class CommonTableDatabaseAccessor
Parameters:
queueName - The name of the queue on which to perform the operation
entry - the object to be stored.
oldEntry - the old one
Returns:
true on success
Throws:
XmlBlasterException - if an error occurred when trying to get a connection or an SQLException occurred.

xmlBlaster 2.2.0 client API

Copyright © 1999-2014 The xmlBlaster.org contributers.