Mantis Bugtracker
  

Viewing Issue Advanced Details Jump to Notes ] View Simple ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0000291 [Resin] minor always 06-30-05 00:00 11-30-05 14:43
Reporter user241 View Status public  
Assigned To
Priority urgent Resolution fixed Platform
Status closed   OS
Projection none   OS Version
ETA none Fixed in Version 3.0.15 Product Version 3.0.13
  Product Build 3.0.13
Summary 0000291: business methods in ejb 2.x beans in amber always cause reload from database
Description RSN-330
in resin 3.x, if a wrapper business method is called on a cmp bean, it always causes the bean to reload, regardless of it's cache/read-only state. if only the individual persistent field getters are called then it observes cache/read-only behavior. this worked fine in resin 2.x.

eg. in the below (and attached) cmp bean, if the getDetails method of the bean is called, then it reloads the bean from the db, but if the individual getters are called, it doesn't

WMDataEntitlement myBean = ... // load from cache
EntitlementDetails details = new EntitlementDetails(myBean.getEntitlement(), myBean.getDatatype()); // the getters obey cache/read-only state
EntitlementDetails details = myBean.getDetails(); // this *always* causes bean to reload from db query


public interface WMDataEntitlement extends EJBLocalObject {
    
  Webmaster getWebmaster();
  EntitlementDetails getDetails();
  String getEntitlement();
  String getDatatype();
}

abstract public class WMDataEntitlementBean extends com.caucho.ejb.AbstractEntityBean {
    
    abstract public Webmaster getWebmaster();
    abstract public String getDatatype();
    abstract public String getEntitlement();

    ...

    public EntitlementDetails getDetails() throws EJBException {
        return new EntitlementDetails(getDatatype(), getEntitlement());
    }
}

cheers
christian
Steps To Reproduce
Additional Information resin pro 3.0, cmp 2.x, beans
Attached Files

- Relationships

- Notes
(0000326)
user241
06-30-05 00:00

attached are the 3 parts of the bean implementation, local/home/bean
 
(0000327)
ferg
06-30-05 00:00

ejb/0897
 

- Issue History
Date Modified Username Field Change
06-30-05 00:00 user241 New Issue
11-30-05 00:00 administrator Fixed in Version  => 3.0.15
11-30-05 14:43 ferg Status resolved => closed


Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
36 total queries executed.
28 unique queries executed.
Powered by Mantis Bugtracker