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: public class FooServiceImpl implements FooService {
07: private int counter;
08: private String prefix = "rawValue";
09:
10: public void setPrefix(String prefix) {
11: this .prefix = prefix;
12: }
13:
14: public String serviceMethod() {
15: return prefix + "-" + nextValue();
16: }
17:
18: private synchronized int nextValue() {
19: return counter++;
20: }
21:
22: public int getCounter() {
23: return counter;
24: }
25:
26: }
|