I’m new to JPA, so forgive this question if this is pretty standard functionality, but can you use JPA without having a database and basically use it as a cache to store objects across your application? If so, is that standard practice?
I’m new to JPA, so forgive this question if this is pretty standard functionality,
Share
You could use JPA with an in memory database so it would effectively just be a cache, yes. Using it ‘without a database’ at all would take huge amounts of work to build a custom JPA provider that works against whatever your storage is. If it’s truly a full JPA implementation that simply leaves off the ‘Persistent’ part, you’d spend months if not years alone just reinventing the wheel to implement the query language against your non-RDBMS cache and so forth.
I haven’t worked everywhere, but personally would certainly not file such a setup under ‘standard practices.’ 🙂