db-jdo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Beams (JIRA)" <j...@apache.org>
Subject [jira] Commented: (JDO-540) Support for final modifier on fields of Persistence-Capable classes
Date Fri, 05 Oct 2007 17:34:54 GMT

    [ https://issues.apache.org/jira/browse/JDO-540?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12532730
] 

Chris Beams commented on JDO-540:
---------------------------------

Craig's comment from the JDO Conference Call on Sept 28th:

Attendees: Michelle Caisse, Michael Bouschen, Craig Russell

Agenda:

1. Support for final modifier on fields. There are a few issues with
making final fields persistent. First, the only difference between
final and private is that final protects the class writer from
accidentally changing the value of a final field; private protects
the class writer from external code. Except in both cases, using
reflection invalidates the protection. Second, the point at which the
final field is modified by the jdo implementation would need to be
carefully thought through. The final fields' values would have to be
changed during specific life cycle events, such as retrieval from the
datastore, flush, commit, rollback, etc. When exactly would the final
fields be set? And how does this affect the memory model guarantees?

Bottom line: We'd like to see some more justification and discussion
on the open questions raised above.

> Support for final modifier on fields of Persistence-Capable classes
> -------------------------------------------------------------------
>
>                 Key: JDO-540
>                 URL: https://issues.apache.org/jira/browse/JDO-540
>             Project: JDO
>          Issue Type: New Feature
>          Components: api2
>            Reporter: Chris Beams
>             Fix For: JDO 2 maintenance release 1
>
>
> Per changes introduced in Java5 as part of JSR-133, post-construction modification of
final fields is now possible when calling setAccessible(true) on a field via reflection.
> Heinz Kabutz gives a good discussion of the feature: http://www.javaspecialists.eu/archive/Issue096.html
> Supporting final on fields would make JDO even less intrusive than it already is, and
would allow users to create richer class definitions.
> Let's discuss...

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message