You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Anurag Shekhar (JIRA)" <de...@db.apache.org> on 2006/02/27 14:15:54 UTC

[jira] Created: (DERBY-1059) call to stored procedure with out params fails in embedded driver

call to stored procedure with out params fails in embedded driver
-----------------------------------------------------------------

         Key: DERBY-1059
         URL: http://issues.apache.org/jira/browse/DERBY-1059
     Project: Derby
        Type: Sub-task
  Components: JDBC  
    Versions: 10.2.0.0    
    Reporter: Anurag Shekhar
 Assigned to: Anurag Shekhar 


org.apache.derby.impl.jdbc.EmbeddedCallableStatement40 and org.apache.derby.client.am.CallableStatement40 are instantiating Preparewdstament in 
constructor. Becasue of this call to stored procedure with out param fails.

Instantiatiation of prepared was done to share the common method in prepared statement and callbale statement. But this aporach causes another issue of creating two instance of statement (one by calling super () and another by instantiating prepared statement). 


I can think of two solution of this problem 
1. Create another class which handles the common methods in PrepardStatement40 and CallableStatement40 classes.
2. Duplicate the common method in both classes. 

I feel 1st one is better. It will will be easier to fix any issue in the common methods and chance to miss to fix in one of the classes will be eliminated.

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


[jira] Updated: (DERBY-1059) call to stored procedure with out params fails in embedded driver

Posted by "Anurag Shekhar (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1059?page=all ]

Anurag Shekhar updated DERBY-1059:
----------------------------------

    Attachment: derby-1059_2.diff

Move all the implemented methods of PreparedStatement40 and EmbedPreparedStatement40 to the base class PreparedStatement and EmbedPreparedStatement.

Removed the instantiation of PreparedStatement40 and EmbedPreparedStatement40 from CallableStement40 and EmbedCallableStatement40

The unimplemented methods in CallableStatement inherited from java.sql.PreparedStement throws NOT_IMPLEMENTED without calling respective PreparedStatement methods.

derbyall will jdk1.4.2 runs with 7 failure but they are related to i18n. 

jdbcapi/parameterMapping.java still fails with jdk1.6 but now the failure is due to exception changed in 819. I am opening a new jira id to fix all message
related failure in jdk1.6


> call to stored procedure with out params fails in embedded driver
> -----------------------------------------------------------------
>
>          Key: DERBY-1059
>          URL: http://issues.apache.org/jira/browse/DERBY-1059
>      Project: Derby
>         Type: Sub-task
>   Components: JDBC
>     Versions: 10.2.0.0
>     Reporter: Anurag Shekhar
>     Assignee: Anurag Shekhar
>  Attachments: derby-1059.diff, derby-1059_2.diff, derby-1059_2.diff
>
> org.apache.derby.impl.jdbc.EmbeddedCallableStatement40 and org.apache.derby.client.am.CallableStatement40 are instantiating Preparewdstament in 
> constructor. Becasue of this call to stored procedure with out param fails.
> Instantiatiation of prepared was done to share the common method in prepared statement and callbale statement. But this aporach causes another issue of creating two instance of statement (one by calling super () and another by instantiating prepared statement). 
> I can think of two solution of this problem 
> 1. Create another class which handles the common methods in PrepardStatement40 and CallableStatement40 classes.
> 2. Duplicate the common method in both classes. 
> I feel 1st one is better. It will will be easier to fix any issue in the common methods and chance to miss to fix in one of the classes will be eliminated.

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


[jira] Commented: (DERBY-1059) call to stored procedure with out params fails in embedded driver

Posted by "Anurag Shekhar (JIRA)" <de...@db.apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-1059?page=comments#action_12370814 ] 

Anurag Shekhar commented on DERBY-1059:
---------------------------------------

Many of the  Unimplemented method use class introduced in newer version of jdbc4.0. So mving them in base class will make it incompatible with jdk1.3 or jdk1.4. I could move these four class becuase they use class available from jdbc2 onwards.

> call to stored procedure with out params fails in embedded driver
> -----------------------------------------------------------------
>
>          Key: DERBY-1059
>          URL: http://issues.apache.org/jira/browse/DERBY-1059
>      Project: Derby
>         Type: Sub-task
>   Components: JDBC
>     Versions: 10.2.0.0
>     Reporter: Anurag Shekhar
>     Assignee: Anurag Shekhar
>  Attachments: derby-1059.diff, derby-1059_2.diff, derby-1059_2.diff, derby-1059_3.diff
>
> org.apache.derby.impl.jdbc.EmbeddedCallableStatement40 and org.apache.derby.client.am.CallableStatement40 are instantiating Preparewdstament in 
> constructor. Becasue of this call to stored procedure with out param fails.
> Instantiatiation of prepared was done to share the common method in prepared statement and callbale statement. But this aporach causes another issue of creating two instance of statement (one by calling super () and another by instantiating prepared statement). 
> I can think of two solution of this problem 
> 1. Create another class which handles the common methods in PrepardStatement40 and CallableStatement40 classes.
> 2. Duplicate the common method in both classes. 
> I feel 1st one is better. It will will be easier to fix any issue in the common methods and chance to miss to fix in one of the classes will be eliminated.

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


[jira] Commented: (DERBY-1059) call to stored procedure with out params fails in embedded driver

Posted by "Anurag Shekhar (JIRA)" <de...@db.apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-1059?page=comments#action_12370243 ] 

Anurag Shekhar commented on DERBY-1059:
---------------------------------------

pleaseignore derby-1059_2.diff attached today its the same as privious patch.

> call to stored procedure with out params fails in embedded driver
> -----------------------------------------------------------------
>
>          Key: DERBY-1059
>          URL: http://issues.apache.org/jira/browse/DERBY-1059
>      Project: Derby
>         Type: Sub-task
>   Components: JDBC
>     Versions: 10.2.0.0
>     Reporter: Anurag Shekhar
>     Assignee: Anurag Shekhar
>  Attachments: derby-1059.diff, derby-1059_2.diff, derby-1059_2.diff, derby-1059_3.diff
>
> org.apache.derby.impl.jdbc.EmbeddedCallableStatement40 and org.apache.derby.client.am.CallableStatement40 are instantiating Preparewdstament in 
> constructor. Becasue of this call to stored procedure with out param fails.
> Instantiatiation of prepared was done to share the common method in prepared statement and callbale statement. But this aporach causes another issue of creating two instance of statement (one by calling super () and another by instantiating prepared statement). 
> I can think of two solution of this problem 
> 1. Create another class which handles the common methods in PrepardStatement40 and CallableStatement40 classes.
> 2. Duplicate the common method in both classes. 
> I feel 1st one is better. It will will be easier to fix any issue in the common methods and chance to miss to fix in one of the classes will be eliminated.

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


[jira] Commented: (DERBY-1059) call to stored procedure with out params fails in embedded driver

Posted by "David Van Couvering (JIRA)" <de...@db.apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-1059?page=comments#action_12370761 ] 

David Van Couvering commented on DERBY-1059:
--------------------------------------------

Thanks, Anurag, this looks pretty good.  I do have one question though.  What is the motivation to put the unimplemented methods within the 40 classes rather than in the base classes.  This means each time we implement a method we have to migrate it from the 40 class to the base class?  Is there a reason we can't put the unimplemented methods in the base class as well?

> call to stored procedure with out params fails in embedded driver
> -----------------------------------------------------------------
>
>          Key: DERBY-1059
>          URL: http://issues.apache.org/jira/browse/DERBY-1059
>      Project: Derby
>         Type: Sub-task
>   Components: JDBC
>     Versions: 10.2.0.0
>     Reporter: Anurag Shekhar
>     Assignee: Anurag Shekhar
>  Attachments: derby-1059.diff, derby-1059_2.diff, derby-1059_2.diff, derby-1059_3.diff
>
> org.apache.derby.impl.jdbc.EmbeddedCallableStatement40 and org.apache.derby.client.am.CallableStatement40 are instantiating Preparewdstament in 
> constructor. Becasue of this call to stored procedure with out param fails.
> Instantiatiation of prepared was done to share the common method in prepared statement and callbale statement. But this aporach causes another issue of creating two instance of statement (one by calling super () and another by instantiating prepared statement). 
> I can think of two solution of this problem 
> 1. Create another class which handles the common methods in PrepardStatement40 and CallableStatement40 classes.
> 2. Duplicate the common method in both classes. 
> I feel 1st one is better. It will will be easier to fix any issue in the common methods and chance to miss to fix in one of the classes will be eliminated.

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


[jira] Resolved: (DERBY-1059) call to stored procedure with out params fails in embedded driver

Posted by "David Van Couvering (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1059?page=all ]
     
David Van Couvering resolved DERBY-1059:
----------------------------------------

    Resolution: Fixed

Submitted revision 386773

> call to stored procedure with out params fails in embedded driver
> -----------------------------------------------------------------
>
>          Key: DERBY-1059
>          URL: http://issues.apache.org/jira/browse/DERBY-1059
>      Project: Derby
>         Type: Sub-task
>   Components: JDBC
>     Versions: 10.2.0.0
>     Reporter: Anurag Shekhar
>     Assignee: Anurag Shekhar
>  Attachments: derby-1059.diff, derby-1059_2.diff, derby-1059_2.diff, derby-1059_3.diff
>
> org.apache.derby.impl.jdbc.EmbeddedCallableStatement40 and org.apache.derby.client.am.CallableStatement40 are instantiating Preparewdstament in 
> constructor. Becasue of this call to stored procedure with out param fails.
> Instantiatiation of prepared was done to share the common method in prepared statement and callbale statement. But this aporach causes another issue of creating two instance of statement (one by calling super () and another by instantiating prepared statement). 
> I can think of two solution of this problem 
> 1. Create another class which handles the common methods in PrepardStatement40 and CallableStatement40 classes.
> 2. Duplicate the common method in both classes. 
> I feel 1st one is better. It will will be easier to fix any issue in the common methods and chance to miss to fix in one of the classes will be eliminated.

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


[jira] Commented: (DERBY-1059) call to stored procedure with out params fails in embedded driver

Posted by "David Van Couvering (JIRA)" <de...@db.apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-1059?page=comments#action_12370867 ] 

David Van Couvering commented on DERBY-1059:
--------------------------------------------

OK, seems reasonable.  I'll work on committing this.

> call to stored procedure with out params fails in embedded driver
> -----------------------------------------------------------------
>
>          Key: DERBY-1059
>          URL: http://issues.apache.org/jira/browse/DERBY-1059
>      Project: Derby
>         Type: Sub-task
>   Components: JDBC
>     Versions: 10.2.0.0
>     Reporter: Anurag Shekhar
>     Assignee: Anurag Shekhar
>  Attachments: derby-1059.diff, derby-1059_2.diff, derby-1059_2.diff, derby-1059_3.diff
>
> org.apache.derby.impl.jdbc.EmbeddedCallableStatement40 and org.apache.derby.client.am.CallableStatement40 are instantiating Preparewdstament in 
> constructor. Becasue of this call to stored procedure with out param fails.
> Instantiatiation of prepared was done to share the common method in prepared statement and callbale statement. But this aporach causes another issue of creating two instance of statement (one by calling super () and another by instantiating prepared statement). 
> I can think of two solution of this problem 
> 1. Create another class which handles the common methods in PrepardStatement40 and CallableStatement40 classes.
> 2. Duplicate the common method in both classes. 
> I feel 1st one is better. It will will be easier to fix any issue in the common methods and chance to miss to fix in one of the classes will be eliminated.

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


[jira] Updated: (DERBY-1059) call to stored procedure with out params fails in embedded driver

Posted by "Anurag Shekhar (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1059?page=all ]

Anurag Shekhar updated DERBY-1059:
----------------------------------

    Attachment: derby-1059.diff

In this patch I have introduced tow new classes
EmbedPreparedStatmentMethod40
PreparedStatmentMethod40
These class have implementation of jdbc4.0 method for prepared statements.
Method class to Callablestatement40 and PreparedStatement40 classes will be passed on to these class to avoid duplication of code.

Test case
No sperate test is provided for these change
jdbcapi/parameterMapping.java tests callable statment methods with out param.

> call to stored procedure with out params fails in embedded driver
> -----------------------------------------------------------------
>
>          Key: DERBY-1059
>          URL: http://issues.apache.org/jira/browse/DERBY-1059
>      Project: Derby
>         Type: Sub-task
>   Components: JDBC
>     Versions: 10.2.0.0
>     Reporter: Anurag Shekhar
>     Assignee: Anurag Shekhar
>  Attachments: derby-1059.diff
>
> org.apache.derby.impl.jdbc.EmbeddedCallableStatement40 and org.apache.derby.client.am.CallableStatement40 are instantiating Preparewdstament in 
> constructor. Becasue of this call to stored procedure with out param fails.
> Instantiatiation of prepared was done to share the common method in prepared statement and callbale statement. But this aporach causes another issue of creating two instance of statement (one by calling super () and another by instantiating prepared statement). 
> I can think of two solution of this problem 
> 1. Create another class which handles the common methods in PrepardStatement40 and CallableStatement40 classes.
> 2. Duplicate the common method in both classes. 
> I feel 1st one is better. It will will be easier to fix any issue in the common methods and chance to miss to fix in one of the classes will be eliminated.

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


[jira] Updated: (DERBY-1059) call to stored procedure with out params fails in embedded driver

Posted by "Anurag Shekhar (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1059?page=all ]

Anurag Shekhar updated DERBY-1059:
----------------------------------

    Attachment: derby-1059_2.diff

added javadocs in newly added class (PreparedStatementMethods40 and EmbedPreparedStatementMethods40)


> call to stored procedure with out params fails in embedded driver
> -----------------------------------------------------------------
>
>          Key: DERBY-1059
>          URL: http://issues.apache.org/jira/browse/DERBY-1059
>      Project: Derby
>         Type: Sub-task
>   Components: JDBC
>     Versions: 10.2.0.0
>     Reporter: Anurag Shekhar
>     Assignee: Anurag Shekhar
>  Attachments: derby-1059.diff, derby-1059_2.diff
>
> org.apache.derby.impl.jdbc.EmbeddedCallableStatement40 and org.apache.derby.client.am.CallableStatement40 are instantiating Preparewdstament in 
> constructor. Becasue of this call to stored procedure with out param fails.
> Instantiatiation of prepared was done to share the common method in prepared statement and callbale statement. But this aporach causes another issue of creating two instance of statement (one by calling super () and another by instantiating prepared statement). 
> I can think of two solution of this problem 
> 1. Create another class which handles the common methods in PrepardStatement40 and CallableStatement40 classes.
> 2. Duplicate the common method in both classes. 
> I feel 1st one is better. It will will be easier to fix any issue in the common methods and chance to miss to fix in one of the classes will be eliminated.

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


[jira] Commented: (DERBY-1059) call to stored procedure with out params fails in embedded driver

Posted by "Rick Hillegas (JIRA)" <de...@db.apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-1059?page=comments#action_12368316 ] 

Rick Hillegas commented on DERBY-1059:
--------------------------------------

Thanks, Anurag, this looks like an improvement. However, lots of useful javadoc has disappeared. Could you add appropriate javadoc to all of the methods in all of these classes?

> call to stored procedure with out params fails in embedded driver
> -----------------------------------------------------------------
>
>          Key: DERBY-1059
>          URL: http://issues.apache.org/jira/browse/DERBY-1059
>      Project: Derby
>         Type: Sub-task
>   Components: JDBC
>     Versions: 10.2.0.0
>     Reporter: Anurag Shekhar
>     Assignee: Anurag Shekhar
>  Attachments: derby-1059.diff
>
> org.apache.derby.impl.jdbc.EmbeddedCallableStatement40 and org.apache.derby.client.am.CallableStatement40 are instantiating Preparewdstament in 
> constructor. Becasue of this call to stored procedure with out param fails.
> Instantiatiation of prepared was done to share the common method in prepared statement and callbale statement. But this aporach causes another issue of creating two instance of statement (one by calling super () and another by instantiating prepared statement). 
> I can think of two solution of this problem 
> 1. Create another class which handles the common methods in PrepardStatement40 and CallableStatement40 classes.
> 2. Duplicate the common method in both classes. 
> I feel 1st one is better. It will will be easier to fix any issue in the common methods and chance to miss to fix in one of the classes will be eliminated.

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


Re: [jira] Commented: (DERBY-1059) call to stored procedure with out params fails in embedded driver

Posted by Dy...@Sun.COM.
"David Van Couvering (JIRA)" <de...@db.apache.org> writes:

>     [ http://issues.apache.org/jira/browse/DERBY-1059?page=comments#action_12369740 ] 
>
> David Van Couvering commented on DERBY-1059:
> --------------------------------------------
>
> It looks like you are using a delegation model rather than an inheritance model for your solution.  Why not have a superclass for EmbedCallableStatement40 and PreparedStatement40 both inherit from a common superclass that has all these shared methods? 
>
> Sorry if I'm missing something.

Delegation usually is preferable to inheritance for code reuse, as it
provides better encapsulation. Item 14 in Effective Java.

-- 
dt


[jira] Commented: (DERBY-1059) call to stored procedure with out params fails in embedded driver

Posted by "David Van Couvering (JIRA)" <de...@db.apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-1059?page=comments#action_12369740 ] 

David Van Couvering commented on DERBY-1059:
--------------------------------------------

It looks like you are using a delegation model rather than an inheritance model for your solution.  Why not have a superclass for EmbedCallableStatement40 and PreparedStatement40 both inherit from a common superclass that has all these shared methods? 

Sorry if I'm missing something.

Also, it looks like the javadoc for setBlob() and setClob() was removed, any reason for this?

Thanks,

David

> call to stored procedure with out params fails in embedded driver
> -----------------------------------------------------------------
>
>          Key: DERBY-1059
>          URL: http://issues.apache.org/jira/browse/DERBY-1059
>      Project: Derby
>         Type: Sub-task
>   Components: JDBC
>     Versions: 10.2.0.0
>     Reporter: Anurag Shekhar
>     Assignee: Anurag Shekhar
>  Attachments: derby-1059.diff, derby-1059_2.diff
>
> org.apache.derby.impl.jdbc.EmbeddedCallableStatement40 and org.apache.derby.client.am.CallableStatement40 are instantiating Preparewdstament in 
> constructor. Becasue of this call to stored procedure with out param fails.
> Instantiatiation of prepared was done to share the common method in prepared statement and callbale statement. But this aporach causes another issue of creating two instance of statement (one by calling super () and another by instantiating prepared statement). 
> I can think of two solution of this problem 
> 1. Create another class which handles the common methods in PrepardStatement40 and CallableStatement40 classes.
> 2. Duplicate the common method in both classes. 
> I feel 1st one is better. It will will be easier to fix any issue in the common methods and chance to miss to fix in one of the classes will be eliminated.

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


[jira] Commented: (DERBY-1059) call to stored procedure with out params fails in embedded driver

Posted by "Daniel John Debrunner (JIRA)" <de...@db.apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-1059?page=comments#action_12369868 ] 

Daniel John Debrunner commented on DERBY-1059:
----------------------------------------------

The existing code uses the inheritence model, which has lead to a small number of duplicated methods.
Usually  these duplicated methods are very simple, so compilcated logic is not

I think it would be wise to havea single model for the set of embedded jdbc prepared statement/callable statement
classes, rather than two models.

I don't know if it helps here, but traditionally we have pushed any new methods added in a new JDBC version
as far up the tree as possible. If there are no requirements on new JDBC 4.0/JSE 6 classes, then it's fine
for a JDBC 4.0 method to be in the base EmbePreparedStatement class.

> call to stored procedure with out params fails in embedded driver
> -----------------------------------------------------------------
>
>          Key: DERBY-1059
>          URL: http://issues.apache.org/jira/browse/DERBY-1059
>      Project: Derby
>         Type: Sub-task
>   Components: JDBC
>     Versions: 10.2.0.0
>     Reporter: Anurag Shekhar
>     Assignee: Anurag Shekhar
>  Attachments: derby-1059.diff, derby-1059_2.diff
>
> org.apache.derby.impl.jdbc.EmbeddedCallableStatement40 and org.apache.derby.client.am.CallableStatement40 are instantiating Preparewdstament in 
> constructor. Becasue of this call to stored procedure with out param fails.
> Instantiatiation of prepared was done to share the common method in prepared statement and callbale statement. But this aporach causes another issue of creating two instance of statement (one by calling super () and another by instantiating prepared statement). 
> I can think of two solution of this problem 
> 1. Create another class which handles the common methods in PrepardStatement40 and CallableStatement40 classes.
> 2. Duplicate the common method in both classes. 
> I feel 1st one is better. It will will be easier to fix any issue in the common methods and chance to miss to fix in one of the classes will be eliminated.

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


[jira] Updated: (DERBY-1059) call to stored procedure with out params fails in embedded driver

Posted by "Anurag Shekhar (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1059?page=all ]

Anurag Shekhar updated DERBY-1059:
----------------------------------

    Attachment: derby-1059_3.diff

Move all the implemented methods of PreparedStatement40 and EmbedPreparedStatement40 to the base class PreparedStatement and EmbedPreparedStatement.

Removed the instantiation of PreparedStatement40 and EmbedPreparedStatement40 from CallableStement40 and EmbedCallableStatement40

The unimplemented methods in CallableStatement inherited from java.sql.PreparedStement throws NOT_IMPLEMENTED without calling respective PreparedStatement methods.

derbyall will jdk1.4.2 runs with 7 failure but they are related to i18n. 

jdbcapi/parameterMapping.java still fails with jdk1.6 but now the failure is due to exception changed in 819. I am opening a new jira id to fix all message
related failure in jdk1.6


> call to stored procedure with out params fails in embedded driver
> -----------------------------------------------------------------
>
>          Key: DERBY-1059
>          URL: http://issues.apache.org/jira/browse/DERBY-1059
>      Project: Derby
>         Type: Sub-task
>   Components: JDBC
>     Versions: 10.2.0.0
>     Reporter: Anurag Shekhar
>     Assignee: Anurag Shekhar
>  Attachments: derby-1059.diff, derby-1059_2.diff, derby-1059_2.diff, derby-1059_3.diff
>
> org.apache.derby.impl.jdbc.EmbeddedCallableStatement40 and org.apache.derby.client.am.CallableStatement40 are instantiating Preparewdstament in 
> constructor. Becasue of this call to stored procedure with out param fails.
> Instantiatiation of prepared was done to share the common method in prepared statement and callbale statement. But this aporach causes another issue of creating two instance of statement (one by calling super () and another by instantiating prepared statement). 
> I can think of two solution of this problem 
> 1. Create another class which handles the common methods in PrepardStatement40 and CallableStatement40 classes.
> 2. Duplicate the common method in both classes. 
> I feel 1st one is better. It will will be easier to fix any issue in the common methods and chance to miss to fix in one of the classes will be eliminated.

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


[jira] Commented: (DERBY-1059) call to stored procedure with out params fails in embedded driver

Posted by "Anurag Shekhar (JIRA)" <de...@db.apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-1059?page=comments#action_12369822 ] 

Anurag Shekhar commented on DERBY-1059:
---------------------------------------

CallableStatement40 and PreparedStatement40 needs to extend their respective 30 classes. 
If we have a new common parent class will have to implement all prepared stament methods (including 
the older methods) in addition to that PreparedStatement  40 and CallableStatement40 will have to redo 
all the steps to create prepared/callable statment. I am assuming that you are not suggesting me to 
change the inheritance structure of pre jdbc4.0 drivers. 

I will add the javadoc for setBlob and setClob. I have removed this by mistake thanks for pointing out.

anurag


> call to stored procedure with out params fails in embedded driver
> -----------------------------------------------------------------
>
>          Key: DERBY-1059
>          URL: http://issues.apache.org/jira/browse/DERBY-1059
>      Project: Derby
>         Type: Sub-task
>   Components: JDBC
>     Versions: 10.2.0.0
>     Reporter: Anurag Shekhar
>     Assignee: Anurag Shekhar
>  Attachments: derby-1059.diff, derby-1059_2.diff
>
> org.apache.derby.impl.jdbc.EmbeddedCallableStatement40 and org.apache.derby.client.am.CallableStatement40 are instantiating Preparewdstament in 
> constructor. Becasue of this call to stored procedure with out param fails.
> Instantiatiation of prepared was done to share the common method in prepared statement and callbale statement. But this aporach causes another issue of creating two instance of statement (one by calling super () and another by instantiating prepared statement). 
> I can think of two solution of this problem 
> 1. Create another class which handles the common methods in PrepardStatement40 and CallableStatement40 classes.
> 2. Duplicate the common method in both classes. 
> I feel 1st one is better. It will will be easier to fix any issue in the common methods and chance to miss to fix in one of the classes will be eliminated.

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


[jira] Commented: (DERBY-1059) call to stored procedure with out params fails in embedded driver

Posted by "Anurag Shekhar (JIRA)" <de...@db.apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-1059?page=comments#action_12370098 ] 

Anurag Shekhar commented on DERBY-1059:
---------------------------------------

So far We have only 4 implemented methods in EmbeddedPreparedStatement40. All these methods can be moved safely, to base class EmbeddedPreparedStatement

I will move these class to the base class and remove the code from constructer which instantiates PreparedStatement. I will also change CallableStatement methods to not to call PreparedStatement in unimplemented methods but to throw Not implemented exception directorly. 

Based on the conplexity of the methods implemented in future we can take a call about replicating the code in two class.
I will do the same for network client

> call to stored procedure with out params fails in embedded driver
> -----------------------------------------------------------------
>
>          Key: DERBY-1059
>          URL: http://issues.apache.org/jira/browse/DERBY-1059
>      Project: Derby
>         Type: Sub-task
>   Components: JDBC
>     Versions: 10.2.0.0
>     Reporter: Anurag Shekhar
>     Assignee: Anurag Shekhar
>  Attachments: derby-1059.diff, derby-1059_2.diff
>
> org.apache.derby.impl.jdbc.EmbeddedCallableStatement40 and org.apache.derby.client.am.CallableStatement40 are instantiating Preparewdstament in 
> constructor. Becasue of this call to stored procedure with out param fails.
> Instantiatiation of prepared was done to share the common method in prepared statement and callbale statement. But this aporach causes another issue of creating two instance of statement (one by calling super () and another by instantiating prepared statement). 
> I can think of two solution of this problem 
> 1. Create another class which handles the common methods in PrepardStatement40 and CallableStatement40 classes.
> 2. Duplicate the common method in both classes. 
> I feel 1st one is better. It will will be easier to fix any issue in the common methods and chance to miss to fix in one of the classes will be eliminated.

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