1 25 26 package org.objectweb.jonas.webapp.jonasadmin.service.resource; 27 28 import java.net.URL ; 29 import java.util.ArrayList ; 30 import java.util.Collections ; 31 import java.util.Enumeration ; 32 import java.util.Properties ; 33 34 import javax.management.ObjectName ; 35 36 import javax.servlet.http.HttpServletRequest ; 37 38 import org.apache.struts.action.ActionErrors; 39 import org.apache.struts.action.ActionForm; 40 import org.apache.struts.action.ActionMapping; 41 import org.objectweb.jonas.webapp.jonasadmin.Jlists; 42 import org.objectweb.jonas.webapp.jonasadmin.JonasAdminJmx; 43 import org.objectweb.jonas.webapp.jonasadmin.common.LabelValueByLabelComparator; 44 import org.objectweb.jonas.webapp.taglib.LabelValueBean; 45 46 47 50 public class ResourceAdapterCFForm extends ActionForm { 51 52 54 private String action = null; 55 private String description = null; 56 private String name = null; 57 private ArrayList listProperties = new ArrayList (); 58 private ObjectName oName = null; 59 60 private String jdbcTestStatement = "1"; 61 private java.util.List checkingLevels = Jlists.getJdbcConnectionCheckingLevels(); 62 private String currentOpened = null; 63 private String currentBusy = null; 64 private String busyMaxRecent = null; 65 private String busyMinRecent = null; 66 private String currentInTx = null; 67 private String openedCount = null; 68 private String connectionFailures = null; 69 private String connectionLeaks = null; 70 private String currentWaiters = null; 71 private String waitersHigh = null; 72 private String waitersHighRecent = null; 73 private String waiterCount = null; 74 private String waitingTime = null; 75 private String waitingHigh = null; 76 private String waitingHighRecent = null; 77 private String servedOpen = null; 78 private String rejectedOpen = null; 79 private String rejectedFull = null; 80 private String rejectedTimeout = null; 81 private String rejectedOther = null; 82 private String jdbcConnCheckLevel = "0"; 83 private String connMaxAge = "0"; 84 private String maxOpentime = "0"; 85 private String maxSize = "0"; 86 private String minSize = "0"; 87 private String maxWaitTime = "0"; 88 private String maxWaiters = "0"; 89 private String samplingPeriod = "0"; 90 91 private ArrayList listUsedByEjb = new ArrayList (); 92 93 95 public void reset(ActionMapping mapping, HttpServletRequest request) { 96 } 97 98 public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) { 99 ActionErrors oErrors = new ActionErrors(); 100 return oErrors; 101 } 102 103 105 public String getAction() { 106 return action; 107 } 108 109 public void setAction(String action) { 110 this.action = action; 111 } 112 113 public String getDescription() { 114 return description; 115 } 116 117 public void setDescription(String desc) { 118 description = desc; 119 } 120 121 public String getName() { 122 return name; 123 } 124 125 public void setName(String name) { 126 this.name = name; 127 } 128 129 public ArrayList getListProperties() { 130 return listProperties; 131 } 132 133 public void setListProperties(Properties properties) { 134 this.listProperties.clear(); 135 String sKey; 137 Enumeration oEnum = properties.keys(); 138 while (oEnum.hasMoreElements()) { 139 sKey = oEnum.nextElement().toString(); 140 this.listProperties.add(new LabelValueBean(sKey, properties.getProperty(sKey, ""))); 141 } 142 Collections.sort(this.listProperties, new LabelValueByLabelComparator()); 143 } 144 145 public void setOName(ObjectName oName) { 146 this.oName = oName; 147 } 148 149 public ObjectName getOName() { 150 return oName; 151 } 152 153 public String getCurrentOpened() { 155 return currentOpened; 156 } 157 158 public void setCurrentOpened(String s) { 159 currentOpened = s; 160 } 161 162 public String getCurrentBusy() { 163 return currentBusy; 164 } 165 166 public void setCurrentBusy(String s) { 167 currentBusy = s; 168 } 169 170 public String getCurrentInTx() { 171 return currentInTx; 172 } 173 174 public void setCurrentInTx(String s) { 175 currentInTx = s; 176 } 177 178 public String getOpenedCount() { 179 return openedCount; 180 } 181 182 public void setOpenedCount(String s) { 183 openedCount = s; 184 } 185 186 public String getConnectionFailures() { 187 return connectionFailures; 188 } 189 190 public void setConnectionFailures(String s) { 191 connectionFailures = s; 192 } 193 194 public String getConnectionLeaks() { 195 return connectionLeaks; 196 } 197 198 public void setConnectionLeaks(String s) { 199 connectionLeaks = s; 200 } 201 202 public String getCurrentWaiters() { 203 return currentWaiters; 204 } 205 206 public void setCurrentWaiters(String s) { 207 currentWaiters = s; 208 } 209 210 public String getWaitersHigh() { 211 return waitersHigh; 212 } 213 214 public void setWaitersHigh(String s) { 215 waitersHigh = s; 216 } 217 218 public String getWaitersHighRecent() { 219 return waitersHighRecent; 220 } 221 222 public void setWaitersHighRecent(String s) { 223 waitersHighRecent = s; 224 } 225 226 public String getBusyMaxRecent() { 227 return busyMaxRecent; 228 } 229 230 public void setBusyMaxRecent(String s) { 231 busyMaxRecent = s; 232 } 233 234 public String getBusyMinRecent() { 235 return busyMinRecent; 236 } 237 238 public void setBusyMinRecent(String s) { 239 busyMinRecent = s; 240 } 241 242 public String getWaiterCount() { 243 return waiterCount; 244 } 245 246 public void setWaiterCount(String s) { 247 waiterCount = s; 248 } 249 250 public String getWaitingTime() { 251 return waitingTime; 252 } 253 254 public void setWaitingTime(String s) { 255 waitingTime = s; 256 } 257 258 public String getWaitingHigh() { 259 return waitingHigh; 260 } 261 262 public void setWaitingHigh(String s) { 263 waitingHigh = s; 264 } 265 266 public String getWaitingHighRecent() { 267 return waitingHighRecent; 268 } 269 270 public void setWaitingHighRecent(String s) { 271 waitingHighRecent = s; 272 } 273 274 public String getServedOpen() { 275 return servedOpen; 276 } 277 278 public void setServedOpen(String s) { 279 servedOpen = s; 280 } 281 282 public String getRejectedOpen() { 283 return rejectedOpen; 284 } 285 286 public void setRejectedOpen(String s) { 287 rejectedOpen = s; 288 } 289 290 public String getRejectedFull() { 291 return rejectedFull; 292 } 293 294 public void setRejectedFull(String s) { 295 rejectedFull = s; 296 } 297 298 public String getRejectedTimeout() { 299 return rejectedTimeout; 300 } 301 302 public void setRejectedTimeout(String s) { 303 rejectedTimeout = s; 304 } 305 306 public String getRejectedOther() { 307 return rejectedOther; 308 } 309 310 public void setRejectedOther(String s) { 311 rejectedOther = s; 312 } 313 314 public String getJdbcConnCheckLevel() { 315 return jdbcConnCheckLevel; 316 } 317 318 public void setJdbcConnCheckLevel(String jdbcConnCheckLevel) { 319 this.jdbcConnCheckLevel = jdbcConnCheckLevel; 320 } 321 322 public String getConnMaxAge() { 323 return connMaxAge; 324 } 325 326 public void setConnMaxAge(String s) { 327 connMaxAge = s; 328 } 329 330 public String getMaxOpentime() { 331 return maxOpentime; 332 } 333 334 public void setMaxOpentime(String s) { 335 maxOpentime = s; 336 } 337 338 public String getMaxSize() { 339 return maxSize; 340 } 341 342 public void setMaxSize(String maxSize) { 343 this.maxSize = maxSize; 344 } 345 346 public String getMinSize() { 347 return minSize; 348 } 349 350 public void setMinSize(String minSize) { 351 this.minSize = minSize; 352 } 353 354 public String getMaxWaitTime() { 355 return maxWaitTime; 356 } 357 358 public void setMaxWaitTime(String maxWaitTime) { 359 this.maxWaitTime = maxWaitTime; 360 } 361 362 public String getMaxWaiters() { 363 return maxWaiters; 364 } 365 366 public void setMaxWaiters(String s) { 367 this.maxWaiters = s; 368 } 369 370 public String getSamplingPeriod() { 371 return samplingPeriod; 372 } 373 374 public void setSamplingPeriod(String s) { 375 this.samplingPeriod = s; 376 } 377 378 public String getJdbcTestStatement() { 379 return jdbcTestStatement; 380 } 381 382 public void setJdbcTestStatement(String jdbcTestStatement) { 383 this.jdbcTestStatement = jdbcTestStatement; 384 } 385 386 public java.util.List getCheckingLevels() { 387 return checkingLevels; 388 } 389 390 public ArrayList getListUsedByEjb() { 391 return listUsedByEjb; 392 } 393 394 public void setListUsedByEjb(ArrayList listUsedByEjb) { 395 this.listUsedByEjb = listUsedByEjb; 396 } 397 398 } | Popular Tags |