⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 managedconnection.html

📁 j2ee帮助文档软件设计/软件工程 文件格式
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<DD><CODE><A HREF="../../../javax/resource/spi/IllegalStateException.html" title="class in javax.resource.spi">IllegalStateException</A></CODE> - illegal state for destroying connection</DL></DD></DL><HR><A NAME="cleanup()"><!-- --></A><H3>cleanup</H3><PRE>void <B>cleanup</B>()             throws <A HREF="../../../javax/resource/ResourceException.html" title="class in javax.resource">ResourceException</A></PRE><DL><DD>Application server calls this method to force any cleanup on the   ManagedConnection instance.    <p>The method ManagedConnection.cleanup initiates a cleanup of the  any client-specific state as maintained by a ManagedConnection instance.  The cleanup should invalidate all connection handles that had been   created using this ManagedConnection instance. Any attempt by an application   component to use the connection handle after cleanup of the underlying  ManagedConnection should result in an exception.  <p>The cleanup of ManagedConnection is always driven by an application  server. An application server should not invoke ManagedConnection.cleanup  when there is an uncompleted transaction (associated with a   ManagedConnection instance) in progress.   <p>The invocation of ManagedConnection.cleanup method on an already   cleaned-up connection should not throw an exception.  <p>The cleanup of ManagedConnection instance resets its client specific  state and prepares the connection to be put back in to a connection  pool. The cleanup method should not cause resource adapter to close  the physical pipe and reclaim system resources associated with the  physical connection.<P><DD><DL><DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/resource/ResourceException.html" title="class in javax.resource">ResourceException</A></CODE> - generic exception if operation fails<DD><CODE><A HREF="../../../javax/resource/spi/ResourceAdapterInternalException.html" title="class in javax.resource.spi">ResourceAdapterInternalException</A></CODE> - resource adapter internal error condition<DD><CODE><A HREF="../../../javax/resource/spi/IllegalStateException.html" title="class in javax.resource.spi">IllegalStateException</A></CODE> - Illegal state for calling connection                                   cleanup. Example - if a localtransaction                                    is in progress that doesn't allow                                    connection cleanup</DL></DD></DL><HR><A NAME="associateConnection(java.lang.Object)"><!-- --></A><H3>associateConnection</H3><PRE>void <B>associateConnection</B>(<A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>&nbsp;connection)                         throws <A HREF="../../../javax/resource/ResourceException.html" title="class in javax.resource">ResourceException</A></PRE><DL><DD>Used by the container to change the association of an   application-level connection handle with a ManagedConneciton   instance. The container should find the right ManagedConnection   instance and call the associateConnection method.  <p>The resource adapter is required to implement the associateConnection  method. The method implementation for a ManagedConnection should   dissociate the connection handle (passed as a parameter) from its   currently associated ManagedConnection and associate the new   connection handle with itself.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>connection</CODE> - Application-level connection handle<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/resource/ResourceException.html" title="class in javax.resource">ResourceException</A></CODE> - Failed to associate the connection                                 handle with this ManagedConnection                                 instance<DD><CODE><A HREF="../../../javax/resource/spi/IllegalStateException.html" title="class in javax.resource.spi">IllegalStateException</A></CODE> - Illegal state for invoking this                                 method<DD><CODE><A HREF="../../../javax/resource/spi/ResourceAdapterInternalException.html" title="class in javax.resource.spi">ResourceAdapterInternalException</A></CODE> - Resource adapter internal error                                  condition</DL></DD></DL><HR><A NAME="addConnectionEventListener(javax.resource.spi.ConnectionEventListener)"><!-- --></A><H3>addConnectionEventListener</H3><PRE>void <B>addConnectionEventListener</B>(<A HREF="../../../javax/resource/spi/ConnectionEventListener.html" title="interface in javax.resource.spi">ConnectionEventListener</A>&nbsp;listener)</PRE><DL><DD>Adds a connection event listener to the ManagedConnection   instance.  <p>The registered ConnectionEventListener instances are notified of  connection close and error events, also of local transaction related  events on the Managed Connection.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>listener</CODE> - a new ConnectionEventListener to be registered</DL></DD></DL><HR><A NAME="removeConnectionEventListener(javax.resource.spi.ConnectionEventListener)"><!-- --></A><H3>removeConnectionEventListener</H3><PRE>void <B>removeConnectionEventListener</B>(<A HREF="../../../javax/resource/spi/ConnectionEventListener.html" title="interface in javax.resource.spi">ConnectionEventListener</A>&nbsp;listener)</PRE><DL><DD>Removes an already registered connection event listener from the   ManagedConnection instance.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>listener</CODE> - already registered connection event listener to be                      removed</DL></DD></DL><HR><A NAME="getXAResource()"><!-- --></A><H3>getXAResource</H3><PRE><A HREF="../../../javax/transaction/xa/XAResource.html" title="interface in javax.transaction.xa">XAResource</A> <B>getXAResource</B>()                         throws <A HREF="../../../javax/resource/ResourceException.html" title="class in javax.resource">ResourceException</A></PRE><DL><DD>Returns an <code>javax.transaction.xa.XAresource</code> instance.   An application server enlists this XAResource instance with the  Transaction Manager if the ManagedConnection instance is being used  in a JTA transaction that is being coordinated by the Transaction   Manager.<P><DD><DL><DT><B>Returns:</B><DD>XAResource instance<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/resource/ResourceException.html" title="class in javax.resource">ResourceException</A></CODE> - generic exception if operation fails<DD><CODE>NotSupportedException</CODE> - if the operation is not supported<DD><CODE><A HREF="../../../javax/resource/spi/ResourceAdapterInternalException.html" title="class in javax.resource.spi">ResourceAdapterInternalException</A></CODE> - resource adapter internal error condition</DL></DD></DL><HR><A NAME="getLocalTransaction()"><!-- --></A><H3>getLocalTransaction</H3><PRE><A HREF="../../../javax/resource/spi/LocalTransaction.html" title="interface in javax.resource.spi">LocalTransaction</A> <B>getLocalTransaction</B>()                                     throws <A HREF="../../../javax/resource/ResourceException.html" title="class in javax.resource">ResourceException</A></PRE><DL><DD>Returns an <code>javax.resource.spi.LocalTransaction</code> instance.   The LocalTransaction interface is used by the container to manage  local transactions for a RM instance.<P><DD><DL><DT><B>Returns:</B><DD>LocalTransaction instance<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/resource/ResourceException.html" title="class in javax.resource">ResourceException</A></CODE> - generic exception if operation fails<DD><CODE>NotSupportedException</CODE> - if the operation is not supported<DD><CODE><A HREF="../../../javax/resource/spi/ResourceAdapterInternalException.html" title="class in javax.resource.spi">ResourceAdapterInternalException</A></CODE> - resource adapter internal error condition</DL></DD></DL><HR><A NAME="getMetaData()"><!-- --></A><H3>getMetaData</H3><PRE><A HREF="../../../javax/resource/spi/ManagedConnectionMetaData.html" title="interface in javax.resource.spi">ManagedConnectionMetaData</A> <B>getMetaData</B>()                                      throws <A HREF="../../../javax/resource/ResourceException.html" title="class in javax.resource">ResourceException</A></PRE><DL><DD><p>Gets the metadata information for this connection's underlying   EIS resource manager instance. The ManagedConnectionMetaData   interface provides information about the underlying EIS instance   associated with the ManagedConenction instance.<P><DD><DL><DT><B>Returns:</B><DD>ManagedConnectionMetaData instance<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/resource/ResourceException.html" title="class in javax.resource">ResourceException</A></CODE> - generic exception if operation fails<DD><CODE>NotSupportedException</CODE> - if the operation is not supported</DL></DD></DL><HR><A NAME="setLogWriter(java.io.PrintWriter)"><!-- --></A><H3>setLogWriter</H3><PRE>void <B>setLogWriter</B>(<A HREF="http://java.sun.com/j2se/1.5/docs/api/java/io/PrintWriter.html" title="class or interface in java.io">PrintWriter</A>&nbsp;out)                  throws <A HREF="../../../javax/resource/ResourceException.html" title="class in javax.resource">ResourceException</A></PRE><DL><DD>Sets the log writer for this ManagedConnection instance.  <p>The log writer is a character output stream to which all logging and  tracing messages for this ManagedConnection instance will be printed.  Application Server manages the association of output stream with the  ManagedConnection instance based on the connection pooling   requirements.</p>    <p>When a ManagedConnection object is initially created, the default  log writer associated with this instance is obtained from the   ManagedConnectionFactory. An application server can set a log writer  specific to this ManagedConnection to log/trace this instance using  setLogWriter method.</p><P><DD><DL><DT><B>Parameters:</B><DD><CODE>out</CODE> - Character Output stream to be associated<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/resource/ResourceException.html" title="class in javax.resource">ResourceException</A></CODE> - generic exception if operation fails<DD><CODE><A HREF="../../../javax/resource/spi/ResourceAdapterInternalException.html" title="class in javax.resource.spi">ResourceAdapterInternalException</A></CODE> - resource adapter related error condition</DL></DD></DL><HR><A NAME="getLogWriter()"><!-- --></A><H3>getLogWriter</H3><PRE><A HREF="http://java.sun.com/j2se/1.5/docs/api/java/io/PrintWriter.html" title="class or interface in java.io">PrintWriter</A> <B>getLogWriter</B>()                         throws <A HREF="../../../javax/resource/ResourceException.html" title="class in javax.resource">ResourceException</A></PRE><DL><DD>Gets the log writer for this ManagedConnection instance.  <p>The log writer is a character output stream to which all logging and  tracing messages for this ManagedConnection instance will be printed.  ConnectionManager manages the association of output stream with the  ManagedConnection instance based on the connection pooling   requirements.</p>  <p>The Log writer associated with a ManagedConnection instance can be  one set as default from the ManagedConnectionFactory (that created  this connection) or one set specifically for this instance by the   application server.</p><P><DD><DL><DT><B>Returns:</B><DD>Character ourput stream associated with this Managed-            Connection instance<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/resource/ResourceException.html" title="class in javax.resource">ResourceException</A></CODE> - generic exception if operation fails</DL></DD></DL><!-- ========= END OF CLASS DATA ========= --><HR><!-- ======= START OF BOTTOM NAVBAR ====== --><A NAME="navbar_bottom"><!-- --></A><A HREF="#skip-navbar_bottom" title="Skip navigation links"></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_bottom_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">  <TR ALIGN="center" VALIGN="top">  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>  </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">&nbsp;<A HREF="../../../javax/resource/spi/LocalTransactionException.html" title="class in javax.resource.spi"><B>PREV CLASS</B></A>&nbsp;&nbsp;<A HREF="../../../javax/resource/spi/ManagedConnectionFactory.html" title="interface in javax.resource.spi"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">  <A HREF="../../../index.html?javax/resource/spi/ManagedConnection.html" target="_top"><B>FRAMES</B></A>  &nbsp;&nbsp;<A HREF="ManagedConnection.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;&nbsp;<SCRIPT type="text/javascript">  <!--  if(window==top) {    document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');  }  //--></SCRIPT><NOSCRIPT>  <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A></NOSCRIPT></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><A NAME="skip-navbar_bottom"></A><!-- ======== END OF BOTTOM NAVBAR ======= --><HR><font size="-1"><a href="http://java.sun.com/webapps/bugreport">Submit a bug or feature</a> <p>Copyright 2007 Sun Microsystems, Inc. All rights reserved. Use is subject to <a href="../legal/license.html" target="_top">license terms.</a></font></BODY></HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -