Developing Portable Clients

The Java Messaging Specification was developed to abstract access to
message-oriented middleware systems (MOMs). A client that writes JMS code
should be portable to any provider that implements this specification. If
code portability is important to you, be sure that you do the following in
developing clients:

Make sure your code does not depend on extensions or features
that are specific to Message Queue.

Administered
objects encapsulate provider-specific implementation and configuration information.
Besides allowing for portability, administered objects also make it much easier
to share connection factories between applications and to tune a JMS application
for performance and resource use. So, even if portability is not important
to you, you might still want to leave the work of creating and configuring
these objects to an administrator. For more information, see Looking Up a Connection Factory With JNDI and Looking Up a Destination With JNDI.