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]

Reply via email to