|
From: Rod J. <ro...@in...> - 2004-12-20 10:39:45
|
Thanks. None of the core Spring developers is a Cayenne expert AFAIK, but we would certainly be happy to help the Cayenne community achieve integration. Note that Oracle have now released a Spring/TopLink integration. (http://www.oracle.com/technology/products/ias/toplink/preview/spring/index.html). This will be supported by Oracle moving forward. The experience of the TopLink integration is that Spring's Hibernate and JDO integrations provide an excellent architectural template which works well for other ORM products. Hopefully this should also be useful to a Cayenne implementation. Rgds Rod Peng Wang wrote: > I saw this message on cayenne list, so I move it here, hope someone can help. > > > ---------- Forwarded message ---------- > From: Andrus Adamchik <an...@ob...> > Date: Sat, 18 Dec 2004 13:16:31 -0500 > Subject: Re: Cayenne + Spring? > To: cay...@ob... > > > Hi James, > > >>Are many people using Cayenne and Spring together? > > > I know that many are waiting till the "official" integration, but if > someone implemented their own Spring factories for Cayenne stack, > please send us a note with your examples. Just yesterday I started > doing the research of the steps needed for such integration, so I have > the same question as James. > > > >>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? > > > Pool is not a good idea! DataContext itself is lightweight, so creating > one on the fly is not a problem. Its value (in addition to storing > uncommitted state between requests) is that it caches only objects > relevant to a given user session, so there is a high probability of > cache reuse. A cached DataContext will simply hog extra memory and > won't add much value over the shared cache provided by DataDomain. > > Now how you do it in Spring, I have no idea... There gotta be an easy > way to access user session before you pass control to DAO. Spring > couldn't possibly be that popular if all it does is serving stateless > applications.. I just don't know what it is. Do you store any other > state in the session? How do you access it from controller? > > > Andrus > > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real users. > Discover which products truly live up to the hype. Start reading now. > http://productguide.itmanagersjournal.com/ > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer > -- ____________________________________________________ Rod Johnson CEO, Interface21 - Spring Services from the Source http://www.springframework.com Founder, Spring Framework: http://www.springframework.org Author, "Expert One-on-One J2EE Development Without EJB" (May 2004, with Juergen Hoeller). http://www.amazon.com/exec/obidos/ASIN/0764558315/ Author, "Expert One-on-One J2EE Design and Development" (October 2002). http://www.amazon.com/exec/obidos/tg/detail/-/0764543857/ ____________________________________________________ Interface21 Limited Registered Office Summit House, 2-2a Highfield Road, Dartford, Kent DA1 2JY Registered in England and Wales No. 5187766 ____________________________________________________ |