com.microfocus.cobol.connector.cci
Class CobolConnection

java.lang.Object
  extended bycom.microfocus.cobol.connector.cci.CobolConnection
All Implemented Interfaces:
MFCobolConnection, Serializable
Direct Known Subclasses:
CobolManagedConnection.aCobolCon

public class CobolConnection
extends Object
implements MFCobolConnection, Serializable

CobolConnection class represents an application level connection handle that is used by a component to access a Cobol Server instance.

See Also:
Serialized Form

Constructor Summary
protected CobolConnection(CobolManagedConnection mc)
          Cobol Connection is obtained through a CobolConnection Factory.
 
Method Summary
 void activate()
           
protected  void associateConnection(CobolManagedConnection newMc)
          Associate a connection handle with a physical managed connection
 void close()
          close the CobolConnection handle
 javax.resource.cci.Interaction createInteraction()
          Create an interaction with the Cobol Server.
 void dispose()
          dispose a cobol connection.
 javax.ejb.EJBContext getEJBContext()
          Get the EJBContext
 javax.resource.cci.LocalTransaction getLocalTransaction()
          Get the Local Transaction instance that needs to be used by the bean.
protected  CobolManagedConnection getManagedConnection()
          Get the Managed Connection associated with this connection handle.
 ConnectionMetaData getMetaData()
          Get Connection Meta data.
 ResultSetInfo getResultSetInfo()
          Result Set is not supported
protected  void invalidate()
          Invalidate a Managed Connection
 void passivate()
           
 void resetLocalTransaction()
           
 void resetXAFlow()
           
 void setEJBContext(javax.ejb.EJBContext e)
          Set the EJB context that the CobolConnection can later use to determine if the bean is stateful or stateless.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CobolConnection

protected CobolConnection(CobolManagedConnection mc)
Cobol Connection is obtained through a CobolConnection Factory.

Parameters:
mc - The Managed Connection instance.
Method Detail

setEJBContext

public void setEJBContext(javax.ejb.EJBContext e)
                   throws RemoteException
Set the EJB context that the CobolConnection can later use to determine if the bean is stateful or stateless. The EJB context is set to be transient.

Parameters:
e - the EJBContext to be set
Throws:
RemoteException

getEJBContext

public javax.ejb.EJBContext getEJBContext()
Get the EJBContext

Returns:
the EJBContext. null if no context was set

createInteraction

public javax.resource.cci.Interaction createInteraction()
                                                 throws ResourceException
Create an interaction with the Cobol Server.

Returns:
an instance of CobolInteraction.
Throws:
ResourceException
See Also:
CobolInteraction

getLocalTransaction

public javax.resource.cci.LocalTransaction getLocalTransaction()
                                                        throws ResourceException
Get the Local Transaction instance that needs to be used by the bean.

Returns:
the Local TRansaction instance.
Throws:
ResourceException
See Also:
CobolLocalTransaction

getResultSetInfo

public ResultSetInfo getResultSetInfo()
                               throws ResourceException
Result Set is not supported

Returns:
ResultSetInfo
Throws:
ResourceException

close

public void close()
           throws ResourceException
close the CobolConnection handle

Throws:
ResourceException

getMetaData

public ConnectionMetaData getMetaData()
                               throws ResourceException
Get Connection Meta data.

Returns:
CobolConnectionMetaData instance
Throws:
ResourceException
See Also:
CobolConnectionMetaData

dispose

public void dispose()
             throws ResourceException
dispose a cobol connection. This needs to be called from stateful ejb's ejbRemove only.

Specified by:
dispose in interface MFCobolConnection
Throws:
ResourceException

activate

public void activate()
              throws ResourceException
Specified by:
activate in interface MFCobolConnection
Throws:
ResourceException

passivate

public void passivate()
               throws ResourceException
Specified by:
passivate in interface MFCobolConnection
Throws:
ResourceException

associateConnection

protected void associateConnection(CobolManagedConnection newMc)
                            throws ResourceException
Associate a connection handle with a physical managed connection

Parameters:
newMc - The Managed connection instance.
Throws:
ResourceException

invalidate

protected void invalidate()
Invalidate a Managed Connection


getManagedConnection

protected CobolManagedConnection getManagedConnection()
Get the Managed Connection associated with this connection handle.

Returns:
the managed connection instance.

resetXAFlow

public void resetXAFlow()
Specified by:
resetXAFlow in interface MFCobolConnection

resetLocalTransaction

public void resetLocalTransaction()



Copyright © 2000 Micro Focus International Limited. All rights reserved.
This document and the proprietary marks and names used herein are protected by international law.