openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pedro Aquilino Sánchez (Created) (JIRA) <j...@apache.org>
Subject [jira] [Created] (OPENJPA-2101) PersistenceProductDerivation overwrites the RemoteCommitProvider configuration
Date Tue, 27 Dec 2011 15:06:30 GMT
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
            Reporter: Pedro Aquilino Sánchez


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

       

Mime
View raw message