Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Where operationName is the name in the iBATIS XML configuration file which maps to the query, insert, update or delete operation you wish to evaluate.

Options

None

Samples

For example if you wish to poll a database for rows using iBATIS and then send them to a JMS Queue via ActiveMQ you could do

...

to

...

Or to consume beans from a JMS queue and insert them into a database you could do...

Code Block
from("activemq:Some.Queue").
  to("ibatis:insertAccount");

Options

...

Name

...

Default Value

...

Description

...

initialDelay

...

1000

...

Camel 1.3 and older: The number of milliseconds until the first poll when polling (consuming)

...

delay

...

500

...

Camel 1.3 and older: The number of milliseconds for the subsequent delays after the intial delay

...

useFixedDelay

...

false

...

Camel 1.3 and older: Whether or not the fixed delay is to be used, to enable a repeated timer

...

consumer.initialDelay

...

1000

...

Camel 1.4: The number of milliseconds until the first poll when polling (consuming)

...

consumer.delay

...

500

...

Camel 1.4: The number of milliseconds for the subsequent delays after the intial delay

Where insertAccount is the iBatis id in the SQL map file:

Code Block
xml
xml

  <!-- Insert example, using the Account parameter class -->
  <insert id="insertAccount" parameterClass="Account">
    insert into ACCOUNT (
      ACC_ID,
      ACC_FIRST_NAME,
      ACC_LAST_NAME,
      ACC_EMAIL
    )
    values (
      #id#, #firstName#, #lastName#, #emailAddress#
    )
  </insert>

Scheduled polling example

Since this component does not support scheduled polling you need to use another mechanism for triggering the scheduled pools such as the Timer or Quartz components.

In the sample below we poll the database using the Timer component:

TODO: snippet e1

...

consumer.useFixedDelay

...

false

...

Include Page
CAMEL:Endpoint See Also
CAMEL:Endpoint See Also

...