org.hibersap.execution.jca
Class JCAConnection

java.lang.Object
  extended by org.hibersap.execution.jca.JCAConnection
All Implemented Interfaces:
Connection

public class JCAConnection
extends Object
implements Connection

Implementation for JCA, i.e. it uses a deployed resource adapter to connect to SAP.

Author:
dahm

Constructor Summary
JCAConnection(javax.resource.cci.ConnectionFactory connectionFactory, String connectionSpecFactoryName)
           
 
Method Summary
 Transaction beginTransaction(SessionImplementor session)
          Begins a logical unit of work.
 void close()
          Closes this connection.
 void execute(String bapiName, Map<String,Object> functionMap)
          Calls a remote function module in the SAP system.
 Transaction getTransaction()
          Returns the current transaction.
 void setCredentials(Credentials credentials)
          Set the credentials for the session.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JCAConnection

public JCAConnection(javax.resource.cci.ConnectionFactory connectionFactory,
                     String connectionSpecFactoryName)
Method Detail

beginTransaction

public Transaction beginTransaction(SessionImplementor session)
Description copied from interface: Connection
Begins a logical unit of work.

Specified by:
beginTransaction in interface Connection
Parameters:
session - The Session this Connection belongs to.
Returns:
The Transaction

close

public void close()
Description copied from interface: Connection
Closes this connection. Implementing classes must do everything that is needed to free resources etc.

Specified by:
close in interface Connection

execute

public void execute(String bapiName,
                    Map<String,Object> functionMap)
Description copied from interface: Connection
Calls a remote function module in the SAP system.

Specified by:
execute in interface Connection
Parameters:
bapiName - The function module name
functionMap - The function module parameters

getTransaction

public Transaction getTransaction()
Description copied from interface: Connection
Returns the current transaction.

Specified by:
getTransaction in interface Connection
Returns:
The Transaction

setCredentials

public void setCredentials(Credentials credentials)
Description copied from interface: Connection
Set the credentials for the session. If custom credentials are provided, this method must be called before the execute() method is called for the first time on the Session this Connection belongs to. The credentials overwrite the configured properties. Only the credential fields that are set (i.e. that are not null) will change the default behavior.

Specified by:
setCredentials in interface Connection
Parameters:
credentials - The Credentials


Copyright © 2011 akquinet tech@spree GmbH. All Rights Reserved.