camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "" <>
Subject Re: JPA @Consumed
Date Thu, 12 Dec 2013 04:41:21 GMT
Abother question about @Consumed. Using the strategy as described in my last
post, what I am doing in selecting an ImportPayloadEntity, splitting this
entity which has a list of ItemEntities into individual ItemEntity objects
and processing each ItemEntity object.

During the processing of each ItemEntity object I call...

        item.setWorkingProcessedDatetime(new Date());  

Then once the route is finish in the ImportPayloadEntity bean I do something
like this...

	public void markConsumed() {
		boolean errors = false;
    	Collection<ItemEntity> itemEntities = this.getItems();
    	for (ItemEntity itemEntity: itemEntities){
    		if (itemEntity.getProcessedInd().equals(DaoConstants.ERROR)){
    			errors = true;
    	this.setProcessedInd(errors ? DaoConstants.ERROR :
		this.setProcessedDatetime(new Date());

This leads to the ImportPayloadEntity record in the db being updated. But
where this strategy fails is that when i do...

itemEntity.getWorkingProcessedInd() and
itemEntity.getWorkingProcessedDatetime() are both null. In other words it
has not remembered the values I set on the objects in my route.

It seems somewhere along the line my ItemEntity objects are not being passed
by reference. Am I right?
What would be a good way to fix this?


View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message