org.jppf.jca.spi
Class JPPFResourceAdapter

java.lang.Object
  extended by org.jppf.jca.util.JPPFAccessorImpl
      extended by org.jppf.jca.spi.JPPFResourceAdapter
All Implemented Interfaces:
Serializable, ResourceAdapter, JPPFAccessor

public class JPPFResourceAdapter
extends JPPFAccessorImpl
implements ResourceAdapter, Serializable

Implementation of the JPPF Resource Adapter for J2EE. This class initiates a JPPF client with a pool of driver connections.

Author:
Laurent Cohen
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.jppf.jca.util.JPPFAccessorImpl
jppfClient, logWriter
 
Constructor Summary
JPPFResourceAdapter()
           
 
Method Summary
 void endpointActivation(MessageEndpointFactory arg0, ActivationSpec arg1)
          Not supported.
 void endpointDeactivation(MessageEndpointFactory arg0, ActivationSpec arg1)
          This method does nothing.
 Integer getAppServerPort()
          Deprecated. use getClientConfiguration() instead.
 Integer getClassServerPort()
          Deprecated. use getClientConfiguration() instead.
 String getClientConfiguration()
          Get the string holding the client configuration.
 Integer getConnectionPoolSize()
          Deprecated. use getClientConfiguration() instead.
 String getServerHost()
          Deprecated. use getClientConfiguration() instead.
 XAResource[] getXAResources(ActivationSpec[] arg0)
          This method does nothing.
 void setAppServerPort(Integer appServerPort)
          Deprecated. use setClientConfiguration(String) instead.
 void setClassServerPort(Integer classServerPort)
          Deprecated. use setClientConfiguration(String) instead.
 void setClientConfiguration(String clientConfiguration)
          Set the string holding the client configuration.
 void setConnectionPoolSize(Integer connectionPoolSize)
          Deprecated. use setClientConfiguration(String) instead.
 void setServerHost(String serverHost)
          Deprecated. use setClientConfiguration(String) instead.
 void start(BootstrapContext ctx)
          Start this resource adapater with the specified bootstrap context.
 void stop()
          Stop this resource adapter.
 
Methods inherited from class org.jppf.jca.util.JPPFAccessorImpl
getJppfClient, getLogWriter, setJppfClient, setLogWriter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JPPFResourceAdapter

public JPPFResourceAdapter()
Method Detail

start

public void start(BootstrapContext ctx)
           throws ResourceAdapterInternalException
Start this resource adapater with the specified bootstrap context. This method is invoked by the application server exactly once for each resource adapter instance.

Specified by:
start in interface ResourceAdapter
Parameters:
ctx - bootstrap context provided by the application server.
Throws:
ResourceAdapterInternalException - if an error occurred while starting this resource adapter.
See Also:
ResourceAdapter.start(javax.resource.spi.BootstrapContext)

stop

public void stop()
Stop this resource adapter.

Specified by:
stop in interface ResourceAdapter
See Also:
ResourceAdapter.stop()

endpointActivation

public void endpointActivation(MessageEndpointFactory arg0,
                               ActivationSpec arg1)
                        throws ResourceException
Not supported.

Specified by:
endpointActivation in interface ResourceAdapter
Parameters:
arg0 - not used.
arg1 - not used.
Throws:
ResourceException - always.
See Also:
ResourceAdapter.endpointActivation(javax.resource.spi.endpoint.MessageEndpointFactory, javax.resource.spi.ActivationSpec)

endpointDeactivation

public void endpointDeactivation(MessageEndpointFactory arg0,
                                 ActivationSpec arg1)
This method does nothing.

Specified by:
endpointDeactivation in interface ResourceAdapter
Parameters:
arg0 - not used.
arg1 - not used.
See Also:
ResourceAdapter.endpointDeactivation(javax.resource.spi.endpoint.MessageEndpointFactory, javax.resource.spi.ActivationSpec)

getXAResources

public XAResource[] getXAResources(ActivationSpec[] arg0)
                            throws ResourceException
This method does nothing.

Specified by:
getXAResources in interface ResourceAdapter
Parameters:
arg0 - not used.
Returns:
null
Throws:
ResourceException - .
See Also:
ResourceAdapter.getXAResources(javax.resource.spi.ActivationSpec[])

getServerHost

public String getServerHost()
Deprecated. use getClientConfiguration() instead.

Get the host name or IP address for the JPPF driver.

Returns:
the host as a string.

setServerHost

public void setServerHost(String serverHost)
Deprecated. use setClientConfiguration(String) instead.

Set the host name or IP address for the JPPF driver.

Parameters:
serverHost - the host as a string.

getClassServerPort

public Integer getClassServerPort()
Deprecated. use getClientConfiguration() instead.

Get the port for the class server in the driver.

Returns:
the port number as an int.

setClassServerPort

public void setClassServerPort(Integer classServerPort)
Deprecated. use setClientConfiguration(String) instead.

Set the port for the class server in the driver.

Parameters:
classServerPort - the port number as an int.

getAppServerPort

public Integer getAppServerPort()
Deprecated. use getClientConfiguration() instead.

Get the port for the client application server in the driver.

Returns:
the port number as an int.

setAppServerPort

public void setAppServerPort(Integer appServerPort)
Deprecated. use setClientConfiguration(String) instead.

Get the port for the client application server in the driver.

Parameters:
appServerPort - the port number as an int.

getConnectionPoolSize

public Integer getConnectionPoolSize()
Deprecated. use getClientConfiguration() instead.

Get the number of JPPF driver connections.

Returns:
the number of connections as an int.

setConnectionPoolSize

public void setConnectionPoolSize(Integer connectionPoolSize)
Deprecated. use setClientConfiguration(String) instead.

Set the number of JPPF driver connections.

Parameters:
connectionPoolSize - the number of connections as an int.

getClientConfiguration

public String getClientConfiguration()
Get the string holding the client configuration.

Returns:
the configuration as a stirng.

setClientConfiguration

public void setClientConfiguration(String clientConfiguration)
Set the string holding the client configuration.

Parameters:
clientConfiguration - the configuration as a stirng.


Copyright © 2005-2010 JPPF Team.