We'll start with a down-to-earth example and then return the coneptual question.
I am using Weblogic (10.3) as my Application Server. I want my application to have JMS capabilities and decided to let it use the Weblogic as the JMS / MOM provide. I setup a Queue in Weblogic and created an MDB class in my code.
Now I want to send a message to Weblgic queue. I used openJMS client. It required me to include the weblogic jar file in its classpath in order to send a message to weblogic.
And the same when I setup Weblogic to send message to the openJMS queue - I used Foreign Destination - it threw class not found exception until I placed openJMS jars in weblogic classpath.
This is becasue all JMS communication examples I saw use JNDI context to get the connection factory.
My question is: does that make sense? Isn't JMS suppose to be some neutral communication protocol? Meaning I can't decide to which JMS provider I am sending, at run-time, because I won't have its context classes in my classpath?
Or did I simply miss something in the setup?
Is there another way to preapre the connection factory to the remote provider?