|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
javax.resource.spi Interface ConnectionManager
- All Superinterfaces:
- Serializable
public interface ConnectionManager
- extends Serializable
ConnectionManager 接口为资源适配器提供挂钩,用于将连接请求传递给应用服务器。
应用服务器提供 ConnectionManager 接口的实现。此实现不特定于任何特殊类型的资源适配器或连接工厂接口。
ConnectionManager 实现委托给应用服务器,使之随后能提供服务质量 (QoS) - 安全、连接池管理、事务管理和错误日志记录/跟踪。
应用服务器采用常规方法实现这些服务,与任何资源适配器和特定于 EIS 的机制无关。连接器架构不指定应用服务器实现这些服务的方式;实现是特定于应用服务器的。
应用服务器与其服务挂钩之后,将连接请求委托给 ManagedConnectionFactory 实例,以便创建新的物理连接或者匹配已经存在的物理连接。
ConnectionManager 接口的实现类需要实现 java.io.Serializable
接口。
在非托管应用程序情况下,ConnectionManager 实现类可以由资源适配器(作为默认的 ConnectionManager 实现)提供,也可以由应用程序开发人员提供。在这两种情况下,第三方供应商都可以将 QOS 作为组件提供。
since | 0.6 |
See also | javax.resource.spi.ManagedConnectionFactory |
ConnectionManager interface provides a hook for the resource adapter to pass a connection request to the application server.
An application server provides implementation of the ConnectionManager interface. This implementation is not specific to any particular type of the resource adapter or connection factory interface.
The ConnectionManager implementation delegates to the application server to enable latter to provide quality of services (QoS) - security, connection pool management, transaction management and error logging/tracing.
An application server implements these services in a generic manner, independent of any resource adapter and EIS specific mechanisms. The connector architecture does not specify how an application server implements these services; the implementation is specific to an application server.
After an application server hooks-in its services, the connection request gets delegated to a ManagedConnectionFactory instance either for the creation of a new physical connection or for the matching of an already existing physical connection.
An implementation class for ConnectionManager interface is
required to implement the java.io.Serializable
interface.
In the non-managed application scenario, the ConnectionManager implementation class can be provided either by a resource adapter (as a default ConnectionManager implementation) or by application developers. In both cases, QOS can be provided as components by third party vendors.
- Since:
- 0.6
- Author:
- Rahul Sharma
- See Also:
ManagedConnectionFactory
Method Summary | |
---|---|
Object |
allocateConnection(ManagedConnectionFactory mcf,
ConnectionRequestInfo cxRequestInfo)
The method allocateConnection gets called by the resource adapter's connection factory instance. |
Method Detail |
---|
public Object
allocateConnection(ManagedConnectionFactory mcf, ConnectionRequestInfo cxRequestInfo) throws ResourceException
方法 allocateConnection 由资源适配器的连接工厂实例调用。这允许连接工厂实例(由资源适配器提供)将连接请求传递给 ConnectionManager 实例。
connectionRequestInfo 参数表示特定于用于处理连接请求的资源适配器的信息。
mcf | 应用服务器用来委托连接匹配/创建 |
cxRequestInfo | 连接请求信息 |
return | 连接特定于 EIS 的连接接口的句柄。 |
Throws | ResourceException: 一般异常 |
Throws | ApplicationServerInternalException: 特定于应用服务器的异常 |
Throws | SecurityException: 与安全有关的错误 |
Throws | ResourceAllocationException: 无法为连接请求分配系统资源 |
Throws | ResourceAdapterInternalException: 与资源适配器有关的错误情况 |
allocateConnection
Object allocateConnection(ManagedConnectionFactory mcf, ConnectionRequestInfo cxRequestInfo) throws ResourceException
The method allocateConnection gets called by the resource adapter's connection factory instance. This lets connection factory instance (provided by the resource adapter) pass a connection request to the ConnectionManager instance.
The connectionRequestInfo parameter represents information specific to the resource adapter for handling of the connection request.
- Parameters:
mcf
- used by application server to delegate connection matching/creationcxRequestInfo
- connection request Information- Returns:
- connection handle with an EIS specific connection interface.
- Throws:
ResourceException
- Generic exceptionApplicationServerInternalException
- Application server specific exceptionSecurityException
- Security related errorResourceAllocationException
- Failed to allocate system resources for connection requestResourceAdapterInternalException
- Resource adapter related error condition
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Submit a bug or feature
Copyright 2007 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.
PS : 未经我党受权你也可自由散发此文档。 如有任何错误请自行修正;若因此而造成任何损失请直接找人民主席,请勿与本人联系。谢谢!