01: /*
02: * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
03: */
04: package com.tctest.spring.bean;
05:
06: import java.io.InputStream;
07:
08: public class RedeploymentBeanImpl implements RedeploymentBean {
09:
10: private int value;
11:
12: public int getValue() {
13: synchronized (this ) {
14: return value;
15: }
16: }
17:
18: public void setValue(int value) {
19: synchronized (this ) {
20: this .value = value;
21: }
22: }
23:
24: public boolean hasResource(String resource) {
25: InputStream is;
26: try {
27: is = getClass().getResourceAsStream(resource);
28: return is != null;
29: } catch (Exception e) {
30: return false;
31: }
32: }
33:
34: }
|