cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrus Adamchik (JIRA)" <j...@apache.org>
Subject [jira] [Created] (CAY-1831) CayenneRuntime.getContext - replace with newContext
Date Sun, 26 May 2013 20:01:20 GMT
Andrus Adamchik created CAY-1831:
------------------------------------

             Summary: CayenneRuntime.getContext - replace with newContext
                 Key: CAY-1831
                 URL: https://issues.apache.org/jira/browse/CAY-1831
             Project: Cayenne
          Issue Type: Task
            Reporter: Andrus Adamchik
            Assignee: Andrus Adamchik
            Priority: Minor
             Fix For: 3.2M1


Unlike other CayenneRuntime "getXyz" methods that return singletons (where "get" prefix is
justified), "getContext" is creating a new context on every call. We need more apt naming,
such as "newContext".

In fact I thought about this inconsistency initially when designing CayenneRuntime, but left
it like that on assumption that CayenneRuntime will be managing its ObjectContexts scope.
So in some situations it would return the same context multiple times. In practice managing
OC scopes is always done outside Cayenne DI, and it should not normally try to interfere here.
So this renaming will reduce confusion about the behavior of the method.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message