Issue Details (XML | Word | Printable)

Key: CAMEL-430
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Claus Ibsen
Reporter: Peter Jones
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
Apache Camel

consumeDelete=false option of etl sample doesn't seem to work

Created: 02/Apr/08 12:20 PM   Updated: 12/May/08 05:45 AM
Return to search
Component/s: camel-jpa, examples
Affects Version/s: 1.2.0, 1.3.0
Fix Version/s: 1.3.0

Time Tracking:
Not Specified


 Description  « Hide
In org/apache/camel/example/etl/EtlRoutes.java, the following line:
from("jpa:org.apache.camel.example.etl.CustomerEntity?consumeDelete=false?consumer.delay=3000&consumeLockEntity=false")
        .setHeader(FileComponent.HEADER_FILE_NAME, el("${in.body.userName}.xml"))
        .to("file:target/customers?append=false");

seems to successfully dump the database entries to files in the target/customers directory. Unless I'm misunderstanding the sample, the consumeDelete=false is meant to ensure that the dump of the database does not delete the entries from the database. However, when running the etl sample querying the customer table in the database, the list is empty. I suspect the consumeDelete=false isn't working.



 All   Comments   Work Log   Change History   Subversion Commits   FishEye   Crucible      Sort Order: Ascending order - Click to sort in descending order
Claus Ibsen made changes - 02/Apr/08 09:50 PM
Field Original Value New Value
Component/s camel-jpa [ 11645 ]
Description
In org/apache/camel/example/etl/EtlRoutes.java, the following line:

    from("jpa:org.apache.camel.example.etl.CustomerEntity?consumeDelete=false?consumer.delay=3000&consumeLockEntity=false")
        .setHeader(FileComponent.HEADER_FILE_NAME, el("${in.body.userName}.xml"))
        .to("file:target/customers?append=false");

seems to successfully dump the database entries to files in the target/customers directory. Unless I'm misunderstanding the sample, the consumeDelete=false is meant to ensure that the dump of the database does not delete the entries from the database. However, when running the etl sample querying the customer table in the database, the list is empty. I suspect the consumeDelete=false isn't working.
In org/apache/camel/example/etl/EtlRoutes.java, the following line:

    from("jpa:org.apache.camel.example.etl.CustomerEntity?consumeDelete=false?consumer.delay=3000&consumeLockEntity=false")
        .setHeader(FileComponent.HEADER_FILE_NAME, el("${in.body.userName}.xml"))
        .to("file:target/customers?append=false");

seems to successfully dump the database entries to files in the target/customers directory. Unless I'm misunderstanding the sample, the consumeDelete=false is meant to ensure that the dump of the database does not delete the entries from the database. However, when running the etl sample querying the customer table in the database, the list is empty. I suspect the consumeDelete=false isn't working.
Affects Version/s 1.2.0 [ 11822 ]
Affects Version/s 1.3.0 [ 11840 ]
Fix Version/s 1.4.0 [ 11849 ]
Claus Ibsen added a comment - 02/Apr/08 09:51 PM
A few other options hasnt been documented

flushOnSend (default = true)
maximumResults (default = -1)


Claus Ibsen made changes - 02/Apr/08 09:51 PM
Description In org/apache/camel/example/etl/EtlRoutes.java, the following line:

    from("jpa:org.apache.camel.example.etl.CustomerEntity?consumeDelete=false?consumer.delay=3000&consumeLockEntity=false")
        .setHeader(FileComponent.HEADER_FILE_NAME, el("${in.body.userName}.xml"))
        .to("file:target/customers?append=false");

seems to successfully dump the database entries to files in the target/customers directory. Unless I'm misunderstanding the sample, the consumeDelete=false is meant to ensure that the dump of the database does not delete the entries from the database. However, when running the etl sample querying the customer table in the database, the list is empty. I suspect the consumeDelete=false isn't working.
In org/apache/camel/example/etl/EtlRoutes.java, the following line:

{code}
    from("jpa:org.apache.camel.example.etl.CustomerEntity?consumeDelete=false?consumer.delay=3000&consumeLockEntity=false")
        .setHeader(FileComponent.HEADER_FILE_NAME, el("${in.body.userName}.xml"))
        .to("file:target/customers?append=false");
{code}

seems to successfully dump the database entries to files in the target/customers directory. Unless I'm misunderstanding the sample, the consumeDelete=false is meant to ensure that the dump of the database does not delete the entries from the database. However, when running the etl sample querying the customer table in the database, the list is empty. I suspect the consumeDelete=false isn't working.
Claus Ibsen added a comment - 02/Apr/08 10:08 PM
It was just a mistyped URI in the sample.

The JPA component works fine.
I will spin off a new task for the missing options in the wiki


Claus Ibsen made changes - 02/Apr/08 10:08 PM
Resolution Fixed [ 1 ]
Status Open [ 1 ] Resolved [ 5 ]
Claus Ibsen added a comment - 02/Apr/08 10:09 PM
committed a fix to trunk

Claus Ibsen made changes - 02/Apr/08 10:09 PM
Assignee Claus Ibsen [ davsclaus ]
644169 by  Claus Ibsen (1 file)
02/Apr/08 10:10 PM (19 months, 17 days ago)
Hadrian Zbarcea made changes - 03/Apr/08 04:10 PM
Fix Version/s 1.4.0 [ 11849 ]
Fix Version/s 1.3.0 [ 11840 ]
Claus Ibsen added a comment - 12/May/08 05:45 AM
Closed all 1.3 tickets

Claus Ibsen made changes - 12/May/08 05:45 AM
Status Resolved [ 5 ] Closed [ 6 ]
Create crucible review for this changeset in