There is one requirement that i have to read a file as jms Message object and pass it to the onMessage of MDB.
Is this possible to convert a String into a JMS Message object or to read the file as javax.jms.Message object?
Presuming your container of choice supports JCA your looking for a JCA for flat file that would call a registered MDB as described, I believe there are some free JCA adapters on source forge (I think) somewhere , they were all very trivial examples but i believe one was flat file, worth checking out to see if its exactly what you want.
If you just want a plain old java client reading the file contents in, creating the message and sending is all well documented on the net. I suspect most client side JMS examples look quite similar.
"Eagles may soar but weasels don't get sucked into jet engines" SCJP 1.6, SCWCD 1.4, SCJD 1.5,SCBCD 5
Eliminate 95% of the weeds in your lawn by mowing 3 inches or higher. Then plant tiny ads:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop