Javelin: the JDJ 'World Class Award' winning, leader in visual, model driven Java development since 1996!
try it FREE for 15 days and realize the benefits and efficiencies of managing a POJO based domain model via live class diagrams instead of a plethura of text files.
exPOJO: feedback, contributions, questions, suggestions:
|expose your POJOs!|
Version 3.2.1 just released!
So you are confident in your ability to develop well engineered, robust and reusable domain model objects (POJOs) and you thought that now that popular transparent persistence technologies like JDO and Hibernate (ORMs) have matured that it should be an easy job to persist your POJOs and use simple dependency injection.... well then you took it a step further and from your reading 'assumed' that you must jump on the learning curve of some well known, heavy weight, steep learning curve, high jar dependency frameworks et al. You were hoping that the 'nirvana' that is 'transparent persistence' was going to be a lot, God damn, more easier than what it seemed from your initial reading - and you were right in hoping that but your frustration at the apparent difficulty of something that should be 'so easy' could mean that you just haven't found the right tool yet!
Welcome to exPOJO, the light weight, dependency injection, persistence engine wrapping, model exposing framework, that is the fastest and easiest way to persist your POJO domain model in a web or desktop application environment using your favourite popular transparent persistence engine: whether that be JDO or Hibernate. exPOJO is all about exposing POJOs that make up your object model - it has no reference or dependencies on any particular user interface framework: it can work with any framework eg., Wicket, Echo, JSP, JSF, Struts, Tapestry etc.,
exPOJO is a free, open source, light weight framework, for use in open source and commercial projects, that makes it simple and easy to build sophisticated web and desktop applications using the exciting and highly productive "Exposed Domain Model pattern" popularized in Chris Richardson's excellent book: "POJOs IN ACTION" published by Manning (exPOJO is not associated with the author nor the publisher - we just think they've done an excellent job of telling the world about an excellent pattern/architecture for the highly productive development of object oriented web and desktop applications).
Version 2.x has a more simplified design and moves responsibility of ModelExposer creation from the ExpojoServletContextListener to the ModelExposerFactory meaning exPOJO can be used equally well for web and non web oriented purposes - this includes background, non HTTP servicing, threads of a web application.
Extra methods have been added to PersistenceManager to expose more of the native ORM's Session/PersistenceManager.
Version 1.4 gives much more control over what happens at the time a PersistenceProvider (JDO=Persistencemanager, Hibernate=Session) is attached/detached to/from the current thread.
It also provides a more efficient mechanism for retrieving model exposer components (Services and Repositories) and adds some extra convenience methods as well.
Version 1.3 now makes dependency injection possible without requiring any changes to your source code via a new Servlet filter. Simply add a few lines to your web.xml file and every class in your system has access to the ModelExposer object instance appropriate to the current session - avoiding the clutter and burden of any 'per class' XML entries.
Download exPOJO (<1MB)
Download complete JAR bundle required for above example
(includes exPOJO, JPOX and compact Hypersonic SQL database + auxiliary jars)
To view the class diagrams in the examples you might also want to download the freeware Javelin Modeler. If you want to make changes to the classes via the class diagrams and automatically update the underlying code and ORM meta data then download a trial of the Javelin Modeler + Coder
|1.0||2007/1/16||First public release|
|1.1||2007/1/17||Added support for Hibernate persistence.|
|1.2||2007/3/8||Redistributed under changed licensing to allow free use in commercial applications.|
|1.3||2007/9/12||Codeless dependency injection via a new exPOJO servlet filter.|
Added Javadoc pages.
ExpojoServletFilter now accesses correct root exception via getRootCause().
|1.3.2||2008/5/31||Added flushChanges to assist
when your ORM generates FK constraints when committing complex
object graphs with cyclic references.
Added an updated JDOQueryResultCollection from Guido to make clean up of query resources completely automatic when the caller has finished with them.
|1.3.2||2008/8/17||Added option to force cache refresh. Do force a cache refresh (and so update a particular persistence provider's cached objects to reflect any changes made by other persistence providers) pass in refreshCache="1" in a HTTP request. Use sparingly as performing a refresh on every HTTP request will most likely degrade performance as refreshAll can be an expensive operation if the persistence provider cache (L1) has many objects.|
|1.4||2009/11/11||Support Object ID rather
than String identification of ModelExposerComponentS. The use of
Strings as keys in a HashTable is extremely innefficient because
of the complex algorithm executed within the String.hashCode()
method. Integers or even Class objects make a much more
efficient and convenient key type in HashTables.
Uses more efficient HashMap instead of HashTable. HashMap is unsychronized and as we only ever make changes to the collection during initialization being unsynchronized is fine.
Added ThreadBindListener to allow an application to listen on thread attachment/detachment and perform any extra processing.
Added convenience static method on PersistenceProvider to obtain the PP for the current thread.
Enhanced HTTP request processing to allow the ExpojoServletContextListener to control the creation/usage of a ModelExposer at each request. Previously a new ModelExposer was created for every new session - this gets expensive with so many search robots trolling the site with no session tracking capabilities because we end up creating a new PM for every request - nasty. The application can now override establishModelExposer and reuse the same PM for search engine requests based on agent ID if the application developer chooses to do so.
|2.0.1||2011/3/28||New simplified design of ExpojoServletContextListener and
PersistenceProviderFactory replaced by ModelExposerFactory.
New methods added to PersistenceProvider.
The download contains compiled jars and all source code. The distribution is divided into 3 sub libraries which each build an appropriately named jar file: core, jdo and hibernate. Separating the core library from the libraries specific to the various persistence engines means that it's not necessary to download jars for persistence engines that you are not using in order to compile the libraries you are interested in. As the "Mock" persistence classes have no dependency on any real persistence engine jars they are included in the core library.
In order to build your project with exPOJO you only need expojo_core-x.y.jar and expojo_engine-x.y.jar where engine is either jdo or hibernate.
Note for users of the Echo2 exPOJO Mod
exPOJO now supports OpenSessionInView (Hibernate) and OpenPersistenceManagerInView (JDO) in view and dependency injection without any code changes to the framework. Thus the Echo2 mod is no longer required if that is the UI framework you use. Simply download the latest Echo2 jars from the Echo site.
For exPOJO feedback, contributions, questions, suggestions please visit: http://expojo.blogspot.com
1996, 2019 Step Ahead Software Pty Ltd. All rights reserved.
Java™ and Java™-based marks are trademarks or registered trademarks of Sun Microsystems.
Flash™ is a trade mark of Macromedia Inc.