You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by MarcF <mf...@toyota-europe.com> on 2011/08/25 09:37:44 UTC

Camel-JDBC + oracle PL/SQL

Dears

You will find below an example showing what I would like to achieve with
Camel 
Basically I would like to execute a PL/SQL block in an Oracle database and
to retrieve the result (which is a CLOB in this case)
I would be very happy if you could me 

Many thanks in advance

Marc

		<route>
             <from uri="timer://kickoff-send?period=10000"/>

			 <transform>
				<simple>					
					DECLARE
					  myClob CLOB ;
					BEGIN
					  myClob := 'This is my message...' ;
					END ;
				</simple>
			 </transform>
			 
             <to uri="jdbc:myDataSource"/>
			 
			 <to uri="activemq:myQueue"/>
				
		</route>
		
    <bean id="myDataSource"
class="org.springframework.jdbc.datasource.DriverManagerDataSource">
        <property name="driverClassName" value="oracle.jdbc.OracleDriver"/>
		<property name="url" value="jdbc:oracle:thin:xxx/xxx@myhostname:1521:ORCL"
/>
    </bean>	
			

--
View this message in context: http://camel.465427.n5.nabble.com/Camel-JDBC-oracle-PL-SQL-tp4733426p4733426.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel-JDBC + oracle PL/SQL

Posted by Owen Toalson <ow...@courts.mo.gov>.
I think you can accomplish this by creating a database stored function out of
your PL/SQL code and then call that function from an sql statement in your
sql map IE:

Select function_one( Parameters)   from dual.  


Of course you will need to use the camel-ibatis framework to access the
Oracle Database or some other datamapping framework (hibernate)

--
View this message in context: http://camel.465427.n5.nabble.com/Camel-JDBC-oracle-PL-SQL-tp4733426p4734416.html
Sent from the Camel - Users mailing list archive at Nabble.com.