[ 
https://issues.apache.org/jira/browse/OPENJPA-477?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12561111#action_12561111
 ] 

Pinaki Poddar commented on OPENJPA-477:
---------------------------------------

1. Some changes are making a private instance variables protected. A better 
pattern will be to retain the variables as private and add corresponding 
getter. That way the base class can exert more control in the getter (for 
example, providing an unmodifiable copy in some cases) especially when changing 
the the instance variable below the hood can have adverse impact on the base 
class. 

2. Some changes are redundant. For example, in JDBCStoreManager

-    private void connect(boolean ref) {
+    protected void connect(boolean ref) {

  This class already provides for such extension. See the following the same 
class
    /**
     * Connect to the database. This method is separated out so that it
     * can be overridden.
     */
    protected RefCountConnection connectInternal() throws SQLException {
        return new RefCountConnection(_ds.getConnection());
    }

or this one in TableJDBCSeq 
-    private transient JDBCConfiguration _conf = null;
+    protected transient JDBCConfiguration _conf = null;

  when this class already has 
    public JDBCConfiguration getConfiguration() {
        return _conf;
    }

 
  

> making StoreManager more flexible and extensible.
> -------------------------------------------------
>
>                 Key: OPENJPA-477
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-477
>             Project: OpenJPA
>          Issue Type: Improvement
>          Components: kernel
>    Affects Versions: 1.0.2
>            Reporter: Daniel Lee
>             Fix For: 1.0.2, 1.1.0
>
>         Attachments: OPENJPA-477-trunk612523.patch, OPENJPA-477.patch
>
>
> The OpenJPA StoreManager needs some modifications to make it more flexible 
> and extensible.  For example, some private methods and attributes need to 
> made either public or protected.  The attached patch identifies the areas 
> that have been identified thus far.  Please let me know if there are any 
> concerns.  Many thanks in advance.

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

Reply via email to