Deployment
I think the harder part of this is configuring the activation spec that you need to "bind" to during deployment.
For that I'd link you to the WebSphere Knowledge Center:
Development / Java coding
The Java implementation itself is fairly straightforward. You might look at this example (though it's embedded in a Liberty sample repository).
Learn More
The high-level MDB topic in the Knowledge Center is also a good starting point.