camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ebinsingh <>
Subject Re: convert Exchange Headers to JPA Entity
Date Thu, 15 Dec 2011 21:20:15 GMT
I am having trouble with fitting in the jpa entity. Not able to find the
correct syntax to do it.

I tried the below, but no data went into the database. The println's do
print out the entity data.

	public void process(Exchange exchange) throws Exception {
		MarsTracerEntity entity = new MarsTracerEntity();
		if(null != exchange.getIn().getHeader("CamelFileNameOnly"))
		if(null != exchange.getIn().getHeader("CamelBatchSize"))
		if(null != exchange.getIn().getHeader("breadcrumbId"))
		System.out.println("InputFilename  5555 : "+entity.getInputFileName());
		System.out.println("outputFilename  2222 : "+entity.getOutputFileName());
		System.out.println("Batch  1111 : "+entity.getBatchSize());
        JpaEndpoint endpoint = (JpaEndpoint) exchange.getContext()
        JpaTemplate jpaTemplate = endpoint.getTemplate();

Entity def:

public class MarsTracerEntity implements Serializable{

The intercept config in the Camel Context.

			<process ref="marsTraceProcessor"/>

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

View raw message