KickJava   Java API By Example, From Geeks To Geeks.

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


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  
24 /*
25  * $Header: /cvs/glassfish/admin-core/mbeanapi/src/java/com/sun/appserv/management/config/AvailabilityServiceConfig.java,v 1.8 2006/03/09 20:30:22 llc Exp $
26  * $Revision: 1.8 $
27  * $Date: 2006/03/09 20:30:22 $
28  */

29
30
31 package com.sun.appserv.management.config;
32
33 import java.util.Map JavaDoc;
34
35
36 import com.sun.appserv.management.base.XTypes;
37 import com.sun.appserv.management.base.AMX;
38
39 import com.sun.appserv.management.base.Container;
40
41 /**
42      Configuration for the <availability-service> element.
43  */

44 public interface AvailabilityServiceConfig
45     extends ConfigElement, PropertiesAccess, Container
46 {
47 /** The j2eeType as returned by {@link com.sun.appserv.management.base.AMX#getJ2EEType}. */
48     public static final String JavaDoc J2EE_TYPE = XTypes.AVAILABILITY_SERVICE_CONFIG;
49
50
51     /**
52         Creates an ejb-container-availability element.
53
54         @param params
55         @return Returns a proxy to the EJBContainerAvailabilityConfig MBean
56         @see com.sun.appserv.management.config.EJBContainerAvailabilityConfigKeys
57      */

58     EJBContainerAvailabilityConfig createEJBContainerAvailabilityConfig( Map JavaDoc<String JavaDoc,String JavaDoc> params );
59
60     /**
61         Removes ejb-container-availability element from the config.
62      */

63     void removeEJBContainerAvailabilityConfig();
64
65     /**
66         Creates a web-container-availability element
67
68         @param params
69         @return Returns a proxy to the WebContainerAvailabilityConfig MBean
70         @see com.sun.appserv.management.config.WebContainerAvailabilityConfigKeys
71      */

72     WebContainerAvailabilityConfig createWebContainerAvailabilityConfig( Map JavaDoc<String JavaDoc,String JavaDoc> params );
73
74     /**
75         Removes web-container-availability element from the config.
76      */

77     void removeWebContainerAvailabilityConfig();
78
79     /**
80         Get the EJBContainerAvailabilityConfig MBean.
81      */

82     EJBContainerAvailabilityConfig getEJBContainerAvailabilityConfig();
83
84     /**
85         Get the WebContainerAvailabilityConfig MBean.
86      */

87     WebContainerAvailabilityConfig getWebContainerAvailabilityConfig();
88     boolean getAvailabilityEnabled();
89     void setAvailabilityEnabled( boolean enabled );
90
91     /**
92     * If set to true, the lifecycle of the highly available store
93     * is matched with the lifecycle of the highly available
94     * cluster. The store is started or stopped with the cluster. It
95     * is removed when the cluster is deleted. When set to false,
96     * the store lifecycle would have to manually managed by the
97     * administrator.
98     * @return the value of auto-manage-ha-store
99     * @since AppServer 9.0
100     */

101     boolean getAutoManageHAStore();
102     /**
103      * If set to true, the lifecycle of the highly available store
104      * is matched with the lifecycle of the highly available
105      * cluster. The store is started or stopped with the cluster. It
106      * is removed when the cluster is deleted. When set to false,
107      * the store lifecycle would have to manually managed by the
108      * administrator.
109      * @param enabled sets the value of auto-manage-ha-store
110     * @since AppServer 9.0
111      */

112     void setAutoManageHAStore(boolean enabled);
113
114
115     /**
116      * This is the jndi-name for the JDBC Connection Pool used
117      * potentially by both the Web Container and the EJB Stateful
118      * Session Bean Container for use in checkpointing/passivation
119      * when persistence-type = "ha". See sfsb-ha-persistence-type
120      * and sfsb-persistence-type for more details. It will default
121      * to "jdbc/hastore". This attribute can be over-ridden in
122      * either web-container-availability (with
123      * http-session-store-pool-name) and/or in
124      * ejb-container-availability (with sfsb-store-pool-name). If
125      * store-pool-name is not over-ridden then both containers will
126      * share the same connection pool. If either container
127      * over-rides then it may have its own dedicated pool. In this
128      * case there must also be a new corresponding JDBC Resource and
129      * JDBC Connection Pool defined for this new pool name.
130      * @return the jndi-name
131     * @since AppServer 9.0
132      */

133     String JavaDoc getStorePoolName();
134     /**
135      * This is the jndi-name for the JDBC Connection Pool used
136      * potentially by both the Web Container and the EJB Stateful
137      * Session Bean Container for use in checkpointing/passivation
138      * when persistence-type = "ha". See sfsb-ha-persistence-type
139      * and sfsb-persistence-type for more details. It will default
140      * to "jdbc/hastore". This attribute can be over-ridden in
141      * either web-container-availability (with
142      * http-session-store-pool-name) and/or in
143      * ejb-container-availability (with sfsb-store-pool-name). If
144      * store-pool-name is not over-ridden then both containers will
145      * share the same connection pool. If either container
146      * over-rides then it may have its own dedicated pool. In this
147      * case there must also be a new corresponding JDBC Resource and
148      * JDBC Connection Pool defined for this new pool name.
149      * @param storePoolName the jndi-name
150      * @since AppServer 9.0
151      */

152     void setStorePoolName( String JavaDoc storePoolName );
153
154     /**
155      * comma-delimited list of server host names or IP addresses
156      * where high availability store management agents are running.
157      * For HADB the list must consist of an even number of hosts separated
158      * by commas. E.g. <b>host1,host2,host2,host1</b>
159      * @return the stored hostnames or IP addresses
160      * @since AppServer 9.0
161      */

162     String JavaDoc getHAAgentHosts();
163     /**
164      * comma-delimited list of server host names or IP addresses
165      * where high availability store management agents are running.
166      *
167      * @param value the stored hostnames or IP addresses
168      * @since AppServer 9.0
169      */

170     void setHAAgentHosts(String JavaDoc value );
171
172     /**
173      * port number where highly available store management agents
174      * can be contacted. The default for HADB is 1862
175      * @return the port number
176      * @since AppServer 9.0
177      */

178     String JavaDoc getHAAgentPort();
179     
180     /**
181      * port number where highly available store management agents
182      * can be contacted. The default for HADB is 1862
183      * @param value the port number
184      * @since AppServer 9.0
185      */

186     void setHAAgentPort(String JavaDoc value );
187     
188     /**
189      * @since AppServer 9.0
190      */

191     String JavaDoc getHAAgentPassword();
192     
193     /**
194      * @since AppServer 9.0
195      */

196     void setHAAgentPassword( String JavaDoc password );
197
198     /**
199      * The periodicity at which store health is checked.
200      * @return the interval time in seconds
201      * @since AppServer 9.0
202      */

203     String JavaDoc getHAStoreHealthcheckIntervalSeconds();
204
205     /**
206      * The periodicity at which store health is checked.
207      * @param value the interval time in seconds
208      * @since AppServer 9.0
209      */

210     void setHAStoreHealthcheckIntervalSeconds(String JavaDoc value );
211
212     /**
213      * Name of the session store. In HADB this corresponds to the name of
214      * the HADB instance. The default is the cluster-name.
215      * @return the store name
216      * @since AppServer 9.0
217      */

218     
219     String JavaDoc getHAStoreName();
220     /**
221      * Name of the session store. In HADB this corresponds to the name of
222      * the HADB instance. The default is the cluster-name.
223      * @param value the new store name
224      * @since AppServer 9.0
225      */

226     void setHAStoreName( String JavaDoc value );
227
228     /**
229      * Application server stops saving session state when the store
230      * service does not function properly or is is not accessible
231      * for any reason. When this attribute is set to true, periodic
232      * checking is done to detect if the store service has become
233      * available again. If healthcheck succeeds the session state
234      * saving is resumed. Defaults to false.
235      * @return the value of the flag
236      * @since AppServer 9.0
237      */

238     boolean getHAStoreHealthcheckEnabled();
239     void setHAStoreHealthcheckEnabled( boolean value );
240
241     public JMSAvailabilityConfig getJMSAvailabilityConfig();
242     public void createJMSAvailabilityConfig(
243                     boolean availabilityEnabled, String JavaDoc mqStorePoolName );
244     public void removeJMSAvailabilityConfig();
245 }
246
247
248
Popular Tags