Yes, I'm sorry. I was thinking of my "squeezer" implementation. The
persistence strategy will store the object in the session, but reattach it
when necessary. You're right.
> On 21. Apr 2006 - 14:44:59, James Carman wrote:
> | Basically, I copied the session persistence strategy implementation and
> | modified it a bit to actually just store the id of the persistent object
> in
> | the session.
>
> I've taken a look into your implementation in the meanwhile.
> No offense, but I don't see/understand why you're saying that you only
> store the id of the persistent object in the session:
>
> ---
> session.setAttribute(attributeName, entity == null ? null
> : new DetachedObject(entity, getSession()));
> ---
>
> In DetachedObject you do
>
> ---
> public DetachedObject( Object object, Session session )
> {
> this.object = object;
> reattachRequired = session.getSessionFactory().getClassMetadata(
> object.getClass() )
> .getIdentifier( object, EntityMode.POJO ) != null;
> }
> ---
>
> This means that you save the object in a DetachedObject and this _whole_
> DetachedObject in the WebSession afterwards, don't you?
>
> Wouldn't you have to call object.getId() or something like that in
> DetachedObject and save this in an private Integer instead?
>
> Kind regards,
> Andreas
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
James Carman, President
Carman Consulting, Inc.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]