You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by GitBox <gi...@apache.org> on 2021/11/25 15:00:16 UTC

[GitHub] [camel-quarkus] JiriOndrusek commented on issue #3327: Sql derby - test exernal db if possible, remove workaround because of quarkus issue #21639

JiriOndrusek commented on issue #3327:
URL: https://github.com/apache/camel-quarkus/issues/3327#issuecomment-979282983


   @ppalaga @aldettinger 
   I'm investigating a possibility of running stored procedure test on external derby db. I now see that it would need to require  manual steps from user:
   
   1. Jar with stored procedure has to be uploaded into the external file system, which db has access to. Then it is possible to add the jar into db classpath and then execute it as a stored procedure. 
   2. Another possible complication: Camel quarkus has to be build with Java 11+. If external derby db contains only Java 8-, it won't be possible to use a jar created as a part of cq build. User would need to create the procedure jar with the right java.
   
   Considering previous limitations, I would say that disabed stored procedure test for external derby is the right solution and it makes no sense to enable such test for external Derby db. What do you think?
   
   Here are some commands required to make stored procedure on external db work:
   
   Java class for procedure
   ```
   package test;
   
   public class App 
   {
       public static void testProc(int a, int b) {
            ...
   }
   ```
   
   Commands to be executed via sql:
   ```
   CALL sqlj.install_jar('/home/test-1.0-SNAPSHOT.jar', 'App' , 0);
   
   call syscs_util.syscs_set_database_property('derby.database.classpath', 'DOCKERDB.APP');
   
   CREATE PROCEDURE ADD_NUMS(IN a INTEGER, IN b INTEGER) PARAMETER STYLE JAVA LANGUAGE JAVA EXTERNAL NAME 'test.App.testProc';
   
   call ADD_NUMS2(1, 2);
   ```
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org