connectioneventlistener.html

来自「SUN公司官方J2EE中文帮助文档 应该不错 有兴趣的下来看看 html格式的」· HTML 代码 · 共 311 行

HTML
311
字号
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc on Thu Jan 17 03:51:36 PST 2002 -->
<TITLE>
Java 2 Platform EE v1.3: Interface  ConnectionEventListener
</TITLE>
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
</HEAD>
<BODY BGCOLOR="white">

<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_top"><!-- --></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
  <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;PREV CLASS&nbsp;
&nbsp;<A HREF="../../../javax/resource/spi/ConnectionManager.html"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../index.html" TARGET="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="ConnectionEventListener.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY: &nbsp;INNER&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>
<!-- =========== END OF NAVBAR =========== -->

<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
javax.resource.spi</FONT>
<BR>
Interface  ConnectionEventListener</H2>
<DL>
<DT><B>All Superinterfaces:</B> <DD>java.util.EventListener</DD>
</DL>
<HR>
<DL>
<DT>public interface <B>ConnectionEventListener</B><DT>extends java.util.EventListener</DL>

<P>
The <code>ConnectionEventListener</code> interface provides an event
   callback mechanism to enable an application server to receive 
   notifications from a <code>ManagedConnection</code> instance. 

   <p>An application server uses these event notifications to manage 
   its connection pool, to clean up any invalid or terminated connections
   and to manage local transactions.

   <p>An application server implements the 
   <code>ConnectionEventListener</code> interface. It registers a connection 
   listener with a <code>ManagedConnection</code> instance by using 
   <code>ManagedConnection.addConnectionEventListener</code> method.
<P>
<DL>
<DT><B>See Also: </B><DD><A HREF="../../../javax/resource/spi/ConnectionEvent.html"><CODE>ConnectionEvent</CODE></A></DL>
<HR>

<P>
<!-- ======== INNER CLASS SUMMARY ======== -->


<!-- =========== FIELD SUMMARY =========== -->


<!-- ======== CONSTRUCTOR SUMMARY ======== -->


<!-- ========== METHOD SUMMARY =========== -->

<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Method Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/resource/spi/ConnectionEventListener.html#connectionClosed(javax.resource.spi.ConnectionEvent)">connectionClosed</A></B>(<A HREF="../../../javax/resource/spi/ConnectionEvent.html">ConnectionEvent</A>&nbsp;event)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Notifies that an application component has closed the connection.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/resource/spi/ConnectionEventListener.html#connectionErrorOccurred(javax.resource.spi.ConnectionEvent)">connectionErrorOccurred</A></B>(<A HREF="../../../javax/resource/spi/ConnectionEvent.html">ConnectionEvent</A>&nbsp;event)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Notifies a connection related error.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/resource/spi/ConnectionEventListener.html#localTransactionCommitted(javax.resource.spi.ConnectionEvent)">localTransactionCommitted</A></B>(<A HREF="../../../javax/resource/spi/ConnectionEvent.html">ConnectionEvent</A>&nbsp;event)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Notifies that a Resource Manager Local Transaction was committed 
  on the ManagedConnection instance.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/resource/spi/ConnectionEventListener.html#localTransactionRolledback(javax.resource.spi.ConnectionEvent)">localTransactionRolledback</A></B>(<A HREF="../../../javax/resource/spi/ConnectionEvent.html">ConnectionEvent</A>&nbsp;event)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Notifies that a Resource Manager Local Transaction was rolled back 
  on the ManagedConnection instance.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/resource/spi/ConnectionEventListener.html#localTransactionStarted(javax.resource.spi.ConnectionEvent)">localTransactionStarted</A></B>(<A HREF="../../../javax/resource/spi/ConnectionEvent.html">ConnectionEvent</A>&nbsp;event)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Notifies that a Resource Manager Local Transaction was started on
  the ManagedConnection instance.</TD>
</TR>
</TABLE>
&nbsp;
<P>

<!-- ============ FIELD DETAIL =========== -->


<!-- ========= CONSTRUCTOR DETAIL ======== -->


<!-- ============ METHOD DETAIL ========== -->

<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Method Detail</B></FONT></TD>
</TR>
</TABLE>

<A NAME="connectionClosed(javax.resource.spi.ConnectionEvent)"><!-- --></A><H3>
connectionClosed</H3>
<PRE>
public void <B>connectionClosed</B>(<A HREF="../../../javax/resource/spi/ConnectionEvent.html">ConnectionEvent</A>&nbsp;event)</PRE>
<DL>
<DD>Notifies that an application component has closed the connection.

  <p>A ManagedConnection instance notifies its registered set of 
  listeners by calling ConnectionEventListener.connectionClosed method
  when an application component closes a connection handle. The 
  application server uses this connection close event to put the
  ManagedConnection instance back in to the connection pool.<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>event</CODE> - event object describing the source of 
                      the event</DL>
</DD>
</DL>
<HR>

<A NAME="localTransactionStarted(javax.resource.spi.ConnectionEvent)"><!-- --></A><H3>
localTransactionStarted</H3>
<PRE>
public void <B>localTransactionStarted</B>(<A HREF="../../../javax/resource/spi/ConnectionEvent.html">ConnectionEvent</A>&nbsp;event)</PRE>
<DL>
<DD>Notifies that a Resource Manager Local Transaction was started on
  the ManagedConnection instance.<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>event</CODE> - event object describing the source of 
                      the event</DL>
</DD>
</DL>
<HR>

<A NAME="localTransactionCommitted(javax.resource.spi.ConnectionEvent)"><!-- --></A><H3>
localTransactionCommitted</H3>
<PRE>
public void <B>localTransactionCommitted</B>(<A HREF="../../../javax/resource/spi/ConnectionEvent.html">ConnectionEvent</A>&nbsp;event)</PRE>
<DL>
<DD>Notifies that a Resource Manager Local Transaction was committed 
  on the ManagedConnection instance.<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>event</CODE> - event object describing the source of 
                      the event</DL>
</DD>
</DL>
<HR>

<A NAME="localTransactionRolledback(javax.resource.spi.ConnectionEvent)"><!-- --></A><H3>
localTransactionRolledback</H3>
<PRE>
public void <B>localTransactionRolledback</B>(<A HREF="../../../javax/resource/spi/ConnectionEvent.html">ConnectionEvent</A>&nbsp;event)</PRE>
<DL>
<DD>Notifies that a Resource Manager Local Transaction was rolled back 
  on the ManagedConnection instance.<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>event</CODE> - event object describing the source of 
                      the event</DL>
</DD>
</DL>
<HR>

<A NAME="connectionErrorOccurred(javax.resource.spi.ConnectionEvent)"><!-- --></A><H3>
connectionErrorOccurred</H3>
<PRE>
public void <B>connectionErrorOccurred</B>(<A HREF="../../../javax/resource/spi/ConnectionEvent.html">ConnectionEvent</A>&nbsp;event)</PRE>
<DL>
<DD>Notifies a connection related error. 

  The ManagedConnection instance calls the method
  ConnectionEventListener.connectionErrorOccurred to notify 
  its registered listeners of the occurrence of a physical 
  connection-related error. The event notification happens 
  just before a resource adapter throws an exception to the 
  application component using the connection handle.

  The connectionErrorOccurred method indicates that the 
  associated ManagedConnection instance is now invalid and 
  unusable. The application server handles the connection 
  error event notification by initiating application 
  server-specific cleanup (for example, removing ManagedConnection 
  instance from the connection pool) and then calling
  ManagedConnection.destroy method to destroy the physical 
  connection.<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>event</CODE> - event object describing the source of 
                      the event</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>

<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_bottom"><!-- --></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
  <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;PREV CLASS&nbsp;
&nbsp;<A HREF="../../../javax/resource/spi/ConnectionManager.html"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../index.html" TARGET="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="ConnectionEventListener.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY: &nbsp;INNER&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>
<!-- =========== END OF NAVBAR =========== -->

<HR>

</BODY>
</HTML>

⌨️ 快捷键说明

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