Hi All, I have a problem with a program where it appears that objects are never released from memory. We are using Apache Camel and the HL7 component to read in HL7 messages. Everything is working, however after a few thousand messages, the program slows down and eventually stops working. We use JProfiler to determine where the issue may be coming from. We noticed that there are Object[], ArrayList, and other HL7 objects that are never cleaned by the GC and they just kept on growing. When the message gets unmarshaled it creates all of the objects like arrays, etc.
Currently we are using Camel 2.15.0 with Hapi 2.2. The code we have for the message processing: HL7DataFormat hl7 = new HL7DataFormat(); HapiContext hapiContext = new DefaultHapiContext(); hapiContext.getParserConfiguration().setValidating(false); hl7.setHapiContext(hapiContext); from("mina2:tcp://" + server + ":" + port + "?sync=true&codec=#hl7codec") .unmarshal(hl7) .onException(Exception.class) .handled(true) .transform(ack()) .end() .validate(messageConforms()) .choice() .when(header("CamelHL7TriggerEvent").isEqualTo("A01")).to("mock:a01").beanRef("adtMessageHandler", "handleAdmit").to("mock:a19").transform(ack()) .when(header("CamelHL7TriggerEvent").isEqualTo("A02")).to("mock:a02").beanRef("adtMessageHandler", "handleTransfer").to("mock:a19").transform(ack()) .when(header("CamelHL7TriggerEvent").isEqualTo("A03")).to("mock:a03").beanRef("adtMessageHandler", "handleDischarge").to("mock:a19").transform(ack()) ... .end() .marshal(hl7); We tried many things like onCompletion() and process() but the objects continue to stay in memory. Any suggestions would be greatly appreciated. Thank you in advance. -- View this message in context: http://camel.465427.n5.nabble.com/Problem-with-objects-not-being-released-from-memory-tp5787010.html Sent from the Camel - Users mailing list archive at Nabble.com.