I read a lot on stackoverflow regarding the creation of singleton classes using enum. I must have missed something because i can't reach the INSTANCE anywhere.
this is my code:
public class UserActivity {
    private DataSource _dataSource;
    private JdbcTemplate _jdbcTemplate;
    static enum Singleton {
        INSTANCE;
        private static final UserActivity singleton = new UserActivity();
        public UserActivity getSingleton() {
            return singleton;
        }
    }
    public UserActivity() {
        this._dataSource = MysqlDb.getInstance().getDataSource();
        this._jdbcTemplate = new JdbcTemplate(this._dataSource);
    }
    public void dostuff() {
     ...
    }
}
and outside I'm trying to do
UserActivity.INSTANCE.getSingleton()
or
UserActivity.Singleton.
but eclipse's code completion doesn't find anything
thanks!
 
     
     
    