How can I implement a proper counter bean with EJB 3.0?
- by Aaron Digulla
I have this entity bean:
import javax.persistence.*;
@Entity
public class CounterTest {
private int id;
private int counter;
@Id
public int getId() { return id; }
public void setId(int id) { this.id = id; }
public int getCounter() { return counter; }
public void setCounter(int counter) { this.counter = counter; }
}
…