Patches item #1028004, was opened at 2004-09-14 17:37
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=376687&aid=1028004&group_id=22866

Category: JBossCMP
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: frank (nfrank)
Assigned to: Nobody/Anonymous (nobody)
Summary: fix parameters limit (which limit max-bean-age to 24 days!)

Initial Comment:
The code in LRUEnterpriseContextCachePolicy.java does 
not allow to provide a max-bean-age > 24days :

int p = Integer.parseInt(op);
             if (p <= 0) {throw new DeploymentException
("Overager period can't be <= 0");}
            m_overagerPeriod = p * 1000;

while the m_overagerPeriod is correctly declared as long, 
the parameter is read from configuration file as an 
integer. But much worse is the next line where the int 
value is multiply by 1000 --> this lead that if you don't 
want an integer overflow to provide a max value of 
2^31/1000 (int max value/1000) which is about 24 days 
(I need long duration cache for values that take me 
hours to computed and that won't change for 1 or 2 
monthes)!

So my patch fix this by making the p parameter a long. I 
did it for all parameters retrieved from the configuration 
file.


The problems is present on the 3.2.x branch (last cvs 
version), I didn't look at 4.x version but I guess the 
problem is also there.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=376687&aid=1028004&group_id=22866


-------------------------------------------------------
This SF.Net email is sponsored by: thawte's Crypto Challenge Vl
Crack the code and win a Sony DCRHC40 MiniDV Digital Handycam
Camcorder. More prizes in the weekly Lunch Hour Challenge.
Sign up NOW http://ad.doubleclick.net/clk;10740251;10262165;m
_______________________________________________
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to