Class StatsEJB
- java.lang.Object
-
- ejava.examples.ejbsessionbank.ejb.StatsEJB
-
- All Implemented Interfaces:
Stats
,StatsLocal
,StatsRemote
public class StatsEJB extends Object implements StatsLocal, StatsRemote
This class provides an example of a Singleton EJB. The container will instantiate only one instance of this class and manage concurrent access to the instance.
-
-
Constructor Summary
Constructors Constructor Description StatsEJB()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
int
getDelta()
int
getTotal()
An example read method that the container will protect from other write methods, but allow concurrent read access.void
init()
void
open()
An example of a write method that the container will protect against other write and readers.void
reset()
-
-
-
Method Detail
-
init
@PostConstruct public void init()
-
open
public void open()
An example of a write method that the container will protect against other write and readers.
-
getTotal
public int getTotal()
An example read method that the container will protect from other write methods, but allow concurrent read access.
-
-