======================= FIRST PLACEHOLDER DRAFT ======================= Observations on current architecture (2008-06-08): -------------------------------------------------- - we are currently rather hard-coded to SimDB - we use JPA with the application managed persistence context approach For processing a generic model we need to: ------------------------------------------ - validate, then generate code from model Mainly done, maybe make room for custom testing and configuration - allow custom test code to be used Need user to indicate where test classes are, what Main is. - allow custom configuration Need to cut out code fragments that are hard-coded for SimDB. Example, ModelFactory, MetaModelFactory, JPAFactory - allow running in custom context Implies we need to be able to get (Meta)ModelFactory etc from ... Following fixes proposed: ------------------------- - Remove MetaModelFactory instance from MetadataElement. - can/should we use @PersistenceContext - add a TransientObjectManager to ModelFactory (or have ModelFactory play that role) - how do we ensure this object is added to MetadataObject? Use threadlocal? - Add a JPA PostLoad event to MetadataObject to set a TransientObjectManager