Are many people using Cayenne and Spring together? If so, how do you
have it configured? I'd like to avoid just binding DataContexts to
threads using a servlet filter, as I don't want to tie my application to
the web.
It's almost 3am, so bear with me here... :)
The layers of my application are (backend to frontend):
Database
Cayenne
DAOs
Services
Web Controllers
Each Service can reference multiple DAOs, and each Web Controller can
reference many Services.
The DAOs, Services and Controllers will by default be singletons in
Spring, and I'd rather keep them that way. Therefore I can't explicitly
set a DataContext on them within Spring's application context - they
would be shared by all threads.
Is there a good Spring-friendly way to bind a DataContext to each thread
as it enters my DAOs code? Or perhaps maintain a pool of DataContext
objects to be used by the DAOs?
Thanks!
-james
-- James A. Hillyerd <jame..illyerd.com> Java Software Engineer - ActiveRain.com
This archive was generated by hypermail 2.0.0 : Sat Dec 18 2004 - 05:52:55 EST