KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > appserv > management > config > ConnectorConnectionPoolConfig


1 /*
2  * The contents of this file are subject to the terms
3  * of the Common Development and Distribution License
4  * (the License). You may not use this file except in
5  * compliance with the License.
6  *
7  * You can obtain a copy of the license at
8  * https://glassfish.dev.java.net/public/CDDLv1.0.html or
9  * glassfish/bootstrap/legal/CDDLv1.0.txt.
10  * See the License for the specific language governing
11  * permissions and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL
14  * Header Notice in each file and include the License file
15  * at glassfish/bootstrap/legal/CDDLv1.0.txt.
16  * If applicable, add the following below the CDDL Header,
17  * with the fields enclosed by brackets [] replaced by
18  * you own identifying information:
19  * "Portions Copyrighted [year] [name of copyright owner]"
20  *
21  * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
22  */

23 package com.sun.appserv.management.config;
24
25 import java.util.Map JavaDoc;
26
27 import com.sun.appserv.management.base.XTypes;
28 import com.sun.appserv.management.base.Container;
29
30
31
32
33 /**
34     Configuration for the <connector-connection-pool> element.
35     <p>
36     connector-connection-pool defines configuration used to create
37     and manage a pool of connections to a EIS. Pool definition is
38     named, and can be referred to by multiple connector-resource
39     elements (See connector-resource).
40     <p>
41     Each named pool definition results in a pool instantiated at server
42     start-up. Pool is populated when accessed for the first time. If two or
43     more connector-resource elements point to the same
44     connector-connection-pool element, they are using the same pool of
45     connections, at run time.
46     <p>
47     There can be more than one pool for one connection-definition in one
48     resource-adapter.
49 */

50
51 public interface ConnectorConnectionPoolConfig
52     extends NamedConfigElement, Description, PropertiesAccess,
53         Container, ResourceRefConfigReferent
54 {
55 /** The j2eeType as returned by {@link com.sun.appserv.management.base.AMX#getJ2EEType}. */
56     public static final String JavaDoc J2EE_TYPE = XTypes.CONNECTOR_CONNECTION_POOL_CONFIG;
57
58     /**
59         Specifies if the connection that is about to
60         be returned is to be validated by the container.
61       */

62     public boolean getConnectionValidationRequired();
63     
64     /**
65         See {@link #getConnectionValidationRequired}.
66     */

67     public void setConnectionValidationRequired( final boolean required );
68     
69     /**
70         Unique name, identifying one connection-definition in a
71         Resource Adapter. Currently this is ConnectionFactory type.
72     */

73     public String JavaDoc getConnectionDefinitionName();
74     
75     /**
76         See {@link #getConnectionDefinitionName}.
77     */

78     public void setConnectionDefinitionName( final String JavaDoc value );
79
80     /**
81         Indicates if all connections in the pool must be closed
82         should a single connection fail validation. The default is
83         false. One attempt will be made to re-establish failed
84         connections.
85     */

86     public boolean getFailAllConnections();
87     
88     /**
89         See {@link #getFailAllConnections}.
90     */

91     public void setFailAllConnections( final boolean value );
92
93     /**
94         Maximum time in seconds, that a connection can remain idle in
95         the pool. After this time, the pool implementation can close
96         this connection. Note that this does not control connection
97         timeouts enforced at the database server side. Adminsitrators
98         are advised to keep this timeout shorter than the EIS
99         connection timeout (if such timeouts are configured on the
100         specific EIS), to prevent accumulation of unusable connection
101         in Application Server.
102     */

103     public String JavaDoc getIdleTimeoutInSeconds();
104     
105     /**
106         See {@link #getIdleTimeoutInSeconds}.
107     */

108     public void setIdleTimeoutInSeconds( final String JavaDoc value );
109
110     /**
111         Maximum number of conections that can be created.
112     */

113     public String JavaDoc getMaxPoolSize();
114     
115     /**
116         See {@link #getMaxPoolSize}.
117     */

118     public void setMaxPoolSize( final String JavaDoc value );
119
120     /**
121         Amount of time the caller will wait before getting a
122         connection timeout. The default is 60 seconds. A value of 0
123         will force caller to wait indefinitely.
124     */

125     public String JavaDoc getMaxWaitTimeInMillis();
126     
127     /**
128         See {@link #getMaxWaitTimeInMillis}.
129     */

130     public void setMaxWaitTimeInMillis( final String JavaDoc value );
131
132
133     /**
134         Number of connections to be removed when
135         idle-timeout-in-seconds timer expires. Connections that have
136         idled for longer than the timeout are candidates for removal.
137         When the pool size reaches steady-pool-size, the connection
138         removal stops.
139     */

140     public String JavaDoc getPoolResizeQuantity();
141     
142     /**
143         See {@link #getPoolResizeQuantity}.
144     */

145     public void setPoolResizeQuantity( final String JavaDoc value );
146
147     /**
148         Name of resource adapter. Name of .rar file is
149         taken as the unique name for the resource adapter.
150     */

151     public String JavaDoc getResourceAdapterName();
152     
153     /**
154         See {@link #getResourceAdapterName}.
155     */

156     public void setResourceAdapterName( final String JavaDoc value );
157
158     /**
159         Minimum and initial number of connections maintained in the
160         pool.
161     */

162     public String JavaDoc getSteadyPoolSize();
163     
164     /**
165         See {@link #getSteadyPoolSize}.
166     */

167     public void setSteadyPoolSize( final String JavaDoc value );
168     
169     /**
170         Indicates the level of transaction support that this pool
171         will have. Possible values are "XATransaction",
172         "LocalTransaction" and "NoTransaction". This attribute will
173         override that transaction support attribute in the Resource
174         Adapter in a downward compatible way, i.e it can support a
175         lower/equal transaction level than specified in the RA, but
176         not a higher level.
177         
178         @see TransactionSupportValues
179     */

180     public String JavaDoc getTransactionSupport();
181     
182     /**
183          See {@link #getTransactionSupport}.
184     */

185     public void setTransactionSupport( final String JavaDoc value );
186     
187     /**
188         @return Map of all SecurityMapConfig contained in this item.
189      */

190     public Map JavaDoc<String JavaDoc,SecurityMapConfig> getSecurityMapConfigMap();
191     
192     /**
193         At least one of 'principals' and 'userGroups' must be non-null.
194      */

195         public SecurityMapConfig
196     createSecurityMapConfig(
197         final String JavaDoc name,
198         final String JavaDoc backendPrincipalUsername,
199         final String JavaDoc backendPrincipalPassword,
200         final String JavaDoc[] principals,
201         final String JavaDoc[] userGroups );
202     
203     /**
204         Remove the specified SecurityMapConfig.
205      */

206     public void removeSecurityMapConfig( String JavaDoc name );
207 }
208
209
210
211
212
213
214
Popular Tags