public class FixedQuerySender extends JdbcQuerySenderBase<QueryExecutionContext>
NOTE: See DB2XMLWriter
for Resultset!
JdbcQuerySenderBase.QueryType
HasStatistics.Action
UNP_END, UNP_START
connection, paramList
Constructor and Description |
---|
FixedQuerySender() |
Modifier and Type | Method and Description |
---|---|
protected boolean |
canProvideOutputStream() |
void |
closeBlock(QueryExecutionContext blockHandle,
PipeLineSession session)
close the resource that is opened by
IBlockEnabledSender.openBlock(PipeLineSession) . |
protected void |
closeStatementSet(QueryExecutionContext statementSet,
PipeLineSession session) |
void |
configure()
configure() is called once at startup of the framework in the configure method of the owner of this sender. |
protected String |
getQuery(Message message)
Obtain a query to be executed.
|
QueryExecutionContext |
openBlock(PipeLineSession session)
open a resource that can be used multiple times when
IBlockEnabledSender.sendMessage(Object, Message, PipeLineSession) is called. |
protected QueryExecutionContext |
prepareStatementSet(QueryExecutionContext blockHandle,
Connection connection,
Message message,
PipeLineSession session) |
PipeRunResult |
sendMessage(Message message,
PipeLineSession session,
IForwardTarget next) |
SenderResult |
sendMessage(QueryExecutionContext blockHandle,
Message message,
PipeLineSession session) |
protected PipeRunResult |
sendMessageOnConnection(Connection connection,
Message message,
PipeLineSession session,
IForwardTarget next) |
void |
setBatchSize(int batchSize)
When set larger than 0 and used as a child of an IteratingPipe, then the database calls are made in batches of this size.
|
void |
setQuery(String query)
The SQL query text to be excecuted each time sendMessage() is called
|
adjustQueryAndParameterListForNamedParameters, closeConnectionForSendMessage, convertQuery, executeOtherQuery, executeOtherQuery, executePackageQuery, executeSelectQuery, executeSelectQuery, executeStatementSet, executeUpdateBlobQuery, executeUpdateClobQuery, fillParamArray, getBatchSize, getCallWithRowIdReturned, getConnectionForSendMessage, getQueryExecutionContext, getQueryTypeEnum, getResult, getResult, getResult, getReturnedColumns, getStatement, open, prepareQuery, provideOutputStream, setAvoidLocking, setBlobBase64Direction, setBlobCharset, setBlobColumn, setBlobsCompressed, setBlobSessionKey, setBlobSmartGet, setClobColumn, setClobSessionKey, setCloseInputstreamOnExit, setCloseOutputstreamOnExit, setColumnsReturned, setIncludeFieldDefinition, setLockRows, setLockWait, setMaxRows, setNullValue, setOutputFormat, setPackageContent, setPrettyPrint, setQueryType, setResultQuery, setRowIdSessionKey, setScalar, setScalarExtended, setSqlDialect, setStartRow, setStreamCharset, setStreamResultToServlet, setSynchronous, setTrimSpaces, setUseNamedParams, supportsOutputStreamPassThrough
addParameter, close, getParameterList, getTimeout, sendMessage, setTimeout, toString
getAuthAlias, getConnection, getConnectionWithTimeout, getDatasource, getDatasourceInfo, getDatasourceName, getDbmsSupport, getLogPrefix, getPassword, getPhysicalDestinationName, getUsername, isConnectionsArePooled, isTransacted, iterateOverStatistics, setAuthAlias, setConnectionsArePooled, setDatasourceName, setDbmsSupportFactory, setJmsRealm, setPassword, setTransacted, setUsername
getContext, getJndiEnv, setAuthentication, setCredentials, setInitialContextFactoryName, setJndiAuthAlias, setJndiContextPrefix, setJndiProperties, setName, setPrincipal, setProviderURL, setSecurityProtocol, setUrlPkgPrefixes
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
consumesSessionVariable
isSynchronous, sendMessageOrThrow
getName, setName
getApplicationContext, getName
getConfigurationClassLoader
setApplicationContext
getDomain
public void configure() throws ConfigurationException
ISender
configure()
is called once at startup of the framework in the configure method of the owner of this sender.
Purpose of this method is to check whether the static configuration of the sender is correct.
As much as possible class-instantiating should take place in the configure()
or open()
method, to improve performance.configure
in interface IConfigurable
configure
in interface ISender
configure
in class JdbcQuerySenderBase<QueryExecutionContext>
ConfigurationException
protected String getQuery(Message message)
JdbcQuerySenderBase
getQuery
in class JdbcQuerySenderBase<QueryExecutionContext>
protected boolean canProvideOutputStream()
canProvideOutputStream
in class JdbcQuerySenderBase<QueryExecutionContext>
public QueryExecutionContext openBlock(PipeLineSession session) throws SenderException, TimeoutException
IBlockEnabledSender
IBlockEnabledSender.sendMessage(Object, Message, PipeLineSession)
is called.SenderException
TimeoutException
public void closeBlock(QueryExecutionContext blockHandle, PipeLineSession session) throws SenderException
IBlockEnabledSender
IBlockEnabledSender.openBlock(PipeLineSession)
. It is important that this method is always called
after processing with the blockHandle ends. It should effectively be called in a finally clause of a try around the openBlock.SenderException
protected QueryExecutionContext prepareStatementSet(QueryExecutionContext blockHandle, Connection connection, Message message, PipeLineSession session) throws SenderException
prepareStatementSet
in class JdbcQuerySenderBase<QueryExecutionContext>
SenderException
protected void closeStatementSet(QueryExecutionContext statementSet, PipeLineSession session)
closeStatementSet
in class JdbcQuerySenderBase<QueryExecutionContext>
public SenderResult sendMessage(QueryExecutionContext blockHandle, Message message, PipeLineSession session) throws SenderException, TimeoutException
SenderException
TimeoutException
public PipeRunResult sendMessage(Message message, PipeLineSession session, IForwardTarget next) throws SenderException, TimeoutException
SenderException
TimeoutException
protected final PipeRunResult sendMessageOnConnection(Connection connection, Message message, PipeLineSession session, IForwardTarget next) throws SenderException, TimeoutException
sendMessageOnConnection
in class JdbcQuerySenderBase<QueryExecutionContext>
SenderException
TimeoutException
public void setQuery(String query)
public void setBatchSize(int batchSize)
Copyright © 2023 Frank!Framework. All rights reserved.