Re: Another source of confusion.....
Mike Cannon-Brookes <[email protected]>
| Newsgroups | gmane.comp.java.open-symphony.devel |
|---|---|
| Message-ID | <BB55B4A0.3023F%[email protected]> |
>> These files are required as if you want to do your >> own session management >> with Hibernate, you need to provide your own DAO >> implementation. Otherwise >> the PropertySet DAO does the flush/close and your >> performance goes down the >> toilet. > > You like to say that opensymphony implementation is > designed with poor performance in mind :) ? > Well, there are some thing in propertyset which can > be done better ( some patches from me are there ). No, it's because Hibernate necessitates that. The default implementation DOES work, but it's very slow due to lots of connections opened/closed. Writing your own implementations will speed things up almost 100x for serious apps. (And it's very simple to do). > And because it seems that both of them ( ps & osu ) > are finally in permanent location it would be > easier to understand what's going on. Indeed. >> The recommended method of using this is: >> - Implement HibernateConfigurationProvider yourself >> - Make it return your own DAO, which implements the >> DAO interface >> - Use DAOUtils class to fill in the body of methods >> which are long and >> laborious to recreate (see DAOImpl) > > So you mean: leave session management to DAOImpl and > let DAOUtils do other work? Yes - exactly. For instance in our application we have a ThreadLocal and a ServletFilter which handle the Hibernate session management stuff. So our DAOImpl is very simple (usually one line per method). > BTW, I would like to have some new features: > - clearing/removing propertyset > - bulk load of properties by prefix / without prefix > - also removal by prefix. > I like to have later 2 because I'm storing user > profiles in property set marshalling classes to there. > I construct property name from class name + property > name - it's not wise to read each property in its own > session. Sure - feel free to add them? M ------------------------------------------------------- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01