cdi project in initial revision
[utils] / support / cdi / src / test / java / org / wamblee / cdi / MySingleton.java
1 package org.wamblee.cdi;
2
3 import javax.enterprise.context.ApplicationScoped;
4
5
6 @ApplicationScoped
7 public class MySingleton {
8     
9     private static int instances = 0; 
10
11     public MySingleton() { 
12         System.out.println("Constructing object.");
13         instances++;
14     }
15     
16     public static int getInstances() {
17         return instances;
18     }
19 }