Women in Technology

Hear us Roar



Article:
  What's Wrong with the EJB 2 Specification?
Subject:   Is ejbRemove really that bad?
Date:   2002-09-05 09:33:44
From:   sbalan
Hi,


I am not an expert at EJBs but I think the basic reason why ejbRemove behaves differently for session beans and entity beans is that session beans and entity beans are fundamentally different. when a client calls remove on a session bean, the session bean can be resued for some other client. it is not a shared entity. however entity beans are shared entities which means remove actually frees it up for access by someother client.


i think since this fundamental difference exists it is reasonable that ejbRemove behaves differently for session and entity beans.

Main Topics Oldest First

Showing messages 1 through 1 of 1.

  • Is ejbRemove really that bad? - Correction
    2002-09-05 09:38:32  sbalan [View]

    Well,
    i shld probably rephrase. entity beans go into persistent stores however session beans don't. so ejbRemove can't actually remove the session bean. it can only move it to the pooled state.

    however for entity beans, ejbRemove will actually remove it from the database. so in this case, you need two calls one to take the bean back to the pool and one to actually destroy it. so we have two different methods.

    for session beans, its all the same coz there is no actual destruction involved. so I guess its oj there is only method.

    once someone understands the fundamental differences between session and entity beans, i think they can see why ejbRemove behaves differently for each of them.