SAP J2EE Engine

Version 6.40


com.sapportals.connector.connection
Interface IConnectionFactory

All Superinterfaces:
javax.resource.cci.ConnectionFactory, javax.naming.Referenceable, javax.resource.Referenceable, java.io.Serializable

public interface IConnectionFactory
extends javax.resource.cci.ConnectionFactory

IConnectionFactory provides an interface for getting connection to an EIS instance. An implementation of IConnectionFactory interface is provided by a resource adapter. Application code looks up a IConnectionFactory instance from JNDI namespace and uses it to get EIS connections. SAP Connector Framwork IConnectionFactory extends JCA 1.0 to enable clients to get its Connection object and extended metadata.

Version:
1.0

Method Summary
 IConnection getConnectionEx(IConnectionSpec connectionSpec)
          Gets a connection to an EIS instance.
 IConnectionSpec getConnectionSpec()
          The interface IConnectionSpec is used by an application component to pass connection request-specific properties to the IConnectionFactory.getConnectionEx method.
 int getConnectionTimeOut()
          Returns the maximum time to wait for a connection.
 IConnectorMetaData getMetaDataEx()
          Gets metadata for the Resource Adapter.
 void setConnectionTimeOut(int msTimeOut)
          Sets the maximum time to wait for a connection.
 
Methods inherited from interface javax.resource.cci.ConnectionFactory
getConnection, getConnection, getMetaData, getRecordFactory
 
Methods inherited from interface javax.resource.Referenceable
setReference
 
Methods inherited from interface javax.naming.Referenceable
getReference
 

Method Detail

getMetaDataEx

public IConnectorMetaData getMetaDataEx()
                                 throws ConnectorException
Gets metadata for the Resource Adapter. Note that the metadata information is about the ResourceAdapter and not the EIS instance. An invocation of this method does not require that an active connection to an EIS instance should have been established.
Returns:
IConnectorMetaData interface of the connector.
Throws:
ConnectorException -  
See Also:
IConnectorMetaData

setConnectionTimeOut

public void setConnectionTimeOut(int msTimeOut)
Sets the maximum time to wait for a connection.
Parameters:
msTimeOut - The time to wait in milliseconds.

getConnectionTimeOut

public int getConnectionTimeOut()
Returns the maximum time to wait for a connection.
Returns:
The time to wait in milliseconds.

getConnectionSpec

public IConnectionSpec getConnectionSpec()
                                  throws ConnectorException
The interface IConnectionSpec is used by an application component to pass connection request-specific properties to the IConnectionFactory.getConnectionEx method.
Returns:
IConnectionSpec
See Also:
IConnectionSpec

getConnectionEx

public IConnection getConnectionEx(IConnectionSpec connectionSpec)
                            throws ConnectionFailedException,
                                   ConnectorException
Gets a connection to an EIS instance. In the component- managed sign-on case, an application component passes security information (example: username, password) through the ConnectionSpec instance. It is important to note that the properties passed through the getConnection method should be client-specific (example: username, password, language) and not related to the configuration of a target EIS instance (example: port number, server name).
Parameters:
IConnectionSpec - Connection parameters and security information specified as ConnectionSpec instance.
Returns:
IConnection
Throws:
ConnectionFailedException - Failed to get a connection to the EIS instance. Examples of error cases are: Invalid specification of input parameters Invalid configuration of ManagedConnectionFactory-- example: invalid server name Application server-internal error--example: connection pool related error Communication error EIS-specific error--example: EIS not active Resource adapter-internal error Security related error; example: invalid user Failure to allocate system resources
See Also:
IConnectionSpec, IConnection

SAP J2EE Engine

Version 6.40


Copyright © 2001-2005 SAP AG. All Rights Reserved.