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 import javax.servlet.http.HttpServletRequest ; 36 37 import org.apache.struts.action.ActionErrors; 38 import org.apache.struts.action.ActionForm; 39 import org.apache.struts.action.ActionMapping; 40 import org.objectweb.jonas.webapp.jonasadmin.Jlists; 41 import org.objectweb.jonas.webapp.jonasadmin.JonasAdminJmx; 42 import org.objectweb.jonas.webapp.jonasadmin.common.LabelValueByLabelComparator; 43 import org.objectweb.jonas.webapp.taglib.LabelValueBean; 44 45 46 49 public class ResourceAdapterForm extends ActionForm { 50 51 53 private String action = null; 54 private String name = null; 55 private String jndiName = null; 56 private String path = null; 57 private String file = null; 58 private boolean inEar = false; 59 private String earFile = null; 60 private String earPath = null; 61 private ArrayList listProperties = new ArrayList (); 62 private String specVersion = null; 63 private ArrayList CF = new ArrayList (); 64 private ArrayList AS = new ArrayList (); 65 private ArrayList AO = new ArrayList (); 66 67 private ObjectName oName = null; 68 private String connectionFactory = null; 69 70 private String jdbcTestStatement = null; 71 private java.util.List checkingLevels = Jlists.getJdbcConnectionCheckingLevels(); 72 private String currentOpened = null; 73 private String currentBusy = null; 74 private String busyMaxRecent = null; 75 private String busyMinRecent = null; 76 private String currentInTx = null; 77 private String openedCount = null; 78 private String connectionFailures = null; 79 private String connectionLeaks = null; 80 private String currentWaiters = null; 81 private String waitersHigh = null; 82 private String waitersHighRecent = null; 83 private String waiterCount = null; 84 private String waitingTime = null; 85 private String waitingHigh = null; 86 private String waitingHighRecent = null; 87 private String servedOpen = null; 88 private String rejectedOpen = null; 89 private String rejectedFull = null; 90 private String rejectedTimeout = null; 91 private String rejectedOther = null; 92 private String jdbcConnCheckLevel = null; 93 private String connMaxAge = null; 94 private String maxOpentime = null; 95 private String maxSize = null; 96 private String minSize = null; 97 private String maxWaitTime = null; 98 private String maxWaiters = null; 99 private String samplingPeriod = null; 100 101 private ArrayList listUsedByEjb = new ArrayList (); 102 103 105 public void reset(ActionMapping mapping, HttpServletRequest request) { 106 } 107 108 public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) { 109 ActionErrors oErrors = new ActionErrors(); 110 return oErrors; 111 } 112 113 115 public String getAction() { 116 return action; 117 } 118 119 public void setAction(String action) { 120 this.action = action; 121 } 122 123 public ArrayList getAO() { 124 return AO; 125 } 126 127 public void setAO(ArrayList ao) { 128 AO = ao; 129 } 130 131 public ArrayList getAS() { 132 return AS; 133 } 134 135 public void setAS(ArrayList as) { 136 AS = as; 137 } 138 139 public ArrayList getCF() { 140 return CF; 141 } 142 143 public void setCF(ArrayList cf) { 144 CF = cf; 145 } 146 147 public String getJndiName() { 148 return jndiName; 149 } 150 151 public void setJndiName(String name) { 152 this.jndiName = name; 153 } 154 155 public String getName() { 156 return name; 157 } 158 159 public void setName(String name) { 160 this.name = name; 161 } 162 163 public String getPath() { 164 return path; 165 } 166 167 public void setPath(String path) { 168 this.path = path; 169 } 170 171 public String getFile() { 172 return file; 173 } 174 175 public void setFile(String file) { 176 this.file = file; 177 } 178 179 public String getEarFile() { 180 return earFile; 181 } 182 183 public String getEarPath() { 184 return earPath; 185 } 186 187 public void setEarPath(URL p_Url) { 188 this.earPath = null; 189 if (p_Url != null) { 190 this.earPath = p_Url.getPath(); 191 this.earFile = JonasAdminJmx.extractFilename(this.earPath); 192 } 193 } 194 195 public boolean isInEar() { 196 return inEar; 197 } 198 199 public void setInEar(boolean inEar) { 200 this.inEar = inEar; 201 } 202 203 public ArrayList getListProperties() { 204 return listProperties; 205 } 206 207 public void setListProperties(Properties properties) { 208 this.listProperties.clear(); 209 String sKey; 211 Enumeration oEnum = properties.keys(); 212 while (oEnum.hasMoreElements()) { 213 sKey = oEnum.nextElement().toString(); 214 this.listProperties.add(new LabelValueBean(sKey, properties.getProperty(sKey, ""))); 215 } 216 Collections.sort(this.listProperties, new LabelValueByLabelComparator()); 217 } 218 219 public String getSpecVersion() { 220 return specVersion; 221 } 222 223 public void setSpecVersion(String specVersion) { 224 this.specVersion = specVersion; 225 } 226 227 public void setOName(ObjectName oName) { 228 this.oName = oName; 229 } 230 231 public ObjectName getOName() { 232 return oName; 233 } 234 235 public void setConnectionFactory(String cf) { 236 connectionFactory = cf; 237 } 238 239 public String getConnectionFactory() { 240 return connectionFactory; 241 } 242 243 public String getCurrentOpened() { 245 return currentOpened; 246 } 247 248 public void setCurrentOpened(String s) { 249 currentOpened = s; 250 } 251 252 public String getCurrentBusy() { 253 return currentBusy; 254 } 255 256 public void setCurrentBusy(String s) { 257 currentBusy = s; 258 } 259 260 public String getCurrentInTx() { 261 return currentInTx; 262 } 263 264 public void setCurrentInTx(String s) { 265 currentInTx = s; 266 } 267 268 public String getOpenedCount() { 269 return openedCount; 270 } 271 272 public void setOpenedCount(String s) { 273 openedCount = s; 274 } 275 276 public String getConnectionFailures() { 277 return connectionFailures; 278 } 279 280 public void setConnectionFailures(String s) { 281 connectionFailures = s; 282 } 283 284 public String getConnectionLeaks() { 285 return connectionLeaks; 286 } 287 288 public void setConnectionLeaks(String s) { 289 connectionLeaks = s; 290 } 291 292 public String getCurrentWaiters() { 293 return currentWaiters; 294 } 295 296 public void setCurrentWaiters(String s) { 297 currentWaiters = s; 298 } 299 300 public String getWaitersHigh() { 301 return waitersHigh; 302 } 303 304 public void setWaitersHigh(String s) { 305 waitersHigh = s; 306 } 307 308 public String getWaitersHighRecent() { 309 return waitersHighRecent; 310 } 311 312 public void setWaitersHighRecent(String s) { 313 waitersHighRecent = s; 314 } 315 316 public String getBusyMaxRecent() { 317 return busyMaxRecent; 318 } 319 320 public void setBusyMaxRecent(String s) { 321 busyMaxRecent = s; 322 } 323 324 public String getBusyMinRecent() { 325 return busyMinRecent; 326 } 327 328 public void setBusyMinRecent(String s) { 329 busyMinRecent = s; 330 } 331 332 public String getWaiterCount() { 333 return waiterCount; 334 } 335 336 public void setWaiterCount(String s) { 337 waiterCount = s; 338 } 339 340 public String getWaitingTime() { 341 return waitingTime; 342 } 343 344 public void setWaitingTime(String s) { 345 waitingTime = s; 346 } 347 348 public String getWaitingHigh() { 349 return waitingHigh; 350 } 351 352 public void setWaitingHigh(String s) { 353 waitingHigh = s; 354 } 355 356 public String getWaitingHighRecent() { 357 return waitingHighRecent; 358 } 359 360 public void setWaitingHighRecent(String s) { 361 waitingHighRecent = s; 362 } 363 364 public String getServedOpen() { 365 return servedOpen; 366 } 367 368 public void setServedOpen(String s) { 369 servedOpen = s; 370 } 371 372 public String getRejectedOpen() { 373 return rejectedOpen; 374 } 375 376 public void setRejectedOpen(String s) { 377 rejectedOpen = s; 378 } 379 380 public String getRejectedFull() { 381 return rejectedFull; 382 } 383 384 public void setRejectedFull(String s) { 385 rejectedFull = s; 386 } 387 388 public String getRejectedTimeout() { 389 return rejectedTimeout; 390 } 391 392 public void setRejectedTimeout(String s) { 393 rejectedTimeout = s; 394 } 395 396 public String getRejectedOther() { 397 return rejectedOther; 398 } 399 400 public void setRejectedOther(String s) { 401 rejectedOther = s; 402 } 403 404 public String getJdbcConnCheckLevel() { 405 return jdbcConnCheckLevel; 406 } 407 408 public void setJdbcConnCheckLevel(String jdbcConnCheckLevel) { 409 this.jdbcConnCheckLevel = jdbcConnCheckLevel; 410 } 411 412 public String getConnMaxAge() { 413 return connMaxAge; 414 } 415 416 public void setConnMaxAge(String s) { 417 connMaxAge = s; 418 } 419 420 public String getMaxOpentime() { 421 return maxOpentime; 422 } 423 424 public void setMaxOpentime(String s) { 425 maxOpentime = s; 426 } 427 428 public String getMaxSize() { 429 return maxSize; 430 } 431 432 public void setMaxSize(String maxSize) { 433 this.maxSize = maxSize; 434 } 435 436 public String getMinSize() { 437 return minSize; 438 } 439 440 public void setMinSize(String minSize) { 441 this.minSize = minSize; 442 } 443 444 public String getMaxWaitTime() { 445 return maxWaitTime; 446 } 447 448 public void setMaxWaitTime(String maxWaitTime) { 449 this.maxWaitTime = maxWaitTime; 450 } 451 452 public String getMaxWaiters() { 453 return maxWaiters; 454 } 455 456 public void setMaxWaiters(String s) { 457 this.maxWaiters = s; 458 } 459 460 public String getSamplingPeriod() { 461 return samplingPeriod; 462 } 463 464 public void setSamplingPeriod(String s) { 465 this.samplingPeriod = s; 466 } 467 468 public String getJdbcTestStatement() { 469 return jdbcTestStatement; 470 } 471 472 public void setJdbcTestStatement(String jdbcTestStatement) { 473 this.jdbcTestStatement = jdbcTestStatement; 474 } 475 476 public java.util.List getCheckingLevels() { 477 return checkingLevels; 478 } 479 480 public ArrayList getListUsedByEjb() { 481 return listUsedByEjb; 482 } 483 484 public void setListUsedByEjb(ArrayList listUsedByEjb) { 485 this.listUsedByEjb = listUsedByEjb; 486 } 487 488 489 } | Popular Tags |