tyrex.resource
Interface Resource


public interface Resource

Represents an installed resource.

An installed resource has a client factory that is made available to the application, typically through JNDI, allowing it to create new connections. The client factory type depends on the type of resource in use.

An installed resource has a connection pool that manages utilization of the resource. The connection pool metrics can be obtained from getPoolMetrics().

Version:
$Revision: 1.7 $
Author:
Assaf Arkin

Method Summary
 void destroy()
          Called to destory the resource once it is no longer in use.
 java.lang.Object getClientFactory()
          Returns the client connection factory.
 java.lang.Class getClientFactoryClass()
          Returns the client connection factory class.
 PoolLimits getPoolLimits()
          Returns the limits placed on the connection pool.
 PoolMetrics getPoolMetrics()
          Returns the pool metrics.
 javax.transaction.xa.XAResource getXAResource()
          Returns the XA resource interface.
 

Method Detail

getPoolMetrics

public PoolMetrics getPoolMetrics()
Returns the pool metrics. The pool metrics object can be used to collect statistical information about the connection pool.

Returns:
The pool metrics

getClientFactory

public java.lang.Object getClientFactory()
Returns the client connection factory. The client connection factory is enlisted in the JNDI environment naming context for access by the application.

Returns:
The client connection factory

getClientFactoryClass

public java.lang.Class getClientFactoryClass()
Returns the client connection factory class. This the class or interface that a client connection factory would implement.

Returns:
The client connection factory class

getXAResource

public javax.transaction.xa.XAResource getXAResource()
Returns the XA resource interface. The XA resource is used to manage transaction enlistment and recovery of the resource. This method returns null if the resource does not support XA transactions.

Returns:
The XA resource interface

getPoolLimits

public PoolLimits getPoolLimits()
Returns the limits placed on the connection pool. This object can be used to investigate the limits of the connection pool and to change them at run time.

Returns:
The limits placed on the connection pool

destroy

public void destroy()
Called to destory the resource once it is no longer in use. After successful return from this method, all open connections are invalidated and no new connections can be obtained from the pool.

The application server must render the connection factory inaccessible to the application before calling this method.



Original code is Copyright (c) 1999-2001, Intalio, Inc. All Rights Reserved. Contributions by MetaBoss team are Copyright (c) 2003-2005, Softaris Pty. Ltd. All Rights Reserved.