This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Currently I have a MDB which listens to a Topic. The moment it recieves a message it needs to invoke the business logic methods encapsulated in Stateless Session Beans.
Should i write all the SLSB access code in MDB's onMessage method or should i keep all access code in a separate class & then create an instance of the this class in the MDB & invoke the method which encapsulates all the access code.
This is totally an architectural issue, which people around here would only be guessing at since we don't know the issues surrounding your application. Basically, is there some reason why you need to de-couple your MDB from your SLSB? If so, go for it. If not, why are you bothering? Each approach has merit within different contexts.