You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "Michael Dick (JIRA)" <ji...@apache.org> on 2010/08/13 00:09:15 UTC

[jira] Resolved: (OPENJPA-1668) User's ''DBDictionary.sequenceSQL' setting not being honored on zOS

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

Michael Dick resolved OPENJPA-1668.
-----------------------------------

    Fix Version/s: 1.3.0
                   2.0.1
       Resolution: Fixed

> User's ''DBDictionary.sequenceSQL' setting not being honored on zOS 
> --------------------------------------------------------------------
>
>                 Key: OPENJPA-1668
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1668
>             Project: OpenJPA
>          Issue Type: Bug
>    Affects Versions: 1.0.3, 1.2.2, 2.0.0
>            Reporter: Heath Thomann
>            Assignee: Heath Thomann
>            Priority: Minor
>             Fix For: 1.2.3, 1.3.0, 2.0.1, 2.1.0
>
>         Attachments: OPENJPA-1668-1.2.x.patch.txt
>
>
> When setting/overriding the 'DBDictionary.sequenceSQL' value via a property in the persistence.xml file, as follows:
> 	<property name="openjpa.jdbc.DBDictionary" value="db2(sequenceSQL='SELECT SCHEMA AS SEQUENCE_SCHEMA, NAME AS SEQUENCE_NAME FROM CIDB2.SYSSEQUENCES')"/>                                                        
> this value is not used when running DB2 on zOS.  Rather, the 'default for zOS' is used, i.e.: "SELECT SCHEMA AS SEQUENCE_SCHEMA, NAME AS SEQUENCE_NAME FROM SYSIBM.SYSSEQUENCES";.  
> To understand how this is happening, let me describe how 'sequenceSQL' is defined/set at runtime.  First, the ctor of DB2Dictionary is called, and the variable is set to a default:
>         sequenceSQL = "SELECT SEQSCHEMA AS SEQUENCE_SCHEMA, "
>             + "SEQNAME AS SEQUENCE_NAME FROM SYSCAT.SEQUENCES";
> After the DB2Dictionary ctor is called, openJPA assigns to 'sequenceSQL' the value defined in the system property.  So at this point things are all good and the variable is set to what is defined in the prop.  Where things go awry is when the method DB2Dictionary.connectedConfiguration is called.  In the method there is some platform specific code which is executed which overwrites the sequenceSQL value:
>        // platform specific settings
>         switch (db2ServerType) {
>         case  db2ZOSV8xOrLater:
> 		........
>             sequenceSQL = "SELECT SCHEMA AS SEQUENCE_SCHEMA, "
>                 + "NAME AS SEQUENCE_NAME FROM SYSIBM.SYSSEQUENCES";
> Thanks,
> Heath

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