L.S., You can do this with servicemix-camel and the Camel components. An example: you could combine a camel-jaxb endpoint (to unmarshal the XML document into a POJO) and a camel-jpa endpoint (to store the POJO in the DB). This way, you would avoid having to do much coding yourself in cxf/bean, you could simply leverage the Camel components' functionality.
For the second question, you could create a simple bean that retrieves a single message from the queue using JMS and either use that bean with servicemix-camel (to add e.g. marshalling to XML) or expose it to the NMR directly using servicemix-bean/servicemix-cxfse. Regards, Gert ychawla wrote: > > Hello All, > I am a service mix newbie and am currently using version 3.2.2. I > currently have an HTTP endpoint is connected to a EIP recipient list. > That list sends the message out to a JMS queue, sends a transformed > message to another JMS and dumps it out to a folder. All done without > writing any Java code. Pretty cool! > > I am at the next phase now and have two questions: > > 1) I want to take this message and send it off to a custom POJO which will > stash in a database. From what I read, I can use servicemix-cxf se, > servicemix-bean or other components. According to this FAQ: > http://servicemix.apache.org/should-i-create-my-own-jbi-components.html > > I should not be creating a JBI component. That makes sense to me, but > what existing component should I use? I looked into servicemix-cxf-se but > that seemed to create a web service. So I figured servicemix-bean would > be more appropriate. I am confused which direction to go. > > 2) Now that I have message sitting on a JMS queue, I want to do something > with them. For example, I want to have a POJO that pops the latest > message off a queue and processes it. I don't want to listen to the queue > and get any new messages that appear, but retrieve message as consumers > demand them. Should I just write a java application in spring that > listens to a queue? Is there a better way to retrieve these message in > servicemix? > > Thanks, > Yogesh > ----- --- Gert Vanthienen http://gertvanthienen.blogspot.com -- View this message in context: http://www.nabble.com/Connecting-POJOs-to-Service-Mix-tp20234290p20256640.html Sent from the ServiceMix - User mailing list archive at Nabble.com.
