« Return to Thread: Call stored procedure on jdbc:inbound-endpoint - with no arguments

Re: Call stored procedure on jdbc:inbound-endpoint - with no arguments

by stigisamule :: Rate this Message:

Reply to Author | View in Thread

Hi Antoine - yes I've read the wiki (but maybe I've not understood it :-)

The problem is that I would like to run the proc as the *inbound
endpoint *triggered by a polling frequency.
The wiki is describing usage of stored procs as outbound endpoints.

/Stig


Antoine Borg skrev:

> Have you seen the wiki on this subject?
>
> http://www.mulesource.org/display/MULE2USER/JDBC+Transport#JDBCTransport-StoredProc 
>
>
> HTH
>
> A
>
> Stig Melling wrote:
>> I'm not able to figure out how to call a stored proc on a
>> jdbc:inbound-endpoint with no arguments
>>
>> Heres my code
>> <jdbc:connector name="jdbcConnector"  dataSource-ref="dataSource" >
>>    <jdbc:query key="myQuery" value="call myStoredProcedure()" />
>> </jdbc:connector>
>>
>> ...
>> <model name="test>
>>        <service name="getData">
>>            <inbound>
>>                <jdbc:inbound-endpoint pollingFrequency="10000"
>> queryKey="myQuery" connector-ref="jdbcConnector"/>
>>            </inbound>
>>        </service>
>> </model>
>>
>>
>>
>> I get the following error message
>> java.sql.SQLException: Incorrect syntax near ')'. Query: call
>> myStoredProcedure() Parameters: []
>>    at
>> org.apache.commons.dbutils.QueryRunner.rethrow(QueryRunner.java:359)
>>    at org.apache.commons.dbutils.QueryRunner.query(QueryRunner.java:240)
>>    at
>> org.mule.transport.jdbc.JdbcMessageReceiver.getMessages(JdbcMessageReceiver.java:202)
>>
>>    at
>> org.mule.transport.TransactedPollingMessageReceiver.poll(TransactedPollingMessageReceiver.java:136)
>>
>>    at
>> org.mule.transport.PollingReceiverWorker.run(PollingReceiverWorker.java:47)
>>
>>    at org.mule.work.WorkerContext.run(WorkerContext.java:310)
>>    at
>> edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1061)
>>
>>    at
>> edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:575)
>>
>>    at java.lang.Thread.run(Unknown Source)
>>
>>
>> How to call a stored proc with no arguments as the inbound-endpoint?
>>
>> Regards,
>> Stig Melling
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>>    http://xircles.codehaus.org/manage_email
>>
>>
>>
>>



---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


 « Return to Thread: Call stored procedure on jdbc:inbound-endpoint - with no arguments