The javax.jms classes are mainly
It should automatically use the relevent
implementation classes when you lookup the
ConnectionFactory in jndi.
We have startup classes (Startup class for Weblogic, MBean for JBoss) that populates the JNDI with Queue objects. The startup class reads a configuration file to determine if it should be Sonic or MQSeries queue objects.
The rest of our application just uses the standard JMS interfaces. The provider it ends up using is determined by what the startup class added to JNDI.