Configuration info for Command Parameters should include an "index"
-------------------------------------------------------------------

                 Key: TUSCANY-820
                 URL: http://issues.apache.org/jira/browse/TUSCANY-820
             Project: Tuscany
          Issue Type: Improvement
    Affects Versions: Java-Mx
            Reporter: Kevin Williams
             Fix For: Java-Mx


The configuration for command parameters should include an index.  As an 
example, the current SP example with an OUT parameter has the following 
associated config file:

<Config 
xsi:noNamespaceSchemaLocation="http:///org.apache.tuscany.das.rdb/config.xsd"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>

        <Command name="getNamedCustomers" SQL="{call GETNAMEDCUSTOMERS(?,?)}" 
kind="procedure">
                <Parameter direction="IN" columnType="commonj.sdo.String"/>
                <Parameter direction="OUT" columnType="commonj.sdo.IntObject"/>
        </Command>

</Config>

In keeping with our philosophy that only config that needs to vary from the 
defaults should be provided, the first parameter should not need to be defined 
since it is of the default IN type.  However, removing the first parameter 
definition results in the following error.

--------------------
java.lang.RuntimeException: SQL Exception: Parameter 1 cannot be registered as 
an OUT parameter because it is an IN parameter. 
        at 
org.apache.tuscany.das.rdb.impl.SPCommandImpl.executeQuery(SPCommandImpl.java:73)
        at 
org.apache.tuscany.das.rdb.test.StoredProcs.testGetNamedCustomers(StoredProcs.java:116)
--------------------

I assume this error is caused by the runtime inferring index positionally from 
the config input and the first parameter is necessary as a place holder in 
order for the OUT parameter to properly have an index of 2.
        



-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to