You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Harsha Hegde (Created) (JIRA)" <ji...@apache.org> on 2011/10/11 09:58:29 UTC

[jira] [Created] (CXF-3853) RMTxStore: Vendor specific condition check

RMTxStore: Vendor specific condition check
------------------------------------------

                 Key: CXF-3853
                 URL: https://issues.apache.org/jira/browse/CXF-3853
             Project: CXF
          Issue Type: Bug
          Components: JAX-WS Runtime
            Reporter: Harsha Hegde


While using the reliable messaging in the CXF. The condition checks to create Database tables for a given RM store is vendor specific. As the method which does this check is private static, this behavior cannot be overridden.
In the class org.apache.cxf.ws.rm.persistence.jdbc.RMTxStore the while initializing the RM store the method isTableExistsError is hard coded with vendor error codes for derby and oracle, so if we use any other RDBMS underneath then we run into errors that the tables already exists. As this method is private static this cannot be overridden either.
Please provide means to have vendor independent checks.

--
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

        

[jira] [Updated] (CXF-3853) RMTxStore: Vendor specific condition check

Posted by "Daniel Kulp (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-3853?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Daniel Kulp updated CXF-3853:
-----------------------------

    Fix Version/s: 2.3.8
    
> RMTxStore: Vendor specific condition check
> ------------------------------------------
>
>                 Key: CXF-3853
>                 URL: https://issues.apache.org/jira/browse/CXF-3853
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-WS Runtime
>            Reporter: Harsha Hegde
>            Assignee: Aki Yoshida
>             Fix For: 2.3.8, 2.4.4, 2.5
>
>
> While using the reliable messaging in the CXF. The condition checks to create Database tables for a given RM store is vendor specific. As the method which does this check is private static, this behavior cannot be overridden.
> In the class org.apache.cxf.ws.rm.persistence.jdbc.RMTxStore the while initializing the RM store the method isTableExistsError is hard coded with vendor error codes for derby and oracle, so if we use any other RDBMS underneath then we run into errors that the tables already exists. As this method is private static this cannot be overridden either.
> Please provide means to have vendor independent checks.

--
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

        

[jira] [Commented] (CXF-3853) RMTxStore: Vendor specific condition check

Posted by "Aki Yoshida (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-3853?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13136075#comment-13136075 ] 

Aki Yoshida commented on CXF-3853:
----------------------------------

Initially, I was thinking of introducing some properties in the store configuration. But this will require a change in the configuration schema and hence will require more thought to find the best solution. 

Therefore, for now, I think we should provide a simpler less-invasive approach, namely changing the isTableExistsError method of RMTxStore to a protected instance method so that you can write your own RMTxStore to overwrite this method.

This means, you can write your store as:

{code}
package demo.cxf.ws.rm.persistence.jdbc;

import java.sql.SQLException;

import org.apache.cxf.ws.rm.persistence.jdbc.RMTxStore;


public class MyCustomRMStore extends RMTxStore {
    private static final String MYDB_TABLE_EXISTS_STATE = "I6000";

    @Override
    protected boolean isTableExistsError(SQLException ex) {
        return MYDB_TABLE_EXISTS_STATE.equals(ex.getSQLState());
    }

}
{code}

and you can instantiate this bean and set to it the rm-manager's store.
{code}
<bean id="testStore" class="demo.cxf.ws.rm.persistence.jdbc.MyCustomRMStore">
    <property name="driverClassName" value="..."/>
    <property name="userName" value="..."/>
    <property name="password" value="..."/>
    <property name="url" value="jdbc:..."/>
</bean>
{code} 

                
> RMTxStore: Vendor specific condition check
> ------------------------------------------
>
>                 Key: CXF-3853
>                 URL: https://issues.apache.org/jira/browse/CXF-3853
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-WS Runtime
>            Reporter: Harsha Hegde
>            Assignee: Aki Yoshida
>
> While using the reliable messaging in the CXF. The condition checks to create Database tables for a given RM store is vendor specific. As the method which does this check is private static, this behavior cannot be overridden.
> In the class org.apache.cxf.ws.rm.persistence.jdbc.RMTxStore the while initializing the RM store the method isTableExistsError is hard coded with vendor error codes for derby and oracle, so if we use any other RDBMS underneath then we run into errors that the tables already exists. As this method is private static this cannot be overridden either.
> Please provide means to have vendor independent checks.

--
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

        

[jira] [Assigned] (CXF-3853) RMTxStore: Vendor specific condition check

Posted by "Aki Yoshida (Assigned) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-3853?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Aki Yoshida reassigned CXF-3853:
--------------------------------

    Assignee: Aki Yoshida
    
> RMTxStore: Vendor specific condition check
> ------------------------------------------
>
>                 Key: CXF-3853
>                 URL: https://issues.apache.org/jira/browse/CXF-3853
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-WS Runtime
>            Reporter: Harsha Hegde
>            Assignee: Aki Yoshida
>
> While using the reliable messaging in the CXF. The condition checks to create Database tables for a given RM store is vendor specific. As the method which does this check is private static, this behavior cannot be overridden.
> In the class org.apache.cxf.ws.rm.persistence.jdbc.RMTxStore the while initializing the RM store the method isTableExistsError is hard coded with vendor error codes for derby and oracle, so if we use any other RDBMS underneath then we run into errors that the tables already exists. As this method is private static this cannot be overridden either.
> Please provide means to have vendor independent checks.

--
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

        

[jira] [Resolved] (CXF-3853) RMTxStore: Vendor specific condition check

Posted by "Aki Yoshida (Resolved) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-3853?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Aki Yoshida resolved CXF-3853.
------------------------------

       Resolution: Fixed
    Fix Version/s: 2.5
                   2.4.4
    
> RMTxStore: Vendor specific condition check
> ------------------------------------------
>
>                 Key: CXF-3853
>                 URL: https://issues.apache.org/jira/browse/CXF-3853
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-WS Runtime
>            Reporter: Harsha Hegde
>            Assignee: Aki Yoshida
>             Fix For: 2.4.4, 2.5
>
>
> While using the reliable messaging in the CXF. The condition checks to create Database tables for a given RM store is vendor specific. As the method which does this check is private static, this behavior cannot be overridden.
> In the class org.apache.cxf.ws.rm.persistence.jdbc.RMTxStore the while initializing the RM store the method isTableExistsError is hard coded with vendor error codes for derby and oracle, so if we use any other RDBMS underneath then we run into errors that the tables already exists. As this method is private static this cannot be overridden either.
> Please provide means to have vendor independent checks.

--
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