Mantis Bugtracker
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] 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 quotemedia View Status public  
Assigned To
Priority urgent Resolution fixed  
Status closed   Product Version 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
Additional Information resin pro 3.0, cmp 2.x, beans
Attached Files

- Relationships

- Notes
(0000326)
quotemedia
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 quotemedia 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
30 total queries executed.
28 unique queries executed.
Powered by Mantis Bugtracker