01: package org.mockejb;
02:
03: /**
04: * You can cast any home to this interface and call its create method.
05: * Create method will create a new bean's instance and set the context.
06: * For session beans, it will call the
07: * parameterless ejbCreate if it exists for. It will not call ejbCreate if the
08: * parameterless ejbCreate does not exist.
09: *
10: * For entity beans (BMP and CMP), no ejbCreate/ejbPostCreate method will be called.
11: *
12: * This can be used, for example, for BMP entity beans to initialize the bean from
13: * the "back door" without inserting a database record (i.e., calling the actual ejbCreate).
14: *
15: * @author Alexander Ananiev
16: */
17: public interface GenericHome {
18:
19: public Object genericCreate();
20:
21: }
|