Since we're on a major migration process of this website, some component documents here are out of sync right now. In the meantime you may want to look at the early version of the new website
https://camel.apache.org/staging/
We would very much like to receive any feedback on the new site, please join the discussion on the Camel user mailing list.
JT/400 ComponentThe Maven users will need to add the following dependency to their <dependency> <groupId>org.apache.camel</groupId> <artifactId>camel-jt400</artifactId> <version>x.x.x</version> <!-- use the same version as your Camel core version --> </dependency> URI formatjt400://user:password@system/QSYS.LIB/LIBRARY.LIB/QUEUE.DTAQ[?options] To call remote program (Camel 2.7) jt400://user:password@system/QSYS.LIB/LIBRARY.LIB/program.PGM[?options] You can append query options to the URI in the following format, URI optionsFor the data queue message exchange:
For the remote program call (Camel 2.7)
UsageWhen configured as a consumer endpoint, the endpoint will poll a data queue on a remote system. For every entry on the data queue, a new Connection poolAvailable as of Camel 2.10 Connection pooling is in use from Camel 2.10 onwards. You can explicit configure a connection pool on the Jt400Component, or as an uri option on the endpoint. Remote program call (Camel 2.7)This endpoint expects the input to be either a String array or byte[] array (depending on format) and handles all the CCSID handling through the native jt400 library mechanisms. A parameter can be omitted by passing null as the value in its position (the remote program has to support it). After the program execution the endpoint returns either a String array or byte[] array with the values as they were returned by the program (the input only parameters will contain the same data as the beginning of the invocation) ExampleIn the snippet below, the data for an exchange sent to the public class Jt400RouteBuilder extends RouteBuilder { @Override public void configure() throws Exception { from("direct:george").to("jt400://GEORGE:EGROEG@LIVERPOOL/QSYS.LIB/BEATLES.LIB/PENNYLANE.DTAQ"); from("jt400://RINGO:OGNIR@LIVERPOOL/QSYS.LIB/BEATLES.LIB/PENNYLANE.DTAQ").to("mock:ringo"); } } Remote program call example (Camel 2.7)In the snippet below, the data Exchange sent to the direct:work endpoint will contain three string that will be used as the arguments for the program “compute” in the library “assets”. This program will write the output values in the 2nd and 3rd parameters. All the parameters will be sent to the direct:play endpoint. public class Jt400RouteBuilder extends RouteBuilder { @Override public void configure() throws Exception { from("direct:work").to("jt400://GRUPO:ATWORK@server/QSYS.LIB/assets.LIB/compute.PGM?fieldsLength=10,10,512&ouputFieldsIdx=2,3").to(“direct:play”); } } Writing to keyed data queuesfrom("jms:queue:input") .to("jt400://username:password@system/lib.lib/MSGINDQ.DTAQ?keyed=true"); Reading from keyed data queuesfrom("jt400://username:password@system/lib.lib/MSGOUTDQ.DTAQ?keyed=true&searchKey=MYKEY&searchType=GE") .to("jms:queue:output"); |