I want to implement an DynamicImageResource
which will be mounted in a Wicket 6.7/Spring 3.2/JPA 2 application. This DynamicImageResource
shall retrieve information based on input parameters and create a response.
The question is: How can i access the DB from within DynamicImageResource.getImageData(...)
? I can't inject a @PersistenceContextenter code here
or a DAO via @SpringBean
. My last resort would be a static PersistenceContextFactory.
Any better ideas? Or best practices?