[jboss-jira] [JBoss JIRA] Closed: (JBAS-5793) Array interception for pojos stored in FIELD granularity web sessions
Brian Stansberry (JIRA)
jira-events at lists.jboss.org
Wed Aug 27 17:13:38 EDT 2008
[ https://jira.jboss.org/jira/browse/JBAS-5793?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Brian Stansberry closed JBAS-5793.
----------------------------------
Resolution: Done
> Array interception for pojos stored in FIELD granularity web sessions
> ---------------------------------------------------------------------
>
> Key: JBAS-5793
> URL: https://jira.jboss.org/jira/browse/JBAS-5793
> Project: JBoss Application Server
> Issue Type: Feature Request
> Security Level: Public(Everyone can see)
> Components: Clustering, Web (Tomcat) service
> Reporter: Brian Stansberry
> Assignee: Brian Stansberry
> Fix For: JBossAS-5.0.0.CR2
>
>
> PojoCache 2.2.0.CR5+ supports array interception. Task here is to uncomment the section in jbossweb-cluster.aop/META-INF/jboss-aop.xml that enables it and add a couple tweaks to the FIELD test cases so it gets exercised.
> This can't be done until aop moves to 2.0.0.CR14.
> Array interception means invoking the changeIt(...) method in a web session pojo would result in the change being detected and just one String being replicated:
> public class Pojo {
> private String[] array = new String[1000];
> public void changeIt(int index, String newValue) {
> this.array[index] = newValue;
> }
> }
> Before this PojoCache improvement, PC wouldn't detect the array element change, so the changeIt(...) method would have had to reassign the 'array' field:
> public class Pojo {
> private String[] array = new String[1000];
> public void changeIt(int index, String newValue) {
> String[] array1 = array;
> array1[index] = newValue;
> // Do a new field assignment so PojoCache knows something changed
> this.array = array1;
> }
> }
> Besides being odd looking and easy to forget to do, that code would result in the whole array being replicated rather than just one String.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list