Sample1 obj1 = theContainer.create(new SampleImple(10));
Sample1 obj2 = theContainer.create(new SampleImple(10));
Sample1 obj3 = theContainer.clone(new SampleImple(), obj1);
Sample1 obj4 = theContainer.clone(new SampleImple(), obj2);
It no longer matters whether they are @Pessimistic or @Optimistic (the default) - the syntax remains the same. Here we have two objects, obj1 and obj2 and two clones (copies) of them, obj3 and obj4. They're all recoverable (state will not survive a machine crash), since that's the default behaviour for Container, but that can be changed via the constructor which allows for PERSISTENT or RECOVERABLE to be specified at creation time.