Search code examples
javapersistencedata-persistence

Super light weight java persistence layer needed


I need a super light weight persistence layer for a java app I'm writing. I need it to be a stand alone app and so far I've played with Ammentos & Persistence4J. I like them both (especially Ammentos) but I cannot find much on it on the web and I'm looking for some thoughts on these two or any other persistence layers that you think would be easy to deploy with a mysql db.

I've only used hibernate in the past so I'm looking for an alternative that just allows me to do simple saves and retrievals. Support for any complex queries is not needed.


Solution

  • Don't forget OrmLite.

    Make sure you need an ORM at all, though.

    Edit to respond to comment

    For simple Java projects (a rarity these days) I often don't bother with ORM, but still use Commons BeanUtils' RowSetDynaClass sometimes. This wraps query results and allows copying to domain objects using normal BeanUtils copyProperties-type methods.