Compare Revisions

Regard whitespace Rev 37 → Rev 38

19,17 → 19,19
public void testGenericComponent() throws Exception {
// in real life this will be a SessionFactory, a ConnectionPool or any factory...
SomeFactory factory = new SomeFactory();
Container c = new MentaContainer();
// giveMeSomething => method that will be called to return object
Component generic = new GenericComponent("myFactory", factory, "giveMeSomething");
String s1 = (String) c.get("myFactory");
Thread.sleep(5); // so strings are different... my cpu is fast! :-)
String s2 = (String) c.get("myFactory");