BootstrapContext (Java EE 5)

Java EE API


javax.resource.spi Interface BootstrapContext


public interface BootstrapContext


此类提供一种机制,可以在引导资源适配器实例时将引导上下文传递给该资源适配器实例。引导资源适配器实例也就是对 ResourceAdapter 类调用 (start(BootstrapContext)) 方法。引导上下文包含对资源适配器实例可以使用的有用工具的引用。
英文文档:

This provides a mechanism to pass a bootstrap context to a resource adapter instance when it is bootstrapped. That is, when (start(BootstrapContext)) method on the ResourceAdapter class is invoked. The bootstrap context contains references to useful facilities that could be used by the resource adapter instance.

Version:
1.0
Author:
Ram Jeyaraman

Method Summary
 Timer
 WorkManager
 XATerminator
 

Method Detail

public WorkManager getWorkManager()
提供 WorkManager 实例的一个句柄。资源适配器可以使用 WorkManager 实例完成它的工作(通过提交 Work 实例以便执行)。
return 一个 WorkManager 实例。
英文文档:

getWorkManager

WorkManager getWorkManager()
Provides a handle to a WorkManager instance. The WorkManager instance could be used by a resource adapter to do its work by submitting Work instances for execution.

Returns:
a WorkManager instance.

public XATerminator getXATerminator()
提供 XATerminator 实例的一个句柄。资源适配器可以使用 XATerminator 实例传入 EIS 的事务完成和崩溃恢复调用。
return 一个 XATerminator 实例。
英文文档:

getXATerminator

XATerminator getXATerminator()
Provides a handle to a XATerminator instance. The XATerminator instance could be used by a resource adapter to flow-in transaction completion and crash recovery calls from an EIS.

Returns:
a XATerminator instance.

public java.util.Timer createTimer() throws UnavailableException
创建一个新的 java.util.Timer 实例。Timer 实例可以用来执行定期的 Work 执行或其他任务。
ThrowsUnavailableException: 指示 Timer 实例不可用。可以随后重试该请求。
return 新的 Timer 实例。
英文文档:

createTimer

Timer createTimer()
                  throws UnavailableException
Creates a new java.util.Timer instance. The Timer instance could be used to perform periodic Work executions or other tasks.

Returns:
a new Timer instance.
Throws:
UnavailableException - indicates that a Timer instance is not available. The request may be retried later.


Submit a bug or feature

Copyright 2007 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.

一看就知道只有菜鸟才干这么无知的事啦。

PS : 未经我党受权你也可自由散发此文档。 如有任何错误请自行修正;若因此而造成任何损失请直接找人民主席,请勿与本人联系。谢谢!