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

📄 jco.poolmanager.html

📁 SAP ERP的二次开发
💻 HTML
📖 第 1 页 / 共 3 页
字号:
</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="../../../../com/sap/mw/jco/JCO.PoolManager.html#removePool(java.lang.String)">removePool</A></B>(java.lang.String&nbsp;pool_name)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Removes the named pool from the list of pools.  </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="../../../../com/sap/mw/jco/JCO.PoolManager.html#removePoolChangedListener(com.sap.mw.jco.JCO.PoolChangedListener)">removePoolChangedListener</A></B>(<A HREF="../../../../com/sap/mw/jco/JCO.PoolChangedListener.html">JCO.PoolChangedListener</A>&nbsp;listener)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Unregister a pool changed listener</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="../../../../com/sap/mw/jco/JCO.PoolManager.html#setConnectionTimeout(long)">setConnectionTimeout</A></B>(long&nbsp;connection_timeout)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the default value for the connection timeout in milliseconds. </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="../../../../com/sap/mw/jco/JCO.PoolManager.html#setMaxWaitTime(long)">setMaxWaitTime</A></B>(long&nbsp;max_wait_time)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the maximum time to wait in a connection request for a free 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="../../../../com/sap/mw/jco/JCO.PoolManager.html#setTimeoutCheckPeriod(long)">setTimeoutCheckPeriod</A></B>(long&nbsp;timeout_check_period)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the default value for the timeout check period in milliseconds. </TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;<A HREF="../../../../com/sap/mw/jco/JCO.PoolManager.html">JCO.PoolManager</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/sap/mw/jco/JCO.PoolManager.html#singleton()">singleton</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the instance of the pool manager</TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Methods inherited from class java.lang.Object</B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></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="singleton()"><!-- --></A><H3>
singleton</H3>
<PRE>
public static <A HREF="../../../../com/sap/mw/jco/JCO.PoolManager.html">JCO.PoolManager</A> <B>singleton</B>()</PRE>
<DL>
<DD>Returns the instance of the pool manager</DL>
<HR>

<A NAME="addPoolChangedListener(com.sap.mw.jco.JCO.PoolChangedListener)"><!-- --></A><H3>
addPoolChangedListener</H3>
<PRE>
public void <B>addPoolChangedListener</B>(<A HREF="../../../../com/sap/mw/jco/JCO.PoolChangedListener.html">JCO.PoolChangedListener</A>&nbsp;listener)</PRE>
<DL>
<DD>Register a pool changed listener<DD><DL>
<DT><B>Parameters:</B><DD><CODE>listener</CODE> - the listener to add</DL>
</DD>
</DL>
<HR>

<A NAME="removePoolChangedListener(com.sap.mw.jco.JCO.PoolChangedListener)"><!-- --></A><H3>
removePoolChangedListener</H3>
<PRE>
public void <B>removePoolChangedListener</B>(<A HREF="../../../../com/sap/mw/jco/JCO.PoolChangedListener.html">JCO.PoolChangedListener</A>&nbsp;listener)</PRE>
<DL>
<DD>Unregister a pool changed listener<DD><DL>
<DT><B>Parameters:</B><DD><CODE>listener</CODE> - the listener to remove</DL>
</DD>
</DL>
<HR>

<A NAME="addPool(java.lang.String, com.sap.mw.jco.JCO.Client, int)"><!-- --></A><H3>
addPool</H3>
<PRE>
public void <B>addPool</B>(java.lang.String&nbsp;pool_name,                    <A HREF="../../../../com/sap/mw/jco/JCO.Client.html">JCO.Client</A>&nbsp;master,                    int&nbsp;max_pool_size)</PRE>
<DL>
<DD>Adds a new pool to the pools list<DD><DL>
<DT><B>Parameters:</B><DD><CODE>pool_name</CODE> - the name of the new pool<DD><CODE>master</CODE> - the connection that specifies the parameters for all         connections in this pool.<DD><CODE>max_pool_size</CODE> - the max. number of connections that can be opened         simultaneously in this pool<DT><B>Throws:</B><DD><CODE><A HREF="../../../../com/sap/mw/jco/JCO.Exception.html">JCO.Exception</A></CODE> - thrown if a pool with the same name already exists.</DL>
</DD>
</DL>
<HR>

<A NAME="getPoolNames()"><!-- --></A><H3>
getPoolNames</H3>
<PRE>
public java.lang.String[] <B>getPoolNames</B>()</PRE>
<DL>
<DD>Returns the array of pool names that are currently under control of the manager<DD><DL>
<DT><B>Returns:</B><DD>a string array of pool names</DL>
</DD>
</DL>
<HR>

<A NAME="getPool(java.lang.String)"><!-- --></A><H3>
getPool</H3>
<PRE>
public <A HREF="../../../../com/sap/mw/jco/JCO.Pool.html">JCO.Pool</A> <B>getPool</B>(java.lang.String&nbsp;pool_name)</PRE>
<DL>
<DD>Returns the pool with the specified name or <tt>null</tt>  if such a pool does not exist in the pool list<DD><DL>
<DT><B>Parameters:</B><DD><CODE>pool_name</CODE> - the name of the pool to return</DL>
</DD>
</DL>
<HR>

<A NAME="removePool(java.lang.String)"><!-- --></A><H3>
removePool</H3>
<PRE>
public void <B>removePool</B>(java.lang.String&nbsp;pool_name)</PRE>
<DL>
<DD>Removes the named pool from the list of pools.  <em>Note: </em>The routine will close all open connections of  the specified pool forcefully.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>pool_name</CODE> - the name of the pool to remove</DL>
</DD>
</DL>
<HR>

<A NAME="getClient(java.lang.String)"><!-- --></A><H3>
getClient</H3>
<PRE>
public <A HREF="../../../../com/sap/mw/jco/JCO.Client.html">JCO.Client</A> <B>getClient</B>(java.lang.String&nbsp;pool_name)</PRE>
<DL>
<DD>Returns a new client connection from the specified pool.<br>  <em>Note:</em> Any client obtained by this method <em>must</em> be released with  <tt>JCO.releaseClient()</tt> if not needed anymore.  If the pool is exhausted, that is, all clients of the pool are currently  allocated by an application, the method will wait for a while and  retry. The max. time the routine will wait can be specified by  <tt>setMaxWaitTime()</tt>. If the second try to request  a client from the pool also fails, the method will throw an exception. <p> <em>Note:</em> To avoid reconnect on connections to the SAP Systems below 4.0A it is necessary to set the <tt>resetOnRelease</tt> property to false and use <tt>JCO.getClient([pool name], false)</tt>. Be careful, if you use this way, if have to be certain, that the application using this pool never invokes functions, that maintain a state on the  ABAP server.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>pool_name</CODE> - the name of the pool from which to take the connection<DT><B>Returns:</B><DD>the newly created client or <tt>null</tt> in the case when the          thread which was waiting for the client has been interrupted or client pool was removed.<DT><B>Throws:</B><DD><CODE><A HREF="../../../../com/sap/mw/jco/JCO.Exception.html">JCO.Exception</A></CODE> - with the error group set to <tt>JCO.Exception.JCO_ERROR_RESOURCE</tt>,      if a client could not be allocated, i.e. the client pool is exhausted<DD><CODE><A HREF="../../../../com/sap/mw/jco/JCO.Exception.html">JCO.Exception</A></CODE> - thrown if a client connection could not be established due to wrong logon data,      network problems, etc.<DT><B>See Also: </B><DD><A HREF="../../../../com/sap/mw/jco/JCO.html#releaseClient(com.sap.mw.jco.JCO.Client)"><CODE>JCO.releaseClient(com.sap.mw.jco.JCO.Client)</CODE></A>, 
<A HREF="../../../../com/sap/mw/jco/JCO.PoolManager.html#setMaxWaitTime(long)"><CODE>setMaxWaitTime(long)</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="getClient(java.lang.String, boolean)"><!-- --></A><H3>
getClient</H3>
<PRE>
public <A HREF="../../../../com/sap/mw/jco/JCO.Client.html">JCO.Client</A> <B>getClient</B>(java.lang.String&nbsp;pool_name,                            boolean&nbsp;reset)</PRE>
<DL>
<DD>Returns a new client connection from the specified pool and resets  all resources associated with this connection.  If the pool is exhausted, that is, all clients of the pool are currently  allocated by an application, the method will wait for a while and  retry. The max. time the routine will wait can be specified by  <tt>setMaxWaitTime()</tt>. If the second try to request  a client from the pool also fails, the method will throw an exception.<p> <em>Note:</em> To avoid reconnect on connections to the SAP Systems below 4.0A it is necessary to set the <tt>resetOnRelease</tt> property to false and use <tt>JCO.getClient([pool name], false)</tt>. Be careful, if you use this way, if have to be certain,

⌨️ 快捷键说明

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