[jira] [Commented] (CAMEL-4725) camel-sql - Add support for Callable statements

2017-02-22 Thread Mohan (JIRA)

[ 
https://issues.apache.org/jira/browse/CAMEL-4725?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15878696#comment-15878696
 ] 

Mohan commented on CAMEL-4725:
--

Tried that option you suggested...still get the same error. : 

{code}Caused by: java.sql.SQLException: Fail to convert to internal 
representation: Person@45763336
at oracle.sql.STRUCT.toSTRUCT(STRUCT.java:464) {code}

In general mybatis world I used to write typeHandlers for mapping custom types 
to oracle object. Not sure how to implement similar with sql-stored end point.

> camel-sql - Add support for Callable statements
> ---
>
> Key: CAMEL-4725
> URL: https://issues.apache.org/jira/browse/CAMEL-4725
> Project: Camel
>  Issue Type: New Feature
>  Components: camel-sql
>Affects Versions: 2.8.3
>Reporter: Christian Müller
>Assignee: Claus Ibsen
> Fix For: 2.17.0
>
>
> See 
> [Nabble|http://camel.465427.n5.nabble.com/call-Oracle-Package-procedure-td5032133.html]
>  for details.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (CAMEL-4725) camel-sql - Add support for Callable statements

2017-02-22 Thread Sami Nurminen (JIRA)

[ 
https://issues.apache.org/jira/browse/CAMEL-4725?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15878531#comment-15878531
 ] 

Sami Nurminen commented on CAMEL-4725:
--

"If you choose not to supply a custom Java class for your SQL-Java mapping for 
an Oracle object, then Oracle JDBC will materialize the object as an instance 
of the oracle.sql.STRUCT class."

Looking at Person class, you maybe need to add at least getters for each 
property. If that doesnt help try add default constructor and setters for each 
property, so that Oracle can deserialize object.

> camel-sql - Add support for Callable statements
> ---
>
> Key: CAMEL-4725
> URL: https://issues.apache.org/jira/browse/CAMEL-4725
> Project: Camel
>  Issue Type: New Feature
>  Components: camel-sql
>Affects Versions: 2.8.3
>Reporter: Christian Müller
>Assignee: Claus Ibsen
> Fix For: 2.17.0
>
>
> See 
> [Nabble|http://camel.465427.n5.nabble.com/call-Oracle-Package-procedure-td5032133.html]
>  for details.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (CAMEL-4725) camel-sql - Add support for Callable statements

2017-02-21 Thread Arno Noordover (JIRA)

[ 
https://issues.apache.org/jira/browse/CAMEL-4725?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15876896#comment-15876896
 ] 

Arno Noordover commented on CAMEL-4725:
---

Using stored procedures means a direct dependency on the database you choose.
Looking at your exceptions I think you use Oracle.
Maybe http://docs.oracle.com/cd/B14117_01/java.101/b10979/oraoot.htm#i1039476 
can help

> camel-sql - Add support for Callable statements
> ---
>
> Key: CAMEL-4725
> URL: https://issues.apache.org/jira/browse/CAMEL-4725
> Project: Camel
>  Issue Type: New Feature
>  Components: camel-sql
>Affects Versions: 2.8.3
>Reporter: Christian Müller
>Assignee: Claus Ibsen
> Fix For: 2.17.0
>
>
> See 
> [Nabble|http://camel.465427.n5.nabble.com/call-Oracle-Package-procedure-td5032133.html]
>  for details.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (CAMEL-4725) camel-sql - Add support for Callable statements

2017-02-21 Thread Mohan (JIRA)

[ 
https://issues.apache.org/jira/browse/CAMEL-4725?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15876763#comment-15876763
 ] 

Mohan commented on CAMEL-4725:
--

Here are my test details : 

Java Obj :

{code:title=Bar.java|borderStyle=solid}
public class Person {

String text;
String description;


public Person(String text, String description) {
super();
this.text = text;
this.description = description;
 }
}
{code}

Camel Route
{code:title=Bar.java|borderStyle=solid}
http://camel.apache.org/schema/spring;>

   

 
{code}

Oracle Proc Details :

{code:title=Bar.java|borderStyle=solid}
create or replace type T_TEST as object (
  text   varchar2(50),
  DESCRIPTION  varchar2(50)
);

and procedure

procedure TEST_CAMEL_OBJ(testInput T_TEST) as
  
  begin
  
  insert into test_camel(column1) values(testInput.text);
commit;
  end;
{code}


Getting error when executing as : 

org.springframework.jdbc.UncategorizedSQLException: CallableStatementCallback; 
uncategorized SQLException for SQL [{call test_camel_obj(?)}]; SQL state 
[9]; error code [17059]; Fail to convert to internal representation:



> camel-sql - Add support for Callable statements
> ---
>
> Key: CAMEL-4725
> URL: https://issues.apache.org/jira/browse/CAMEL-4725
> Project: Camel
>  Issue Type: New Feature
>  Components: camel-sql
>Affects Versions: 2.8.3
>Reporter: Christian Müller
>Assignee: Claus Ibsen
> Fix For: 2.17.0
>
>
> See 
> [Nabble|http://camel.465427.n5.nabble.com/call-Oracle-Package-procedure-td5032133.html]
>  for details.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (CAMEL-4725) camel-sql - Add support for Callable statements

2017-02-21 Thread Arno Noordover (JIRA)

[ 
https://issues.apache.org/jira/browse/CAMEL-4725?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15876741#comment-15876741
 ] 

Arno Noordover commented on CAMEL-4725:
---

Example in derby:
(create a Person class for yourself)
{code}
CREATE TYPE person EXTERNAL NAME
 'org.apache.camel.component.sql.Person' LANGUAGE JAVA;

CREATE PROCEDURE fullName(person, OUT RESULT VARCHAR(255))
LANGUAGE JAVA
PARAMETER STYLE JAVA
NO SQL
EXTERNAL NAME 'org.apache.camel.component.sql.Person.fullName';
{code}

and

{code}
@Test
public void shouldExecuteStoredFunction() throws Exception {

CallableStatementWrapper wrapper = new 
CallableStatementWrapper("fullName"
+ "(JAVA_OBJECT ${header.v1}, OUT VARCHAR resultofsub)", 
factory);

final Exchange exchange = createExchangeWithBody(null);
Person person = new Person();
person.lastname = "Noordover";
person.firstname = "Arno";
exchange.getIn().setHeader("v1", person);

wrapper.call(new WrapperExecuteCallback() {
@Override
public void execute(StatementWrapper statementWrapper) throws 
SQLException, DataAccessException {
statementWrapper.populateStatement(null, exchange);

Map resultOfQuery = (Map) statementWrapper.executeStatement();
Assert.assertEquals("Arno Noordover", 
resultOfQuery.get("resultofsub"));
}
});
}
{code}

> camel-sql - Add support for Callable statements
> ---
>
> Key: CAMEL-4725
> URL: https://issues.apache.org/jira/browse/CAMEL-4725
> Project: Camel
>  Issue Type: New Feature
>  Components: camel-sql
>Affects Versions: 2.8.3
>Reporter: Christian Müller
>Assignee: Claus Ibsen
> Fix For: 2.17.0
>
>
> See 
> [Nabble|http://camel.465427.n5.nabble.com/call-Oracle-Package-procedure-td5032133.html]
>  for details.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (CAMEL-4725) camel-sql - Add support for Callable statements

2017-02-21 Thread Mohan (JIRA)

[ 
https://issues.apache.org/jira/browse/CAMEL-4725?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15876702#comment-15876702
 ] 

Mohan commented on CAMEL-4725:
--

I can share the details of my tests. Can you please advise the forum to post my 
question and the details I have so far..once posted I can give the link here.

> camel-sql - Add support for Callable statements
> ---
>
> Key: CAMEL-4725
> URL: https://issues.apache.org/jira/browse/CAMEL-4725
> Project: Camel
>  Issue Type: New Feature
>  Components: camel-sql
>Affects Versions: 2.8.3
>Reporter: Christian Müller
>Assignee: Claus Ibsen
> Fix For: 2.17.0
>
>
> See 
> [Nabble|http://camel.465427.n5.nabble.com/call-Oracle-Package-procedure-td5032133.html]
>  for details.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (CAMEL-4725) camel-sql - Add support for Callable statements

2017-02-21 Thread Arno Noordover (JIRA)

[ 
https://issues.apache.org/jira/browse/CAMEL-4725?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15876631#comment-15876631
 ] 

Arno Noordover commented on CAMEL-4725:
---

Can you share what you have tried so far. Looking at the code you should be 
able to use all the types in the template as define in java.sql.Types. My guess 
is that a type STRUCT should be used for user-defined types.

> camel-sql - Add support for Callable statements
> ---
>
> Key: CAMEL-4725
> URL: https://issues.apache.org/jira/browse/CAMEL-4725
> Project: Camel
>  Issue Type: New Feature
>  Components: camel-sql
>Affects Versions: 2.8.3
>Reporter: Christian Müller
>Assignee: Claus Ibsen
> Fix For: 2.17.0
>
>
> See 
> [Nabble|http://camel.465427.n5.nabble.com/call-Oracle-Package-procedure-td5032133.html]
>  for details.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (CAMEL-4725) camel-sql - Add support for Callable statements

2017-02-21 Thread Mohan (JIRA)

[ 
https://issues.apache.org/jira/browse/CAMEL-4725?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15876521#comment-15876521
 ] 

Mohan commented on CAMEL-4725:
--

Yes my requirement was similar to the question in reference link you posted 
above. Passing either a POJO or List of POJO's to the database stored procedure 
being execute by camel sql-stored component. It was working for primitive types 
(VARCHAR,NUMBER,BIGINT etc...) but couldn't make any progress on passing a POJO 
as stored proc input.


> camel-sql - Add support for Callable statements
> ---
>
> Key: CAMEL-4725
> URL: https://issues.apache.org/jira/browse/CAMEL-4725
> Project: Camel
>  Issue Type: New Feature
>  Components: camel-sql
>Affects Versions: 2.8.3
>Reporter: Christian Müller
>Assignee: Claus Ibsen
> Fix For: 2.17.0
>
>
> See 
> [Nabble|http://camel.465427.n5.nabble.com/call-Oracle-Package-procedure-td5032133.html]
>  for details.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (CAMEL-4725) camel-sql - Add support for Callable statements

2017-02-21 Thread Sami Nurminen (JIRA)

[ 
https://issues.apache.org/jira/browse/CAMEL-4725?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15876393#comment-15876393
 ] 

Sami Nurminen commented on CAMEL-4725:
--

Do you mean for example these?
https://db.apache.org/derby/docs/10.7/ref/rrefsqljudt.html

Code seems to just pass parameters as they are(for example object from header). 
So if SQL driver can handle object as parameter, then it could work but haven't 
tested this.

> camel-sql - Add support for Callable statements
> ---
>
> Key: CAMEL-4725
> URL: https://issues.apache.org/jira/browse/CAMEL-4725
> Project: Camel
>  Issue Type: New Feature
>  Components: camel-sql
>Affects Versions: 2.8.3
>Reporter: Christian Müller
>Assignee: Claus Ibsen
> Fix For: 2.17.0
>
>
> See 
> [Nabble|http://camel.465427.n5.nabble.com/call-Oracle-Package-procedure-td5032133.html]
>  for details.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (CAMEL-4725) camel-sql - Add support for Callable statements

2017-02-20 Thread Mohan (JIRA)

[ 
https://issues.apache.org/jira/browse/CAMEL-4725?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15875293#comment-15875293
 ] 

Mohan commented on CAMEL-4725:
--

I see as per camel 2.17 spec sql stored component supports calling stored 
procedures passing primitive types...does it support passing a user defined 
data type (object) ?

http://camel.apache.org/sql-stored-procedure.html





> camel-sql - Add support for Callable statements
> ---
>
> Key: CAMEL-4725
> URL: https://issues.apache.org/jira/browse/CAMEL-4725
> Project: Camel
>  Issue Type: New Feature
>  Components: camel-sql
>Affects Versions: 2.8.3
>Reporter: Christian Müller
>Assignee: Claus Ibsen
> Fix For: 2.17.0
>
>
> See 
> [Nabble|http://camel.465427.n5.nabble.com/call-Oracle-Package-procedure-td5032133.html]
>  for details.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (CAMEL-4725) camel-sql - Add support for Callable statements

2016-02-07 Thread Claus Ibsen (JIRA)

[ 
https://issues.apache.org/jira/browse/CAMEL-4725?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15136185#comment-15136185
 ] 

Claus Ibsen commented on CAMEL-4725:


I added a page for the documentation
https://cwiki.apache.org/confluence/display/CAMEL/SQL+Stored+Procedure

> camel-sql - Add support for Callable statements
> ---
>
> Key: CAMEL-4725
> URL: https://issues.apache.org/jira/browse/CAMEL-4725
> Project: Camel
>  Issue Type: New Feature
>  Components: camel-sql
>Affects Versions: 2.8.3
>Reporter: Christian Müller
>Assignee: Claus Ibsen
> Fix For: 2.17.0
>
>
> See 
> [Nabble|http://camel.465427.n5.nabble.com/call-Oracle-Package-procedure-td5032133.html]
>  for details.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CAMEL-4725) camel-sql - Add support for Callable statements

2016-01-28 Thread Claus Ibsen (JIRA)

[ 
https://issues.apache.org/jira/browse/CAMEL-4725?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15121315#comment-15121315
 ] 

Claus Ibsen commented on CAMEL-4725:


We need to add documentation for this. 

Maybe a new page for sql-stored

> camel-sql - Add support for Callable statements
> ---
>
> Key: CAMEL-4725
> URL: https://issues.apache.org/jira/browse/CAMEL-4725
> Project: Camel
>  Issue Type: New Feature
>  Components: camel-sql
>Affects Versions: 2.8.3
>Reporter: Christian Müller
>Assignee: Claus Ibsen
> Fix For: 2.17.0
>
>
> See 
> [Nabble|http://camel.465427.n5.nabble.com/call-Oracle-Package-procedure-td5032133.html]
>  for details.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CAMEL-4725) camel-sql - Add support for Callable statements

2016-01-23 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CAMEL-4725?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15113667#comment-15113667
 ] 

ASF GitHub Bot commented on CAMEL-4725:
---

Github user asfgit closed the pull request at:

https://github.com/apache/camel/pull/771


> camel-sql - Add support for Callable statements
> ---
>
> Key: CAMEL-4725
> URL: https://issues.apache.org/jira/browse/CAMEL-4725
> Project: Camel
>  Issue Type: New Feature
>  Components: camel-sql
>Affects Versions: 2.8.3
>Reporter: Christian Müller
>Assignee: Claus Ibsen
> Fix For: 2.17.0
>
>
> See 
> [Nabble|http://camel.465427.n5.nabble.com/call-Oracle-Package-procedure-td5032133.html]
>  for details.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CAMEL-4725) camel-sql - Add support for Callable statements

2016-01-14 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CAMEL-4725?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15098671#comment-15098671
 ] 

ASF GitHub Bot commented on CAMEL-4725:
---

GitHub user snurmine opened a pull request:

https://github.com/apache/camel/pull/771

CAMEL-4725:Vendor spesific SQL type and removed type converters.

-Added ability to give SQL type code as integer in template instead of 
String. This enables use Vendor specific SQL type.
-Removed SQL type to Java type mappings from Simple expression evaluations.
Component cannot know exact type per vendor, so value from Simple 
expression is asked using Object.class. 
-Some minor cleaning

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/snurmine/camel CAMEL-4725

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/camel/pull/771.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #771


commit 3e94ae2ad843a702ff84edace3fad799dbeb5dfb
Author: Sami Nurminen 
Date:   2016-01-14T17:30:45Z

CAMEL-4725:Vendor spesific SQL type. Removed type conversions per SQL type.




> camel-sql - Add support for Callable statements
> ---
>
> Key: CAMEL-4725
> URL: https://issues.apache.org/jira/browse/CAMEL-4725
> Project: Camel
>  Issue Type: New Feature
>  Components: camel-sql
>Affects Versions: 2.8.3
>Reporter: Christian Müller
>Assignee: Claus Ibsen
> Fix For: 2.17.0
>
>
> See 
> [Nabble|http://camel.465427.n5.nabble.com/call-Oracle-Package-procedure-td5032133.html]
>  for details.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CAMEL-4725) camel-sql - Add support for Callable statements

2016-01-14 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CAMEL-4725?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15098363#comment-15098363
 ] 

ASF GitHub Bot commented on CAMEL-4725:
---

Github user snurmine closed the pull request at:

https://github.com/apache/camel/pull/759


> camel-sql - Add support for Callable statements
> ---
>
> Key: CAMEL-4725
> URL: https://issues.apache.org/jira/browse/CAMEL-4725
> Project: Camel
>  Issue Type: New Feature
>  Components: camel-sql
>Affects Versions: 2.8.3
>Reporter: Christian Müller
>Assignee: Claus Ibsen
> Fix For: 2.17.0
>
>
> See 
> [Nabble|http://camel.465427.n5.nabble.com/call-Oracle-Package-procedure-td5032133.html]
>  for details.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CAMEL-4725) camel-sql - Add support for Callable statements

2016-01-10 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CAMEL-4725?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15091091#comment-15091091
 ] 

ASF GitHub Bot commented on CAMEL-4725:
---

GitHub user snurmine opened a pull request:

https://github.com/apache/camel/pull/759

CAMEL-4725: Batch support. Single Producer for both SQL-components.

Added batch support for StoredProcedures. It uses Spring API as much as 
possible.

StoredProcedure can be read from message body and parameters are read from 
header.
Only Map is supported as parameter in this case.

Refactored SqlProducer to support both CallableStatement and 
PreparedStatement. New name is DefaultSqlProducer(as it is now more general 
class). Adapters  for PreparedStatement, CallableStatement and 
CallableStatement batch mode are in "wrapper"-package. 

Moved parameters only sensible for SQL component into SqlComponent and
left common properties into DefaultSqlComponent.

There are a lot of changes to avoid duplicate logic in code between 
CallableStament and PreparedStatement implementations.



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/snurmine/camel CAMEL-4725

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/camel/pull/759.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #759


commit 2a7ae3c8da7c43543b610638d0f8261d879c1b7c
Author: Sami Nurminen 
Date:   2016-01-09T10:18:27Z

CAMEL-4725: Batch support. Single Producer for both SQL-components.




> camel-sql - Add support for Callable statements
> ---
>
> Key: CAMEL-4725
> URL: https://issues.apache.org/jira/browse/CAMEL-4725
> Project: Camel
>  Issue Type: New Feature
>  Components: camel-sql
>Affects Versions: 2.8.3
>Reporter: Christian Müller
>Assignee: Claus Ibsen
> Fix For: 2.17.0
>
>
> See 
> [Nabble|http://camel.465427.n5.nabble.com/call-Oracle-Package-procedure-td5032133.html]
>  for details.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CAMEL-4725) camel-sql - Add support for Callable statements

2016-01-09 Thread Claus Ibsen (JIRA)

[ 
https://issues.apache.org/jira/browse/CAMEL-4725?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15090543#comment-15090543
 ] 

Claus Ibsen commented on CAMEL-4725:


First work now pushed to master. 

There is new PR's coming with more enhancements to the component but it works 
now for calling stored procedures as a producer.

> camel-sql - Add support for Callable statements
> ---
>
> Key: CAMEL-4725
> URL: https://issues.apache.org/jira/browse/CAMEL-4725
> Project: Camel
>  Issue Type: New Feature
>  Components: camel-sql
>Affects Versions: 2.8.3
>Reporter: Christian Müller
>Assignee: Claus Ibsen
> Fix For: 2.17.0
>
>
> See 
> [Nabble|http://camel.465427.n5.nabble.com/call-Oracle-Package-procedure-td5032133.html]
>  for details.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CAMEL-4725) camel-sql - Add support for Callable statements

2016-01-09 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CAMEL-4725?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15090551#comment-15090551
 ] 

ASF GitHub Bot commented on CAMEL-4725:
---

Github user snurmine closed the pull request at:

https://github.com/apache/camel/pull/749


> camel-sql - Add support for Callable statements
> ---
>
> Key: CAMEL-4725
> URL: https://issues.apache.org/jira/browse/CAMEL-4725
> Project: Camel
>  Issue Type: New Feature
>  Components: camel-sql
>Affects Versions: 2.8.3
>Reporter: Christian Müller
>Assignee: Claus Ibsen
> Fix For: 2.17.0
>
>
> See 
> [Nabble|http://camel.465427.n5.nabble.com/call-Oracle-Package-procedure-td5032133.html]
>  for details.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CAMEL-4725) camel-sql - Add support for Callable statements

2016-01-02 Thread Claus Ibsen (JIRA)

[ 
https://issues.apache.org/jira/browse/CAMEL-4725?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15076575#comment-15076575
 ] 

Claus Ibsen commented on CAMEL-4725:


I wonder how well JavaCC is maintained?

And we should have a way of generating the source as part of the build, so we 
are not stuck on some manual procedure to install javacc and run it from 
command line. Isn't there a maven plugin for javacc ?

Also I think it should be put in a separate component named sql-stored, or 
sql-sp etc. It should stay in camel-sql, but as a new component. We can do this 
later to avoid the code changes to include both at the same time to confuse. 

But interesting idea to use a grammar. So I suggest keep on hacking on this.

> camel-sql - Add support for Callable statements
> ---
>
> Key: CAMEL-4725
> URL: https://issues.apache.org/jira/browse/CAMEL-4725
> Project: Camel
>  Issue Type: New Feature
>  Components: camel-sql
>Affects Versions: 2.8.3
>Reporter: Christian Müller
> Fix For: Future
>
>
> See 
> [Nabble|http://camel.465427.n5.nabble.com/call-Oracle-Package-procedure-td5032133.html]
>  for details.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CAMEL-4725) camel-sql - Add support for Callable statements

2016-01-02 Thread Claus Ibsen (JIRA)

[ 
https://issues.apache.org/jira/browse/CAMEL-4725?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15076581#comment-15076581
 ] 

Claus Ibsen commented on CAMEL-4725:


Ah yeah there is a maven plugin, activemq uses javacc for its jms select parser.
https://github.com/apache/activemq/blob/master/activemq-client/pom.xml#L220

> camel-sql - Add support for Callable statements
> ---
>
> Key: CAMEL-4725
> URL: https://issues.apache.org/jira/browse/CAMEL-4725
> Project: Camel
>  Issue Type: New Feature
>  Components: camel-sql
>Affects Versions: 2.8.3
>Reporter: Christian Müller
> Fix For: Future
>
>
> See 
> [Nabble|http://camel.465427.n5.nabble.com/call-Oracle-Package-procedure-td5032133.html]
>  for details.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CAMEL-4725) camel-sql - Add support for Callable statements

2016-01-01 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CAMEL-4725?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15076377#comment-15076377
 ] 

ASF GitHub Bot commented on CAMEL-4725:
---

GitHub user snurmine opened a pull request:

https://github.com/apache/camel/pull/749

CAMEL-4725 camel-sql - Add support for Callable statements

Here is demo of how calling stored procedure could work. I call them Simple 
Stored Procedure Templates. Current solution is just a proof-of-concept and has 
style, bugs, missing features etc. issues. I provide this PR just for 
discussion.

Idea is that instead of SQL-query, a simple template is used to describe 
stored procedure. From parsed template, subclass of 
org.springframework.jdbc.object.StoredProcedure can then be constructed by 
information given in the template. For example

```javascript
sql:sspt:ADDNUMBERS(INTEGER VALUE1 ${headers.num1},INTEGER VALUE2 ${headers"
+ ".num2},OUT INTEGER RESULT resultofsum)
```

Here Producer would call ADDNUMBERS stored procedure using parameters 
VALUE1 and VALUE2.
Values are fetched from headers "num1" and "num2". Output (INTEGER) is 
stored into header "resultofsum". Here INTEGER refers to java.sql.Types field 
INTEGER. Parameter order seems to be meaningfull, but names a still given.


Test org.apache.camel.component.sql.sspt.ProducerTest shows how template is 
used in Procuder.

I can polish solution further if this approach seems okey.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/snurmine/camel CAMEL-4725

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/camel/pull/749.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #749


commit 281a10a22436a679f2f51c57a2175cdf6535f65f
Author: Sami Nurminen 
Date:   2015-12-20T21:34:33Z

CAMEL-4725 camel-sql - Add support for Callable statements




> camel-sql - Add support for Callable statements
> ---
>
> Key: CAMEL-4725
> URL: https://issues.apache.org/jira/browse/CAMEL-4725
> Project: Camel
>  Issue Type: New Feature
>  Components: camel-sql
>Affects Versions: 2.8.3
>Reporter: Christian Müller
> Fix For: Future
>
>
> See 
> [Nabble|http://camel.465427.n5.nabble.com/call-Oracle-Package-procedure-td5032133.html]
>  for details.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CAMEL-4725) camel-sql - Add support for Callable statements

2015-02-26 Thread Brad Powell (JIRA)

[ 
https://issues.apache.org/jira/browse/CAMEL-4725?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14338918#comment-14338918
 ] 

Brad Powell commented on CAMEL-4725:


The following bean is very close to this requested functionality:
https://github.com/bapowell/camel-stored-procedure


 camel-sql - Add support for Callable statements
 ---

 Key: CAMEL-4725
 URL: https://issues.apache.org/jira/browse/CAMEL-4725
 Project: Camel
  Issue Type: New Feature
  Components: camel-sql
Affects Versions: 2.8.3
Reporter: Christian Müller
 Fix For: Future


 See 
 [Nabble|http://camel.465427.n5.nabble.com/call-Oracle-Package-procedure-td5032133.html]
  for details.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CAMEL-4725) camel-sql - Add support for Callable statements

2015-01-15 Thread Arno Noordover (JIRA)

[ 
https://issues.apache.org/jira/browse/CAMEL-4725?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14279359#comment-14279359
 ] 

Arno Noordover commented on CAMEL-4725:
---

Would it be a good idea to create a wrapper around a spring jdbc class which 
can be used to call a stored procedure 
(http://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/jdbc/object/StoredProcedure.html).
 This wrapper could be instantiated with the string to be used for calling the 
stored-proc. Also a hashmap with the bind-variables as a key and a simple 
language to be executed for each variable as the value could be provided.
The wrapper bean should have a method with the exchange as the input parameter. 
In this method you can use the simple language to set all the variables.

For easy usage a userdefined namespace could be created as well.

 camel-sql - Add support for Callable statements
 ---

 Key: CAMEL-4725
 URL: https://issues.apache.org/jira/browse/CAMEL-4725
 Project: Camel
  Issue Type: New Feature
  Components: camel-sql
Affects Versions: 2.8.3
Reporter: Christian Müller
 Fix For: Future


 See 
 [Nabble|http://camel.465427.n5.nabble.com/call-Oracle-Package-procedure-td5032133.html]
  for details.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CAMEL-4725) camel-sql - Add support for Callable statements

2015-01-15 Thread Claus Ibsen (JIRA)

[ 
https://issues.apache.org/jira/browse/CAMEL-4725?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14279860#comment-14279860
 ] 

Claus Ibsen commented on CAMEL-4725:


Yeah as camel-sql uses spring-jdbc, so it seems like a good idea to do that.

You are surely welcome to dive into the code and attempt to implement this. We 
love contributions
http://camel.apache.org/contributing.html

And this ticket is a popular ticket so the community would like stored 
procedure support in this component.

 camel-sql - Add support for Callable statements
 ---

 Key: CAMEL-4725
 URL: https://issues.apache.org/jira/browse/CAMEL-4725
 Project: Camel
  Issue Type: New Feature
  Components: camel-sql
Affects Versions: 2.8.3
Reporter: Christian Müller
 Fix For: Future


 See 
 [Nabble|http://camel.465427.n5.nabble.com/call-Oracle-Package-procedure-td5032133.html]
  for details.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CAMEL-4725) camel-sql - Add support for Callable statements

2014-12-19 Thread Arno Noordover (JIRA)

[ 
https://issues.apache.org/jira/browse/CAMEL-4725?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14253729#comment-14253729
 ] 

Arno Noordover commented on CAMEL-4725:
---

Does anybody have an idea how to implement this?
When I compare it with the donkey-esb you need multiple parts:
# the object containing the data to be used in calling the stored procedure;
# a template call with bind-variables;
# mapping between bind-variables and the object which should contain some kind 
of EL.

What part can be skipped?
How can we map between object and variable in stored-proc?
Is it readable when you need to call a complex stored-proc?

 camel-sql - Add support for Callable statements
 ---

 Key: CAMEL-4725
 URL: https://issues.apache.org/jira/browse/CAMEL-4725
 Project: Camel
  Issue Type: New Feature
  Components: camel-sql
Affects Versions: 2.8.3
Reporter: Christian Müller
 Fix For: Future


 See 
 [Nabble|http://camel.465427.n5.nabble.com/call-Oracle-Package-procedure-td5032133.html]
  for details.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CAMEL-4725) camel-sql - Add support for Callable statements

2014-01-10 Thread Diogenes Rettori (JIRA)

[ 
https://issues.apache.org/jira/browse/CAMEL-4725?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13867768#comment-13867768
 ] 

Diogenes Rettori commented on CAMEL-4725:
-

Can someone bring this back to life?

 camel-sql - Add support for Callable statements
 ---

 Key: CAMEL-4725
 URL: https://issues.apache.org/jira/browse/CAMEL-4725
 Project: Camel
  Issue Type: New Feature
  Components: camel-sql
Affects Versions: 2.8.3
Reporter: Christian Müller
 Fix For: Future


 See 
 [Nabble|http://camel.465427.n5.nabble.com/call-Oracle-Package-procedure-td5032133.html]
  for details.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)


[jira] [Commented] (CAMEL-4725) camel-sql - Add support for Callable statements

2013-08-08 Thread Claus Ibsen (JIRA)

[ 
https://issues.apache.org/jira/browse/CAMEL-4725?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13733270#comment-13733270
 ] 

Claus Ibsen commented on CAMEL-4725:


Christian do you work on this?
If not maybe someone from the community want to help work on this? 

Using stored procedures with IN / OUT and cursor types would be great. So far I 
think its only camel-mybatis that supports stored procedures natively with 
Camel.

 camel-sql - Add support for Callable statements
 ---

 Key: CAMEL-4725
 URL: https://issues.apache.org/jira/browse/CAMEL-4725
 Project: Camel
  Issue Type: New Feature
  Components: camel-sql
Affects Versions: 2.8.3
Reporter: Christian Müller
Assignee: Christian Müller
 Fix For: 2.12.0, Future


 See 
 [Nabble|http://camel.465427.n5.nabble.com/call-Oracle-Package-procedure-td5032133.html]
  for details.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (CAMEL-4725) camel-sql - Add support for Callable statements

2013-08-08 Thread JIRA

[ 
https://issues.apache.org/jira/browse/CAMEL-4725?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13733403#comment-13733403
 ] 

Christian Müller commented on CAMEL-4725:
-

I unassigned the ticket because I cannot work on it at present. Feel free to 
grab the ticket if you (not only Claus ;-) ) want to work on it.

 camel-sql - Add support for Callable statements
 ---

 Key: CAMEL-4725
 URL: https://issues.apache.org/jira/browse/CAMEL-4725
 Project: Camel
  Issue Type: New Feature
  Components: camel-sql
Affects Versions: 2.8.3
Reporter: Christian Müller
 Fix For: 2.12.0, Future


 See 
 [Nabble|http://camel.465427.n5.nabble.com/call-Oracle-Package-procedure-td5032133.html]
  for details.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (CAMEL-4725) camel-sql - Add support for Callable statements

2013-05-26 Thread Claus Ibsen (JIRA)

[ 
https://issues.apache.org/jira/browse/CAMEL-4725?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13667272#comment-13667272
 ] 

Claus Ibsen commented on CAMEL-4725:


This would be cool.

 camel-sql - Add support for Callable statements
 ---

 Key: CAMEL-4725
 URL: https://issues.apache.org/jira/browse/CAMEL-4725
 Project: Camel
  Issue Type: New Feature
  Components: camel-sql
Affects Versions: 2.8.3
Reporter: Christian Müller
Assignee: Christian Müller
 Fix For: Future


 See 
 [Nabble|http://camel.465427.n5.nabble.com/call-Oracle-Package-procedure-td5032133.html]
  for details.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira