JMS Configuration in a java application deployed in Glassfish server
===

Requirement is to have a generic solution to talk to any JMS Provider. 

Application server: Glassfish v3.1.1

After some initial investigation, we have decided to use ActiveMQ as our JMS Provider. 
Steps followed:
1. Downloaded and installed ActiveMQ on windows. 
2. Downloaded and deployed the genericra - generic jms resource adapter in glassfish. 
Understanding was using genericra, it becomes a generic solution from application. If activemq adapter is used, it becomes very tightly coupled. Any new JMS providers, we have to redo lot of things. Hope our understanding is correct. 
3. Created a resource adapter config object for the same. This resource adapter config has the brokerURL which says tcp://localhost:616161 (Hope it is fine?)

4. Created Connectionfactory and Destination resources in glassfish. 
Under glassfish admin console, created a Connector Connection Pool, Connection Factory and Destination Resource by specifying the JNDI Name. Every time, we select the resource adapter as genericra during this. So I assume these connection factory and destination now will point to the ActiveMQ through generic ra. And not creating and referring locally(OpenMQ). Am I right?

5. Should we not use / in JNDI name or name of Queue/topic/ConnectionFactory? 
6. PhysicalName property specified while creating administered object queue, will ideally should create a Physical Destination in remote ActiveMQ. Rt?
7. Created a queue in ActiveMQ admin console with same name as JNDI name of administered object in glassfish. Now a question here - Creating a queue in ActiveMQ console will create only a Physical Destination rt? Because, we hv created the destination with a JNDI name in glassfish. 
8. A sample program written to connect to queue and send message from glassfish app. With this, my question here is, I have just said new InitialContext() i.e. without any ActiveMQ provider URLs. But i am able to look up connectionfactory and queue using JNDI. How is it working? I was thinking I have to pass hashtable values with remote ActiveMQ urls to create it. 

9. Even though there is no error in look up of conn factory and queue, it fails in statement session.createProducer(destination) with nullpointer exception
 - at org.apache.activemq.command.ActiveMQDestination.hashCode(ActiveMQDestination.java:329)
	at java.util.HashMap.get(HashMap.java:300)
Not sure how to proceed??

10. Simple MDB program configuration in glassfish. Apart from writing MDB with annontation, what additional xml files to be configured? Lot of places talk about ejb-jar.xml, glassfish-ejb-jar.xml files. Some placed I saw even glassfish-resources xml file. What are the mandatory configuration files?

I am really a newbie to JMS core implementations. Sorry if the questions are too basic. 
Waiting for the feedback to my questions...
