From: Gavin_King/Cirrus%<CI...@ci...> - 2002-08-05 13:18:19
|
>I've switched >to the one mapping per class strategy (that seems to be the prefered way to >use Hibernate) and the whole JMX bean thing doesn't make as much sense with >that approach. I now just build a static SessionFactory in my data access >object for only the classes which that DAO uses and don't bother with a >SessionFactory bound in JNDI. I think it still makes sense. Depends upon what kind of design you're using. My preferred approach is to have a single SessionFactory + talk to that directly from session beans. That way I have access to all classes at once, which is good if theres complex associations in the object model. If I would be using entity beans, the approach you describe would make more sense. (I am not a fan of entity beans, actually.) The preference for a single mapping document per class is (for me) more to do with keeping the codebase manageable in a team environment. Anyway, I think we should support JMX because that seems to be the standards-oriented way of doing things like this. Gavin |