public class Sender {
private static final int SEND_NUMBER = 5;
public static void main(String[] args) { // ConnectionFactory :连接工厂,JMS 用它创建连接
ConnectionFactory connectionFactory = null; // Connection :JMS 客户端到JMS Provider 的连接
Connection connection = null;
//Session:one sender or receiver message singleton thread and provide a transaction context
Session session = null; /**
* Destination:message destination,sender who
* it include two message domain:Point-to-Point(Destinational call queue)
* and Publisher/Sucscribler Model(Destinational call topic)
* Point-To-Point character:one message can only one consumer
* between message produer and consumer have no relationship.No matter consumer whether is running
* status when producer send message,It can receiver message
* Publisher/Subscribler:one message has many consumer
* producer and consumer have relationship.Subscribler one topic consumer can only