com.microfocus.cobol.connector.spi
Class CobolLocalTxManagedConnectionFactory

java.lang.Object
  extended bycom.microfocus.cobol.connector.spi.CobolLocalTxManagedConnectionFactory
All Implemented Interfaces:
ManagedConnectionFactory, Serializable

public class CobolLocalTxManagedConnectionFactory
extends Object
implements ManagedConnectionFactory, Serializable

This ManagedConnectionFactory implementation class implements the LocalTransaction support. This is used by the App Server to create and match managed connections.

See Also:
Serialized Form

Constructor Summary
CobolLocalTxManagedConnectionFactory()
          Create a Local TX Managed Connection Factory instance
 
Method Summary
 Object createConnectionFactory()
          Create a ConnectionFactory with a Connection Manager instance.
 Object createConnectionFactory(ConnectionManager cxManager)
          Create a ConnectionFactory with a Connection Manager instance.
 ManagedConnection createManagedConnection(Subject subject, ConnectionRequestInfo info)
          Create a managed connection to Cobol Server.
 boolean equals(Object obj)
           
 String getLogHost()
          Get the log host
 String getLogPort()
          Get the log port
 PrintWriter getLogWriter()
          get Log Writer
 String getServerHost()
          Get the server host
 String getServerPort()
          Get the server port
 Boolean getTrace()
          Check if tracing is enabled.
 int hashCode()
           
 ManagedConnection matchManagedConnections(Set connectionSet, Subject subject, ConnectionRequestInfo info)
          Match Managed Connections.
 void setLogHost(String logHost)
          set the log Host
 void setLogPort(String logPort)
          Set the log port
 void setLogWriter(PrintWriter out)
          Set Log Writer
 void setServerHost(String serverHost)
          Set the server host
 void setServerPort(String serverPort)
          Set the server port
 void setTrace(Boolean trace)
          set tracing
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CobolLocalTxManagedConnectionFactory

public CobolLocalTxManagedConnectionFactory()
Create a Local TX Managed Connection Factory instance

Method Detail

createConnectionFactory

public Object createConnectionFactory(ConnectionManager cxManager)
                               throws ResourceException
Create a ConnectionFactory with a Connection Manager instance.

Specified by:
createConnectionFactory in interface ManagedConnectionFactory
Parameters:
cxManager - The connection Manager Instance. In a managed connection case, the app server supplies the connection manager.
Returns:
An instance of ConnectionFactory.
Throws:
ResourceException

createConnectionFactory

public Object createConnectionFactory()
                               throws ResourceException
Create a ConnectionFactory with a Connection Manager instance.

Specified by:
createConnectionFactory in interface ManagedConnectionFactory
Returns:
An instance of ConnectionFactory.
Throws:
ResourceException

createManagedConnection

public ManagedConnection createManagedConnection(Subject subject,
                                                 ConnectionRequestInfo info)
                                          throws ResourceException
Create a managed connection to Cobol Server.

Specified by:
createManagedConnection in interface ManagedConnectionFactory
Parameters:
subject - The subject instance
info - Connection Request info
Returns:
A Managed Connection instance if successful, null otherwise
Throws:
ResourceException

matchManagedConnections

public ManagedConnection matchManagedConnections(Set connectionSet,
                                                 Subject subject,
                                                 ConnectionRequestInfo info)
                                          throws ResourceException
Match Managed Connections. The App Server calls this function to match a connection from the set of connections. The match is based on security credentials.

Specified by:
matchManagedConnections in interface ManagedConnectionFactory
Parameters:
connectionSet - The connection pool of Managed Connections
subject - The subject instance
info - Connection Request info
Returns:
A matched managed connection, null if not successful.
Throws:
ResourceException

setLogWriter

public void setLogWriter(PrintWriter out)
                  throws ResourceException
Set Log Writer

Specified by:
setLogWriter in interface ManagedConnectionFactory
Parameters:
out - PrintWriter instance
Throws:
ResourceException

getLogWriter

public PrintWriter getLogWriter()
                         throws ResourceException
get Log Writer

Specified by:
getLogWriter in interface ManagedConnectionFactory
Returns:
a PrintWriter instance
Throws:
ResourceException

setServerHost

public void setServerHost(String serverHost)
Set the server host

Parameters:
serverHost -

getServerHost

public String getServerHost()
Get the server host

Returns:
The server host

setServerPort

public void setServerPort(String serverPort)
Set the server port

Parameters:
serverPort -

getServerPort

public String getServerPort()
Get the server port

Returns:
The server port

setLogHost

public void setLogHost(String logHost)
set the log Host

Parameters:
logHost -

getLogHost

public String getLogHost()
Get the log host

Returns:
The log host

setLogPort

public void setLogPort(String logPort)
Set the log port

Parameters:
logPort -

getLogPort

public String getLogPort()
Get the log port

Returns:
The log port

setTrace

public void setTrace(Boolean trace)
set tracing

Parameters:
trace -

getTrace

public Boolean getTrace()
Check if tracing is enabled.

Returns:
true if it is, false otherwise

equals

public boolean equals(Object obj)
Specified by:
equals in interface ManagedConnectionFactory

hashCode

public int hashCode()
Specified by:
hashCode in interface ManagedConnectionFactory



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