Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

A Big Bug or My Error

2009-09-17
2013-05-14
  • ding superman
    ding superman
    2009-09-17

    public static void main(String args) {
    CacheManager manager = CacheManager.create();
    Cache ca = new Cache("23", 3000, false, true, 20l, 50l);
    RegisteredEventListeners re = new RegisteredEventListeners(ca);
    CacheEventListener ce = new CacheEvent();
    boolean fl = re.registerListener(ce);
    System.out.println(fl);
    manager.addCache(ca);
    for (int i = 0; i < 100; i++) {
    Element element = new Element((""+i, ""+i);
    ca.put(element);
    System.out.println(ca.getSize());
    }
    }

    The CacheEvent do noting !
    The Ehcache can't use coding to register a Event ???
    Please help me ! It is a bug ,or my error !
    The CacheEvent is a Class implements CacheEventListener !

     
  • ding superman
    ding superman
    2009-09-17

        public static void main(String args) {
    CacheManager manager = CacheManager.create();
    Cache ca = new Cache("23", 3000, false, true, 20l, 50l);
    RegisteredEventListeners re = new RegisteredEventListeners(ca);
    CacheEventListener ce = new CacheEvent();
    boolean fl = re.registerListener(ce);
    System.out.println(fl);
    manager.addCache(ca);
    for (int i = 0; i < 100; i++) {
    Element element = new Element(""+i, ""+i);
    ca.put(element);
    System.out.println(ca.getSize());
    }
    }

     
  • ding superman
    ding superman
    2009-09-17

    " is "