com.microfocus.cobol.connector.spi
Class CobolResourceAdapter

java.lang.Object
  extended bycom.microfocus.cobol.connector.spi.CobolResourceAdapter
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
CobolLocalTxManagedConnectionFactory, CobolManagedConnectionFactory, CobolNoTxManagedConnectionFactory

public class CobolResourceAdapter
extends Object
implements Serializable

See Also:
Serialized Form

Field Summary
protected  String logHost
           
protected  String logPort
           
protected  String serverHost
           
protected  String serverPort
           
protected  Boolean trace
           
 
Constructor Summary
CobolResourceAdapter()
          Constructor.
 
Method Summary
 void endpointActivation(MessageEndpointFactory endpointFactory, ActivationSpec spec)
          Called by the Application Server when a message-driven bean (MessageEndpoint) is deployed.
 void endpointDeactivation(MessageEndpointFactory endpointFactory, ActivationSpec spec)
          Called by Application Server when the MessageEndpoint (message-driven bean) is undeployed.
 String getLogHost()
          Get the log host
 String getLogPort()
          Get the log port
 String getServerHost()
          Get the server host
 String getServerPort()
          Get the server port
 Boolean getTrace()
          Check if tracing is enabled.
 XAResource[] getXAResources(ActivationSpec[] specs)
          This method is called by the Application Server on the restart of the Application Server when there are potential pending transactions.
 void setLogHost(String logHost)
          set the log Host
 void setLogPort(String logPort)
          Set the log port
 void setServerHost(String serverHost)
          Set the server host
 void setServerPort(String serverPort)
          Set the server port
 void setTrace(Boolean trace)
          set tracing
 void start(BootstrapContext ctx)
          Called by the AppServer to initialize the Resource Adapter.
 void stop()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serverHost

protected String serverHost

serverPort

protected String serverPort

logHost

protected String logHost

logPort

protected String logPort

trace

protected Boolean trace
Constructor Detail

CobolResourceAdapter

public CobolResourceAdapter()
Constructor.

Method Detail

start

public void start(BootstrapContext ctx)
           throws ResourceAdapterInternalException
Called by the AppServer to initialize the Resource Adapter.

Parameters:
ctx - the BootstrapContext
Throws:
ResourceAdapterInternalException

stop

public void stop()

endpointActivation

public void endpointActivation(MessageEndpointFactory endpointFactory,
                               ActivationSpec spec)
                        throws NotSupportedException
Called by the Application Server when a message-driven bean (MessageEndpoint) is deployed. Causes the resource adapter instance to do the necessary setup (setting up message delivery for the message endpoint with a message provider).

Parameters:
endpointFactory - a message endpoint factory instance
spec - an ActivationSpec instance
Throws:
NotSupportedException - if message endpoint activation is rejected because of incorrect activation setup information

endpointDeactivation

public void endpointDeactivation(MessageEndpointFactory endpointFactory,
                                 ActivationSpec spec)
Called by Application Server when the MessageEndpoint (message-driven bean) is undeployed. The instance passed as arguments to this method call should be identical to that passed in for the corresponding endpointActivation call. This causes the resource adapter to stop delivering messages to the message endpoint.

Parameters:
endpointFactory - a message endpoint factory instance
spec - an activation spec instance

getXAResources

public XAResource[] getXAResources(ActivationSpec[] specs)
                                                 throws ResourceException
This method is called by the Application Server on the restart of the Application Server when there are potential pending transactions. For example, it may be called after a server crash. The Application Server requests the XA Resources that correspond to the Activation Specs for the endpoints that it is restarting. It may use those XA Resources to determine transaction status and attempt to commit or rollback. Because this implementation does not support transactions, this method does nothing.

Parameters:
specs - an array of ActivationSpec objects
Returns:
an XAResource
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



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