2 Replies Latest reply on Jun 29, 2006 4:24 PM by Brian Stansberry

    Integration issue w/ 1.4.0.CR2 and JBoss AS 4.0.4

    Brian Stansberry Master

      Just an FYI to the community about a minor JBC/JBoss AS integration issue, as well as a follow up comment to Ben re: a phone discussion we had this AM.

      For JBC 1.4.0.CR2, we changed the internal workings of the CachedType class (see http://jira.jboss.com/jira/browse/JBCACHE-653 for why). This led to a change in the return type of CachedType.getFields from List{Field} to List{FieldPersistentReference}.

      This change prevents the use of 1.4.0.CR2 in AS 4.0.4 as it leads to a CCE in the HttpSession repl code.

      This has been fixed in Branch_JBossCache_1_4_0, so the integration will not be an issue in 1.4.0.GA.

      Ben, here's what I did:

      1) CachedType.getFields() makes a defensive copy of the internal fields list. When making the copy it converts from FieldPersistentReference to Field. This fixes the issue for 4.0.4.

      2) The above is inefficient for internal uses of getFields() as it makes an unnecessary copy. So, I added a new method CachedType.getFieldsIterator(). This returns a trivial custom iterator that wraps the iterator over the CachedType.fields member, overriding next() to translate from the FieldPersistentReference to Field. With this change, FieldPersistentReference is no longer exposed outside of CachedType.

      3) Changed the internal PojoCache uses of CachedType.getFields() to use CachedTypes.getFieldsIterator().


      Please let me know when it's OK to port this to JBC HEAD.