Hello

Im trying to use a camel type converter with Camel CDI.

My converter looks like the following:

@Converter
@SuppressWarnings("all")
public class TicketConverter {

  @Converter
  public SupportRequest convertToSupportRequest(final Ticket ticket) {
    SupportRequest sr = new SupportRequest();
    String _subject = ticket.getSubject();
    sr.setName(_subject);
    return sr;
  }
}

Then I have the following route:
public void configure() {

    from(ticketEndpoint) // returns a Ticket
    .to("jpa:my.domain.SupportRequest&persistenceUnit=camel"); // attempt
to persist SupportRequest
    }

Implicitly Transforming from Ticket to SupportRequest does not seem to
occur. In the JPA endpoint, it still tries to persist a Ticket object.

How do I tell camel to transform from Ticket to SupportRequest?

Thanks

Reply via email to