`
dengwanchuan
  • 浏览: 45173 次
  • 性别: Icon_minigender_1
  • 来自: 武汉
最近访客 更多访客>>
社区版块
存档分类
最新评论

Java中间件JMS(二)之ActiveMQ整合spring(一)

阅读更多

原文链接:http://blog.csdn.net/dwc_fly/article/details/10306805 

 

在上一章( Java中间件JMS之ActiveMQ入门http://blog.csdn.net/dengwanchuan/article/details/10241345)说到ActiveMQ能与spring进行整合,ActiveMQ与Spring进行整合有一定的好处,首先是可配置化,然后是能使用Spring的aop,tx等特性进行项目开发.

一.准备工作

我使用的是spring版本是4.0.0.M2,其他版本的也可以,只是配置不同,去Spring官网下载zip包,解开后将dist目录下的所有jar包(根据自己选择)拷贝到项目lib目录下并加入项目项目中的lib中,一般jms所需要的Spring的jar有:


二.代码开发

1.在src目录下新建applicationContext.xml文件并输入一下内容:

[html] view plaincopy
 
  1. <?xml version="1.0" encoding="GBK"?>  
  2. <beans xmlns="http://www.springframework.org/schema/beans"  
  3.     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"  
  4.     xsi:schemaLocation="http://www.springframework.org/schema/beans  
  5.            http://www.springframework.org/schema/beans/spring-beans.xsd">  
  6. </beans>  

 

2.引入spring,打开web.xml并将其内容修改为以下内容:

[html] view plaincopy
 
  1. <?xml version="1.0" encoding="GBK"?>  
  2. <web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"  
  3.     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"  
  4.     xsi:schemaLocation="http://java.sun.com/xml/ns/javaee   
  5.     http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">  
  6.     <context-param>  
  7.         <param-name>contextConfigLocation</param-name>  
  8.         <param-value>classpath*:applicationContext*.xml</param-value>  
  9.     </context-param>  
  10.     <servlet>  
  11.         <servlet-name>spring</servlet-name>  
  12.         <servlet-class>  
  13.             org.springframework.web.servlet.DispatcherServlet  
  14.         </servlet-class>  
  15.         <load-on-startup>1</load-on-startup>  
  16.     </servlet>  
  17.     <servlet-mapping>  
  18.         <servlet-name>spring</servlet-name>  
  19.         <url-pattern>/</url-pattern>  
  20.     </servlet-mapping>  
  21.     <welcome-file-list>  
  22.         <welcome-file>index.jsp</welcome-file>  
  23.     </welcome-file-list>  
  24. </web-app>  

3.配置JMSTemplate模板

 

类似于jdbcTemplate,首先要配置一个ConnectionFactory,之后要开始配置JmsTemplate模板了。最后是配置消息目标了。消息分为队列(Queue)和主题(Topic)两大类。在applicationContext.xml中加入如下内容:

 

[html] view plaincopy
 
  1. <!-- 配置JMS连接工厂 -->  
  2.     <bean id="connectionFactory"  
  3.         class="org.apache.activemq.ActiveMQConnectionFactory">  
  4.         <property name="brokerURL" value="tcp://localhost:61616" />  
  5.     </bean>  
  6.     <!-- 发送消息的目的地(队列) -->  
  7.     <bean id="queueDest"  
  8.         class="org.apache.activemq.command.ActiveMQQueue">  
  9.         <!-- 设置消息队列的名字 -->  
  10.         <constructor-arg index="0" value="myQueue" />  
  11.     </bean>  
  12.     <!-- 配置Jms模板  -->  
  13.     <bean id="jmsQueueTemplate"  
  14.         class="org.springframework.jms.core.JmsTemplate">  
  15.         <property name="connectionFactory" ref="connectionFactory" />  
  16.         <property name="defaultDestination" ref="queueDest" />  
  17.         <!--<property name="receiveTimeout" value="10000" />  -->  
  18.     </bean>  
  19.       
  20.     <!-- 发送消息的目的地(主题) -->  
  21.     <bean id="topicDest"  
  22.         class="org.apache.activemq.command.ActiveMQTopic">  
  23.         <!-- 设置消息队列的名字 -->  
  24.         <constructor-arg index="0" value="myTopic" />  
  25.     </bean>  
  26.     <!-- 配置TopicJms模板  -->  
  27.     <bean id="jmsTopicTemplate"  
  28.         class="org.springframework.jms.core.JmsTemplate">  
  29.         <property name="connectionFactory" ref="connectionFactory" />  
  30.         <property name="defaultDestination" ref="topicDest" />  
  31.         <!-- 配置是否为发布订阅者模式,默认为false -->  
  32.         <property name="pubSubDomain" value="true"/>  
  33.     <!--<property name="receiveTimeout" value="10000" />  -->  
  34.     </bean>  

 

receiveTimeout表示接收消息时的超时时间,设置的为10秒,因为如果不设置的话,加入接收消息时是阻塞着的,那么将一直阻塞下去。配置完成了。但是我不建议设置这个时间,如果到达设置时间之后,生产者没有运行,消费者接受到Message对象为null,测试可能会出现异常,而且消费者将停止接受消息.那么如何使用JmsTemplate发送消息呢?

spring的beanfactory得到一个jmsTemplate的实例和消息目标的实例,发送消息,够简单的吧。首先我们还从queue方式开始。下面我们就来编写具体代码。

4、编写Point-to-Point (点对点)代码

新建生产者类QueueProducerService.java,代码如下:

 

[java] view plaincopy
 
  1. package jms.mq.spring;  
  2.   
  3. import java.util.Date;  
  4.   
  5. import javax.jms.Destination;  
  6. import javax.jms.JMSException;  
  7. import javax.jms.Message;  
  8. import javax.jms.Session;  
  9. import javax.jms.TextMessage;  
  10. import org.springframework.jms.core.JmsTemplate;  
  11. import org.springframework.jms.core.MessageCreator;  
  12.   
  13. public class QueueProducerService{  
  14.     JmsTemplate jmsTemplate;  
  15.   
  16.     Destination destination;  
  17.   
  18.     public void send() {  
  19.         MessageCreator messageCreator = new MessageCreator() {  
  20.             public Message createMessage(Session session) throws JMSException {  
  21.                 TextMessage message = session.createTextMessage();  
  22.                 message.setText("QueueProducerService发送消息"+new Date());  
  23.                 return message;  
  24.             }  
  25.   
  26.         };  
  27.         jmsTemplate.send(this.destination,messageCreator);  
  28.     }  
  29.   
  30.     public void setJmsTemplate(JmsTemplate jmsTemplate) {  
  31.         this.jmsTemplate = jmsTemplate;  
  32.     }  
  33.       
  34.     public void setDestination(Destination destination) {  
  35.         this.destination = destination;  
  36.     }  
  37. }  

 

生产者编写完了,下面我们来编写消费者,上面说了,发送消息的时候,spring的beanfactory得到一个jmsTemplate的实例和消息目标的实例,然后发送,那么接受的时候肯定也是得到一个jmsTemplate的实例和消息目标的实例,然后接受,下面我们来看具体代码。

新建一个消费者类QueueConsumerService.java,具体代码如下:

 

[java] view plaincopy
 
  1. package jms.mq.spring;  
  2.   
  3. import javax.jms.Destination;  
  4. import javax.jms.JMSException;  
  5. import javax.jms.TextMessage;  
  6.   
  7. import org.springframework.jms.core.JmsTemplate;  
  8.   
  9.   
  10. public class QueueConsumerService{  
  11.   
  12.     JmsTemplate jmsTemplate;  
  13.   
  14.     Destination destination;  
  15.   
  16.     public void receive() {  
  17.         TextMessage message = (TextMessage) jmsTemplate.receive();  
  18.         try {  
  19.             System.out.println("QueueConsumerService收到消息:"+message.getText());  
  20.         } catch (JMSException e) {  
  21.             e.printStackTrace();  
  22.         }  
  23.     }  
  24.   
  25.     public void setJmsTemplate(JmsTemplate jmsTemplate) {  
  26.         this.jmsTemplate = jmsTemplate;  
  27.     }  
  28.   
  29.     public void setDestination(Destination destination) {  
  30.         this.destination = destination;  
  31.     }  
  32. }  

 

代码编写完毕,下面要进行bean的配置,在applicationContext.xml中加入如下代码实例化对象和依赖注入:

 

[html] view plaincopy
 
  1. <bean id="queueProducerService" class="jms.mq.spring.QueueProducerService">  
  2.     <property name="jmsTemplate" ref="jmsQueueTemplate" />  
  3.     <property name="destination" ref="queueDest" />  
  4. </bean>  
  5.   
  6. <bean id="queueConsumerService" class="jms.mq.spring.QueueConsumerService">  
  7.     <property name="jmsTemplate" ref="jmsQueueTemplate" />  
  8.     <property name="destination" ref="queueDest" />  
  9. </bean>  

 

需要的业务代码都已编写完毕,下面编写测试代码。新建一个生产者的测试类QueueProducerTest.java。具体代码如下:

[java] view plaincopy
 
  1. package jms.mq.spring;  
  2.   
  3. import org.springframework.context.ApplicationContext;  
  4. import org.springframework.context.support.ClassPathXmlApplicationContext;  
  5.   
  6. public class QueueProducerTest {  
  7.     private static ApplicationContext appContext = new ClassPathXmlApplicationContext( "applicationContext.xml");  
  8.   
  9.     private static void send() {  
  10.         QueueProducerService producerService = (QueueProducerService) appContext.getBean("queueProducerService");  
  11.         producerService.send();  
  12.     }  
  13.   
  14.     /** 
  15.      * @param args 
  16.      */  
  17.     public static void main(String[] args) {  
  18.         send();  
  19.     }  
  20.   
  21. }  

再建一个消费者的测试类,QueueConsumerTest.java,具体代码如下:

 

[java] view plaincopy
 
  1. package jms.mq.spring;  
  2.   
  3. import org.springframework.context.ApplicationContext;  
  4. import org.springframework.context.support.ClassPathXmlApplicationContext;  
  5.   
  6. public class QueueConsumerTest {  
  7.     private static ApplicationContext appContext = new ClassPathXmlApplicationContext( "applicationContext.xml");  
  8.   
  9.     private static void receive() {  
  10.         QueueConsumerService consumerService = (QueueConsumerService) appContext.getBean("queueConsumerService");  
  11.         consumerService.receive();  
  12.     }  
  13.   
  14.     public static void main(String[] args) {  
  15.         receive();  
  16.     }  
  17.   
  18. }  

 

 

5、运行point-point(点对点)程序

所有代码都编写完了,我们来看一下我们的劳动成果。运行生产者测试类。控制台打印出如下内容,画线标注的就是我们发送的内容:

6、编写Publisher/Subscriber(发布/订阅者)代码

新建发布者TopicPublisherService.java,内容如下:

[java] view plaincopy
 
  1. package jms.mq.spring;  
  2.   
  3. import java.util.Date;  
  4.   
  5. import javax.jms.Destination;  
  6. import javax.jms.JMSException;  
  7. import javax.jms.MapMessage;  
  8. import javax.jms.Message;  
  9. import javax.jms.Session;  
  10. import javax.jms.TextMessage;  
  11.   
  12. import org.springframework.jms.core.JmsTemplate;  
  13. import org.springframework.jms.core.MessageCreator;  
  14.   
  15. import jms.spring.QueueProducerService;  
  16.   
  17. public class TopicPublisherService{  
  18.     JmsTemplate jmsTemplate;  
  19.        
  20.     Destination destination;  
  21.  
  22.     public void send() {  
  23.         MessageCreator messageCreator = new MessageCreator() {  
  24.             public Message createMessage(Session session) throws JMSException {  
  25.                 TextMessage message = session.createTextMessage();  
  26.                 message.setText("QueueProducerService发送消息"+new Date());  
  27.                 return message;  
  28.             }  
  29.         };  
  30.         jmsTemplate.send(this.destination,messageCreator);  
  31.   
  32.     }  
  33.   
  34.     public void setJmsTemplate(JmsTemplate jmsTemplate) {  
  35.         this.jmsTemplate = jmsTemplate;  
  36.     }  
  37.   
  38.     public void setDestination(Destination destination) {  
  39.         this.destination = destination;  
  40.     }  
  41.   
  42. }  

再新建一个订阅者TopicSubscriberService.java,代码如下。

[java] view plaincopy
 
  1. package jms.mq.spring;  
  2.   
  3. import javax.jms.Destination;  
  4. import javax.jms.JMSException;  
  5. import javax.jms.TextMessage;  
  6.   
  7. import org.springframework.jms.core.JmsTemplate;  
  8.   
  9. import jms.spring.QueueConsumerService;  
  10.   
  11. public class TopicSubscriberService{  
  12.   
  13.     JmsTemplate jmsTemplate;  
  14.   
  15.     Destination destination;  
  16.   
  17.     public void receive() {  
  18.         TextMessage message = (TextMessage) jmsTemplate.receive();  
  19.         try {  
  20.             System.out.println("QueueConsumerService收到消息:"+message.getText());  
  21.         } catch (JMSException e) {  
  22.             e.printStackTrace();  
  23.         }  
  24.     }  
  25.   
  26.     public void setJmsTemplate(JmsTemplate jmsTemplate) {  
  27.         this.jmsTemplate = jmsTemplate;  
  28.     }  
  29.   
  30.     public void setDestination(Destination destination) {  
  31.         this.destination = destination;  
  32.     }  
  33. }  

在配置文件中applicationContext.xml增加如下配置:

[html] view plaincopy
 
  1. <span style="white-space:pre">  </span><bean id="topicPublisherService" class="jms.mq.spring.TopicPublisherService">  
  2.        <property name="jmsTemplate" ref="jmsTopicTemplate"/>  
  3.        <property name="destination" ref="topicDest"/>  
  4.     </bean>  
  5.    
  6.     <bean id="topicSubscriberService" class="jms.mq.spring.TopicSubscriberService">  
  7.        <property name="jmsTemplate" ref="jmsTopicTemplate"/>  
  8.        <property name="destination" ref="topicDest"/>  
  9.     </bean>  

 

编写测试程序发布者测试类,TopicPublisherTest.java

 

[java] view plaincopy
 
  1. package jms.mq.spring;  
  2.   
  3. import org.springframework.context.ApplicationContext;  
  4. import org.springframework.context.support.ClassPathXmlApplicationContext;  
  5.   
  6. public class TopicPublisherTest {  
  7.     private static ApplicationContext appContext = new ClassPathXmlApplicationContext( "applicationContext.xml");  
  8.   
  9.     private static void send() {  
  10.         TopicPublisherService topicPublisherService = (TopicPublisherService) appContext.getBean("topicPublisherService");  
  11.         topicPublisherService.send();  
  12.     }  
  13.   
  14.     public static void main(String[] args) {  
  15.         send();  
  16.     }  
  17. }  

编写测试程序订阅者测试类,TopicSubscriberTest.java

[java] view plaincopy
 
  1. package jms.mq.spring;  
  2.   
  3. import org.springframework.context.ApplicationContext;  
  4. import org.springframework.context.support.ClassPathXmlApplicationContext;  
  5.   
  6. public class TopicSubscriberTest {  
  7.     private static ApplicationContext appContext = new ClassPathXmlApplicationContext( "applicationContext.xml");  
  8.   
  9.     private static void receive() {  
  10.         TopicSubscriberService topicSubscriberService = (TopicSubscriberService) appContext.getBean("topicSubscriberService");  
  11.         topicSubscriberService.receive();  
  12.     }  
  13.   
  14.     public static void main(String[] args) {  
  15.         receive();  
  16.     }  
  17. }  

7.Publisher/Subscriber(发布/订阅者)程序

先运行订阅者,再运行发布者,可以看到订阅者能打印信息;但是反之就不行,这就是Publisher/Subscriber(发布/订阅者)的特性;

跟Point-Point(点对点)对比的话,不管运行生存者还是消费者,都会打印信息,可以阅读前一章http://blog.csdn.net/dengwanchuan/article/details/10241345了解这两种模式的区别和联系。

 

 

附加完整的applicationContext.xml配置文件

 

[html] view plaincopy
 
  1. <?xml version="1.0" encoding="GBK"?>  
  2. <beans xmlns="http://www.springframework.org/schema/beans"  
  3.     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"  
  4.     xsi:schemaLocation="http://www.springframework.org/schema/beans  
  5.            http://www.springframework.org/schema/beans/spring-beans.xsd">  
  6.     <!-- 配置JMS连接工厂 -->  
  7.     <bean id="connectionFactory"  
  8.         class="org.apache.activemq.ActiveMQConnectionFactory">  
  9.         <property name="brokerURL" value="tcp://localhost:61616" />  
  10.     </bean>  
  11.     <!-- 发送消息的目的地(队列) -->  
  12.     <bean id="queueDest"  
  13.         class="org.apache.activemq.command.ActiveMQQueue">  
  14.         <!-- 设置消息队列的名字 -->  
  15.         <constructor-arg index="0" value="myQueue" />  
  16.     </bean>  
  17.     <!-- 配置Jms模板  -->  
  18.     <bean id="jmsQueueTemplate"  
  19.         class="org.springframework.jms.core.JmsTemplate">  
  20.         <property name="connectionFactory" ref="connectionFactory" />  
  21.         <property name="defaultDestination" ref="queueDest" />  
  22.         <!--<property name="receiveTimeout" value="10000" />  -->  
  23.     </bean>  
  24.       
  25.     <!-- 发送消息的目的地(主题) -->  
  26.     <bean id="topicDest"  
  27.         class="org.apache.activemq.command.ActiveMQTopic">  
  28.         <!-- 设置消息队列的名字 -->  
  29.         <constructor-arg index="0" value="myTopic" />  
  30.     </bean>  
  31.     <!-- 配置TopicJms模板  -->  
  32.     <bean id="jmsTopicTemplate"  
  33.         class="org.springframework.jms.core.JmsTemplate">  
  34.         <property name="connectionFactory" ref="connectionFactory" />  
  35.         <property name="defaultDestination" ref="topicDest" />  
  36.         <!-- 配置是否为发布订阅者模式,默认为false -->  
  37.         <property name="pubSubDomain" value="true"/>  
  38.     <!--<property name="receiveTimeout" value="10000" />  -->  
  39.     </bean>  
  40.       
  41.     <bean id="queueProducerService" class="jms.mq.spring.QueueProducerService">  
  42.         <property name="jmsTemplate" ref="jmsQueueTemplate" />  
  43.         <property name="destination" ref="queueDest" />  
  44.     </bean>  
  45.   
  46.     <bean id="queueConsumerService" class="jms.mq.spring.QueueConsumerService">  
  47.         <property name="jmsTemplate" ref="jmsQueueTemplate" />  
  48.         <property name="destination" ref="queueDest" />  
  49.     </bean>  
  50.       
  51.       
  52.     <bean id="topicPublisherService" class="jms.mq.spring.TopicPublisherService">  
  53.        <property name="jmsTemplate" ref="jmsTopicTemplate"/>  
  54.        <property name="destination" ref="topicDest"/>  
  55.     </bean>  
  56.    
  57.     <bean id="topicSubscriberService" class="jms.mq.spring.TopicSubscriberService">  
  58.        <property name="jmsTemplate" ref="jmsTopicTemplate"/>  
  59.        <property name="destination" ref="topicDest"/>  
  60.     </bean>  
  61. </beans>  
分享到:
评论
2 楼 dengwanchuan 2013-09-04  
pansonphy 写道
public class TopicPublisherService implements QueueProducerService和
public class TopicSubscriberService implements QueueConsumerService
这两个是不是有问题啊

是不是应该改成

public class TopicPublisherService extends QueueProducerService和
public class TopicSubscriberService extends QueueConsumerService



是有这个问题,避免程序复杂化,把implements 去掉了。TopicPublisherService 继承QueueProducerService也不好,他们是不同的模式,但是TopicPublisherService 和QueueProducerService可以抽象成一个父类.
1 楼 pansonphy 2013-09-03  
public class TopicPublisherService implements QueueProducerService和
public class TopicSubscriberService implements QueueConsumerService
这两个是不是有问题啊

是不是应该改成

public class TopicPublisherService extends QueueProducerService和
public class TopicSubscriberService extends QueueConsumerService

相关推荐

    消息中间件ActiveMQ及Spring整合JMS.docx

    ——学习参考资料:仅用于个人学习使用! 本代码仅作学习交流,切勿用于商业用途,否则后果自负。若涉及侵权,请联系,会尽快处理! 未进行详尽测试,请自行调试!

    activemq消息中间件的使用demo,以及spring集合jms实现消息发送和处理。

    activemq消息中间件的使用demo,以及spring集合jms实现消息发送和处理。

    JMS+activeMQ消息中间件

    最全的基于spring mvc的JMS+activeMQ实现的消息中间件代码例子,源程序和apache-activemq-5.10.0-bin.zip

    ActiveMQ实例

    activemq与spring整合,activemq与swing整合 activemq与ajax整合

    activemq新手大全

    一、JMS基本概念 二、activemq介绍及安装 1、消息中间件简介 2、activemq ...四、activemq整合spring运用 五、activemq常见问题 5.1 activemq 消息传递 5.2 activemq 消息确认机制 5.3 activemq 持久化机制

    jms-spring.zip

    java消息中间件学习-Spring集成JMS连接ActiveMQ demo

    ActiveMQ详细入门使用教程_java_MQ_

    MQ是消息中间件,是一种在分布式系统中应用程序借以传递消息的媒介,常用的有ActiveMQ,RabbitMQ,kafka。ActiveMQ是Apache下的开源项目,完全支持JMS1.1和J2EE1.4规范的JMS Provider实现。?特点:?1、支持多种语言...

    ActiveMQ消息服务器.rar

    ActiveMQ 是一个完全支持JMS1.1和J2EE 1.4规范的 JMS Provider实现,尽管JMS规范出台已经是很久的事情了,但是JMS在当今的J2EE应用中间仍然扮演着特殊的地位。 ActiveMQ的特点: 支持来自Java,C,C ++,C#,Ruby,...

    apache-activemq-5.15.0-bin.tar.7z

    MQ是消息中间件,是一种在分布式系统中应用程序借以传递消息的媒介,常用的有ActiveMQ,RabbitMQ,kafka。ActiveMQ是Apache下的开源项目,完全支持JMS1.1和J2EE1.4规范的JMS Provider实现。 特点: 1、支持多种...

    Learn Apache ActiveMQ

    由于ActiveMQ是一个纯Java程式,因此只需要操作系统支援Java虚拟机,ActiveMQ便可执行。 支持Java消息服务 (JMS) 1.1 版本 Spring Framework 集群 (Clustering) 支持的编程语言包括:C、C++、C#、Delphi、Erlang、...

    消息中间件activemq项目demo

    消息中间件activemq的入门demo,以及集成了spring管理jsm的初始化管理,简化发送消息的步骤。前后两个项目的对比,凸显出spring的优点

    将Sun的Open Message Queue与Spring集成

    基于JMS标准的消息中间件实现的产品有很多,JBossMQ、ActiveMQ、OpenMQ、OpenJMS等等,最常用的还是apache的ActiveMQ。有时也使用Sun的OpenMQ。在官网http://mq.java.net/处可以下载。Open Message Queue是Sun Java ...

    ActiveMQ从入门到精通(一)

    这是关于消息中间件ActiveMQ的一个系列专题文章,将涵盖JMS、ActiveMQ的初步入门及API详细使用、两种经典的消息模式(PTP andPub/Sub)、与Spring整合、ActiveMQ集群、监控与配置优化等。话不多说,我们来一起瞧一瞧...

    ActiveMQDemo:这是关于消息中间件ActiveMQ的WEB项目,将覆盖JMS,ActiveMQ的初始入门和API详细使用,两种经典的消息模式(PTP和PubSub),与Spring集成,ActiveMQ进行监控,监控与配置优化等。不多说,直接撸原始码!

    ActiveMQDemo:这是关于消息中间件ActiveMQ的WEB项目,将覆盖JMS,ActiveMQ的初始入门和API详细使用,两种经典的消息模式(PTP和PubSub),与Spring集成,ActiveMQ进行监控,监控与配置优化等。不多说,直接撸原始码...

    ActiveMQ.rar

    一: ActiveMQ简介 包括:是什么、能干什么、特点;消息中间件的功能、特点、应用场景等 n 二: ActiveMQ安装和基本使用 包括:通过源码安装、基本的配置示例、启动、测试运行、关闭等 n 三:理解和掌握JMS 包括:...

    实战ActiveMQ集群与应用视频教程.zip

    1:ActiveMQ入门和消息中间件 2:JMS基本概念和模型 3:JMS的可靠性机制 4:JMS的API结构和开发步骤 5:Broker的启动方式 6:ActiveMQ结合Spring开发 7:ActiveMQ支持的传输协议 8:ActiveMQ消息存储持久化 9:...

    JavaEE企业级开发的面试题汇总

    JavaEE企业级开发的面试题汇总,内容...5.JMS中间件:关于ActiveMQ消息中间件相关的面试题 6.RPC中间件DUBBO的面试题 7.注册中心zookeeper的面试题 8.MAVN和solr的面试题 9.分布式事务、分面式锁、高并发相关的面试题等

    springCloud

    而Spring Cloud Netflix项目是Spring Cloud的子项目之一,主要内容是对Netflix公司一系列开源产品的包装,它为Spring Boot应用提供了自配置的Netflix OSS整合。通过一些简单的注解,开发者就可以快速的在应用中配置...

    JAVA上百实例源码以及开源项目

     Java二进制IO类与文件复制操作实例,好像是一本书的例子,源代码有的是独立运行的,与同目录下的其它代码文件互不联系,这些代码面向初级、中级Java程序员。 Java访问权限控制源代码 1个目标文件 摘要:Java源码,...

    java开源包4

    Blister是一个用于操作苹果二进制PList文件格式的Java开源类库(可用于发送数据给iOS应用程序)。 重复文件检查工具 FindDup.tar FindDup 是一个简单易用的工具,用来检查计算机上重复的文件。 OpenID的Java客户端...

Global site tag (gtag.js) - Google Analytics