I don't really understand what you mean by "to communicate with DB2 using MQSERIES".
If you have to receive messages from a queue and store their contents in the database, put a Message-Driven Bean on the queue (this implies JMS) and update your database using whatever database technique you've standardised on for your project.