Class DynamicRfcConnection
- java.lang.Object
-
- com.adaptris.core.AdaptrisConnectionImp
-
- com.adaptris.core.sap.jco3.JcoConnectionBase
-
- com.adaptris.core.sap.jco3.rfc.dynamic.DynamicRfcConnection
-
- All Implemented Interfaces:
AdaptrisComponent
,AdaptrisConnection
,ComponentLifecycle
,ComponentLifecycleExtension
,com.adaptris.core.licensing.LicensedComponent
,RfcConnection
,StateManagedComponent
@ComponentProfile(summary="Connection type for supporting dynamic SAP JCO3 RFC connections", tag="connections,sap,jco") public class DynamicRfcConnection extends JcoConnectionBase implements RfcConnection
Class for managing RFC JCO connections.This class indirectly provides a
com.sap.conn.jco.ext.DestinationDataProvider
for the underlying RFC Connection by interrogating the associatedAdaptrisMessage
for metadata that can be used for configuring a connection. This implicitly removes the previous connection associated withgetConnectionId()
from the underlyingcom.sap.conn.jco.ext.DestinationDataProvider
before attempting to construct a new one.Metadata keys are taken as-is; no verification is done. The following metadata keys are used if they exist in metadata; the table keys and descriptions are copied directly from the SAP Java Connection API documentation (from com.sap.conn.jco.ext.DestinationDataProvider).
Note that this implementation may only be used as part of an
RfcServiceList
. Use as part of a channel will lead to undefined behaviour.Key value Description jco.client.client SAP client jco.client.user Logon user jco.client.alias_user Logon user alias jco.client.passwd Logon password jco.client.lang Logon language jco.client.saprouter SAP router string to use for a system protected by a firewall jco.client.sysnr SAP system number jco.client.ashost SAP application server jco.client.mshost SAP message server jco.client.msserv optional: SAP message server port to use instead of the default sapms<sysid> jco.client.gwhost Gateway host jco.client.gwserv Gateway service jco.client.r3name System ID of the SAP system jco.client.group Group of SAP application servers jco.client.tpname Program ID of external server program jco.client.tphost Host of external server program jco.client.type Type of remote host 2 = R/2, 3 = R/3, E = External jco.client.trace Enable/disable RFC trace (0 or 1) jco.client.cpic_trace Enable/disable CPIC trace (-1 [take over environment value], 0 no trace, 1,2,3 different amount of trace) jco.client.use_sapgui Start a SAP GUI and associate with the connection. (0 - do not start [default], 1 start GUI, 2 start GUI and hide if not used) jco.client.codepage Initial codepage in SAP notation jco.client.getsso2 Get/Don't get a SSO ticket after logon (1 or 0) jco.client.mysapsso2 Use the specified SAP Cookie Version 2 as logon ticket jco.client.x509cert Use the specified X509 certificate as logon ticket jco.client.lcheck Enable/Disable logon check at open time, 1 (enable) or 0 (disable) jco.client.snc_mode Secure network connection (SNC) mode, 0 (off) or 1 (on) jco.client.snc_partnername SNC partner, e.g. p:CN=R3, O=XYZ-INC, C=EN jco.client.snc_qop SNC level of security, 1 to 9 jco.client.snc_myname SNC name. Overrides default SNC partner jco.client.snc_lib Path to library which provides SNC service jco.client.dsr Enable/Disable dsr support (0 or 1) jco.destination.peak_limit Maximum number of active connections that can be created for a destination simultaneously jco.destination.pool_capacity Maximum number of idle connections kept open by the destination. A value of 0 has the effect that there is no connection pooling. jco.destination.expiration_time Time in ms after that the connections hold by the internal pool can be closed jco.destination.expiration_check_period Interval in ms with which the timeout checker thread checks the connections in the pool for expiration jco.destination.max_get_client_time Max time in ms to wait for a connection, if the max allowed number of connections is allocated by the application jco.destination.repository_destination Specifies which destination should be used as repository, i.e. use this destination's repository jco.destination.repository.user Optional: If repository destination is not set, and this property is set, it will be used as user for repository calls. This allows using a different user for repository lookups jco.destination.repository.passwd The password for a repository user. Mandatory, if a repository user should be used. jco.destination.repository.snc_mode Optional: If SNC is used for this destination, it is possible to turn it off for repository connections, if this property is set to 0. Defaults to the value of jco.client.snc_mode In the adapter configuration file this class is aliased as sapjco3-dynamic-rfc-connection which is the preferred alternative to the fully qualified classname when building your configuration.
License Required: ENTERPRISE
-
-
Field Summary
-
Fields inherited from class com.adaptris.core.sap.jco3.JcoConnectionBase
guid
-
Fields inherited from class com.adaptris.core.AdaptrisConnectionImp
log
-
-
Constructor Summary
Constructors Constructor Description DynamicRfcConnection()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
closeConnection()
void
doHouseKeeping()
Do any trace file housekeeping.java.lang.String
getConnectionId()
Get the connection ID to be associated with this connection.protected void
initConnection()
void
register(AdaptrisMessage msg)
Register the connection.protected void
startConnection()
protected void
stopConnection()
-
Methods inherited from class com.adaptris.core.sap.jco3.JcoConnectionBase
getTraceFileHandler, isEnabled, prepareConnection, safeName, setTraceFileHandler
-
Methods inherited from class com.adaptris.core.AdaptrisConnectionImp
addExceptionListener, addMessageConsumer, addMessageProducer, changeState, cloneForTesting, close, connectionErrorHandler, getConnectionErrorHandler, getUniqueId, getWorkersFirstOnShutdown, init, prepare, requestClose, requestInit, requestStart, requestStop, retrieveComponentState, retrieveConnection, retrieveExceptionListeners, retrieveMessageConsumers, retrieveMessageProducers, setConnectionErrorHandler, setUniqueId, setWorkersFirstOnShutdown, start, stop, workersFirstOnShutdown
-
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.AdaptrisConnection
addExceptionListener, addMessageConsumer, addMessageProducer, cloneForTesting, connectionErrorHandler, getConnectionErrorHandler, retrieveConnection, retrieveExceptionListeners, retrieveMessageConsumers, retrieveMessageProducers, setConnectionErrorHandler
-
Methods inherited from interface com.adaptris.core.ComponentLifecycle
close, init, start, stop
-
Methods inherited from interface com.adaptris.core.ComponentLifecycleExtension
prepare
-
Methods inherited from interface com.adaptris.core.StateManagedComponent
changeState, requestClose, requestInit, requestStart, requestStop, retrieveComponentState
-
-
-
-
Method Detail
-
doHouseKeeping
public void doHouseKeeping()
Description copied from class:JcoConnectionBase
Do any trace file housekeeping.- Specified by:
doHouseKeeping
in interfaceRfcConnection
- Specified by:
doHouseKeeping
in classJcoConnectionBase
- See Also:
JcoConnectionBase.doHouseKeeping()
-
closeConnection
protected void closeConnection()
- Specified by:
closeConnection
in classAdaptrisConnectionImp
-
initConnection
protected void initConnection() throws CoreException
- Specified by:
initConnection
in classAdaptrisConnectionImp
- Throws:
CoreException
-
startConnection
protected void startConnection() throws CoreException
- Specified by:
startConnection
in classAdaptrisConnectionImp
- Throws:
CoreException
-
stopConnection
protected void stopConnection()
- Specified by:
stopConnection
in classAdaptrisConnectionImp
-
getConnectionId
public java.lang.String getConnectionId()
Description copied from interface:RfcConnection
Get the connection ID to be associated with this connection.- Specified by:
getConnectionId
in interfaceRfcConnection
-
register
public void register(AdaptrisMessage msg) throws JcoException
Description copied from interface:RfcConnection
Register the connection.- Specified by:
register
in interfaceRfcConnection
- Parameters:
msg
- optionalAdaptrisMessage
that might contain connection information.- Throws:
JcoException
-
-