KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > enterprise > connectors > inflow > MdbContainerProps


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 package com.sun.enterprise.connectors.inflow;
25
26 /**
27  * Represents the properties of MDBContainer.
28  *
29  * @author Binod P.G
30  */

31 public class MdbContainerProps {
32
33     private static int cmtMaxRuntimeExceptions;
34     private static int reconnectDelayInSeconds;
35     private static int reconnectMaxRetries;
36     private static boolean reconnectEnabled;
37
38     /**
39      * Sets the max runtime exception that are allowed.
40      *
41      * @param v value.
42      */

43     public static void setMaxRuntimeExceptions(int v){
44         cmtMaxRuntimeExceptions = v;
45     }
46
47     /**
48      * Retrives the max runtime exception that are allowed.
49      *
50      * @return int value
51      */

52     public static int getMaxRuntimeExceptions() {
53         return cmtMaxRuntimeExceptions;
54     }
55
56     /**
57      * Sets the reconnect delay in seconds.
58      *
59      * @param v value.
60      */

61     public static void setReconnectDelay(int v) {
62         reconnectDelayInSeconds = v;
63     }
64
65     /**
66      * Retrieves the reconnect delay in seconds.
67      *
68      * @return int value
69      */

70     public static int getReconnectDelay() {
71         return reconnectDelayInSeconds;
72     }
73
74     /**
75      * Sets the reconnect max retries.
76      *
77      * @param v value.
78      */

79     public static void setReconnectMaxRetries(int v) {
80         reconnectMaxRetries = v;
81     }
82
83     /**
84      * Gets the reconnect max retries.
85      *
86      * @return int value
87      */

88     public static int getReconnectMaxRetries() {
89         return reconnectMaxRetries;
90     }
91
92     /**
93      * Sets reconnect enabled flag.
94      *
95      * @param v value.
96      */

97     public static void setReconnectEnabled(boolean v){
98         reconnectEnabled = v;
99     }
100
101     /**
102      * Gets reconnect enabled flag.
103      *
104      * @return boolean indicating whether reconnect is enabled or not.
105      */

106     public static boolean getReconnectEnabled() {
107         return reconnectEnabled;
108     }
109
110 }
111
Popular Tags