From: Urberg, J. <ju...@ve...> - 2002-08-05 13:30:47
|
>> 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. Is this kind of setup what you created the hibernate.cfg.xml for? Should we also allow using that file instead of passing in all the information in the JMX config? > (I am not a fan of entity beans, actually.) Me neither. I'm creating DAO objects for each session bean to wrap all the interaction with hibernate. > Anyway, I think we should support JMX because that seems > to be the standards-oriented way of doing things like this. Sounds good. I'll test it out this week. Thanks, John |