
package counter.ejb;

import javax.ejb.ConcurrencyManagement;
import javax.ejb.ConcurrencyManagementType;
import javax.ejb.Lock;
import javax.ejb.LockType;
import javax.ejb.Singleton;
import javax.interceptor.Interceptors;

@Singleton
@ConcurrencyManagement(ConcurrencyManagementType.BEAN)
public class CounterBean {
    private int hits = 1;

   
     @Interceptors(LogInterceptor.class)
   synchronized public int getHits() {
        return hits++;
    }
}
