- License - interface which defines various methods related to licensing
- LicenseImpl implements License - note these (the interface and the implementation) are POJO's (plain old Java objects)
- LicenseBean extends LicenseImpl implements SessionBean - the License session bean which inherits from a POJO
- LicenseRemote extends License, EJBObject - this is the EJB's remote interface, extends the POJO interface
- LicenseFactory - a factory class which decides whether to return an EJB (LicenseBean) or a POJO (LicenseImpl) based on some criteria, in any case it returns an instance of License.
This this was done so that the LicenseImpl implementation could be used outside of the EJB server if needed, therefore it is a POJO.
My questions are as follows:
- Has anyone seen this being done anywhere?
- Is this spec compliant?
- Do you think this is a good design?
Thanks,