You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "Albert Lee (Closed) (JIRA)" <ji...@apache.org> on 2012/02/02 18:20:53 UTC

[jira] [Closed] (OPENJPA-2101) PersistenceProductDerivation overwrites the RemoteCommitProvider configuration

     [ https://issues.apache.org/jira/browse/OPENJPA-2101?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Albert Lee closed OPENJPA-2101.
-------------------------------


Close issue in preparation for 2.2.0 release.
                
> PersistenceProductDerivation overwrites the RemoteCommitProvider configuration
> ------------------------------------------------------------------------------
>
>                 Key: OPENJPA-2101
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-2101
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: kernel
>    Affects Versions: 2.1.1, 2.2.0
>            Reporter: Pedro Aquilino Sánchez
>             Fix For: 2.2.0
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> If you set the property openjpa.RemoteCommitProvider to a value distinct from the default (for example "tcp" or "jms"), this value is overwritted with the default "sjvm".
> PersistenceProductDerivation uses a incorrect conditional to check if the value is empty. In this code:
>                // If the datacache is enabled, make sure we have a RemoteCommitProvider
>                String dc = oconf.getDataCache();
>                String rcp = oconf.getRemoteCommitProvider();
>                // If the datacache is set and is something other than false
>                if (dc != null && dc.equals("false") == false) {
>                    // If RCP is null or empty, set it to sjvm.
>                    if (rcp == null || (rcp != null && rcp.equals("") == false)) {
>                        oconf.setRemoteCommitProvider("sjvm");
>                    }
>                }
> The last conditional must be
> if (rcp == null || (rcp != null && rcp.equals(""))) {

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira