findByPrimaryKey() & ejbStore()
grohlFeb 20 2009 — edited Feb 25 2009Hi:
I'm running a J2EE 1.3 application in SunOne Application Server 7.1.
I've seen a strange issue and I'd like ask you if is a standard behaviour:
if I get a local reference of a entity bean (CMP) with findByPrimaryKey() and I don't set any field, container doesn't perform commit on database but executes ejbStore()
For example
public void m()
{
[...]
EntityLocal entity = entityHome.findByPrimaryKey(pk)
[...don't set any field in 'entity' ...]
}
( The method is executed in a new transaction )
So, although container doesn't commit , it invoke ejbStore()
Why ? Is it a propietary behaviour ? Is right ?
Thanks
Regards