a) fetching won't work because it's a one-to-many set, and there's no HQL to modify:
Code:
<set name="legacyInfos"
table="LT_LEGACY_XREF"
cascade="all"
inverse="true"
lazy="true">
<key column="OID"/>
<one-to-many class="com.unisource.ec.schema.account.LegacyAccountInfo"/>
</set>
b) single vm is not applicable here
c) i'm keeping the session open, i.e., i only call session.disconnect(), and i only call session.close() upon an ejbRemove(). i was hoping this would solve the problem, but it doesn't help because of the session factory lookup problem.
so basically, what you're saying what i'm trying to do is not possible.
i would not like to completely populate the object unless the client code explicity calls the getters that return the lazy collections, ofcourse, for performance reasons -- wasn't that your idea behind lazy collections anyway?
PS: since, hibernate is going to be a core part of the new jboss (4?), are you guys planning to write a hibernate/ejb best practices framework document? that would help a lot of people out, it would have save me a couple of weeks.
thanks so much for your help, unless there's more you could add to resolve my dilemma