Class JdbcDataCaptureService
- java.lang.Object
-
- com.adaptris.core.ServiceImp
-
- com.adaptris.core.jdbc.JdbcService
-
- com.adaptris.core.services.jdbc.JdbcServiceWithParameters
-
- com.adaptris.core.services.jdbc.JdbcDataCaptureServiceImpl
-
- com.adaptris.core.services.jdbc.JdbcIteratingDataCaptureServiceImpl
-
- com.adaptris.core.services.jdbc.JdbcDataCaptureService
-
- All Implemented Interfaces:
AdaptrisComponent
,ComponentLifecycle
,ComponentLifecycleExtension
,ConnectedService
,MessageEventGenerator
,Service
,StateManagedComponent
@ComponentProfile(summary="Capture data from the message and store it in a database", tag="service,jdbc", recommended=DatabaseConnection.class) public class JdbcDataCaptureService extends JdbcIteratingDataCaptureServiceImpl
Capture Data from a AdaptrisMessage and store it in a JDBC-compliant database.While not deprecated; you are encouraged to use
JdbcBatchingDataCaptureService
instead for performance reasons. Set theJdbcBatchingDataCaptureService.setBatchWindow(Integer)
to1
to have functionally equivalent behaviour to this class.If the
DocumentBuilderFactoryBuilder
has been explicitly set to be not namespace aware and the document does in fact contain namespaces, then Saxon can cause merry havoc in the sense that//NonNamespaceXpath
doesn't work if the document has namespaces in it. We have included a shim so that behaviour can be toggled based on what you have configured.- See Also:
XPath.newXPathInstance(DocumentBuilderFactoryBuilder, NamespaceContext)
In the adapter configuration file this class is aliased as jdbc-data-capture-service which is the preferred alternative to the fully qualified classname when building your configuration.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.adaptris.core.services.jdbc.JdbcDataCaptureServiceImpl
JdbcDataCaptureServiceImpl.DatabaseActor
-
-
Field Summary
-
Fields inherited from class com.adaptris.core.services.jdbc.JdbcDataCaptureServiceImpl
actor
-
Fields inherited from class com.adaptris.core.ServiceImp
log
-
-
Constructor Summary
Constructors Constructor Description JdbcDataCaptureService()
JdbcDataCaptureService(java.lang.String statement)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected long
executeUpdate(java.sql.PreparedStatement insert)
protected long
finishUpdate(java.sql.PreparedStatement insert)
-
Methods inherited from class com.adaptris.core.services.jdbc.JdbcIteratingDataCaptureServiceImpl
doService, getIterates, getIterationXpath, getNamespaceContext, getXmlDocumentFactoryConfig, initJdbcService, setIterates, setIterationXpath, setNamespaceContext, setXmlDocumentFactoryConfig
-
Methods inherited from class com.adaptris.core.services.jdbc.JdbcDataCaptureServiceImpl
closeJdbcService, configureActor, getRowsUpdatedMetadataKey, getSaveReturnedKeys, getStatement, prepareService, saveKeys, saveReturnedKeys, setRowsUpdatedMetadataKey, setSaveReturnedKeys, setStatement, startService, stopService, updateMetadata
-
Methods inherited from class com.adaptris.core.services.jdbc.JdbcServiceWithParameters
addStatementParameter, getParameterApplicator, getStatementParameters, setParameterApplicator, setStatementParameters
-
Methods inherited from class com.adaptris.core.jdbc.JdbcService
applyTimeout, closeService, createStatement, getConnection, getConnection, getStatementTimeout, initService, prepare, prepareStatement, prepareStatement, setConnection, setStatementTimeout, start, stop
-
Methods inherited from class com.adaptris.core.ServiceImp
changeState, close, continueOnFailure, createName, createQualifier, getContinueOnFail, getIsTrackingEndpoint, getUniqueId, init, isBranching, isTrackingEndpoint, requestClose, requestInit, requestStart, requestStop, retrieveComponentState, setContinueOnFail, setIsTrackingEndpoint, setUniqueId
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.adaptris.core.AdaptrisComponent
getUniqueId
-
Methods inherited from interface com.adaptris.core.ComponentLifecycle
close, init
-
Methods inherited from interface com.adaptris.core.MessageEventGenerator
createName, createQualifier, isTrackingEndpoint
-
Methods inherited from interface com.adaptris.core.Service
continueOnFailure, isBranching, setUniqueId
-
Methods inherited from interface com.adaptris.core.StateManagedComponent
changeState, requestClose, requestInit, requestStart, requestStop, retrieveComponentState
-
-
-
-
Method Detail
-
executeUpdate
protected long executeUpdate(java.sql.PreparedStatement insert) throws java.sql.SQLException
- Specified by:
executeUpdate
in classJdbcIteratingDataCaptureServiceImpl
- Throws:
java.sql.SQLException
-
finishUpdate
protected long finishUpdate(java.sql.PreparedStatement insert) throws java.sql.SQLException
- Specified by:
finishUpdate
in classJdbcIteratingDataCaptureServiceImpl
- Throws:
java.sql.SQLException
-
-