Mantis - Resin
Viewing Issue Advanced Details
971 minor always 03-04-06 11:59 04-04-06 14:52
gzhu  
ferg  
urgent  
closed 3.0.18  
fixed  
none    
none 3.0.19  
0000971: CMP entity bean set method does not work after bean creation and before any non-Primary Key getter is called
In our case, this is wrapped within a transaction enabled stateless session bean.

A sample scenario is like this

CMP Entity bean "Foo"
    fields: id(ejb.pk), name, description
    method: ejbCreate(int id, String name)

-- start a transactional session bean ---

FooHome h = ..JNDI lookup...;
Foo f = h.create(10, "Some Name");
/** String myname = f.getName(); // a non-primary key getter **/
f.setDescription("Some Description");

--- end session bean ---

Above code will not set description field, but it will if you uncomment that getName line.

Not sure whether this will have the same incorrect behaviour if above code is not in the same transaction context.

Notes
(0001010)
ferg   
04-04-06 14:52   
ejb/0am3, ejb/0g0f