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 Resource.

Version: $Revision: 1.7 $

Author: Assaf Arkin

Method Summary
abstract voiddestroy()
Called to destory the resource once it is no longer in use.
abstract ObjectgetClientFactory()
Returns the client connection factory.
abstract ClassgetClientFactoryClass()
Returns the client connection factory class.
abstract PoolLimitsgetPoolLimits()
Returns the limits placed on the connection pool.
abstract PoolMetricsgetPoolMetrics()
Returns the pool metrics.
abstract XAResourcegetXAResource()
Returns the XA resource interface.

Method Detail

destroy

public abstract 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.

getClientFactory

public abstract 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 abstract 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

getPoolLimits

public abstract 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

getPoolMetrics

public abstract 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

getXAResource

public abstract 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

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.