:" + textmessage.gettext ()); }else {break; }}} catch (JMSException e) {e.printstacktrace (); }}}Run
First, start Activemq, how to start activemq How to start, see the second blog post. Enter: http://localhost:8161/admin/in the browser and start execution:
Run the sender, Eclipse console output, such as:At this point, we first look at the ACTIVEMQ server, queues content as follows:We can see that a message queue called Hello
();
}
}
}); Thread.Sleep (1000000); }
} Queue up with an Oracle block and see the data in the Queues table when Java is not started. After starting Java, the console correctly outputs the message, and writes the message again through the Oracle program block, discovering that the console is handling the message correctly. The
First, IntroductionJMS, the Java Message Service Application interface, is an API for message-oriented middleware (MOM) in the Java platform for sending messages between two applications, or distributed systems, for asynchronous communication. The Java Messaging Service is a platform-agnostic API, and the vast majority of MOM providers support JMS.JMS allows appl
This example is used to familiarize yourself with the development process of JMS.
The result is that a servlet sends a message to a message driven Bean (MDB. The server is glassfish3.1.
First, create some JMS resources, including connectionfactory and a queue. In this example
Recently, there is a project to use JMS, and therefore a little learning.
A messaging service means that two or more clients can communicate by sending and receiving messages (in a peer-to-peer manner). A message is a "piece" of data sent by a client to another client via a message server, either textual or numeric, and the data can include objects if the client is a Java application. Where the client does
:
Non-underlying operating system software, non-business application software, not directly to the end user, not directly to the customer value of the software collectively referred to as middleware.
What is message middleware:
Focus on sending and receiving data and integrating distributed systems with efficient and reliable asynchronous message delivery mechanisms
Message Middleware Flowchart:Speaking of message middleware has to mention the
A profound understanding of JMS (Java Message Service) and jmsmessage
JMS has been available for a long time. This is especially true on the Internet, but most of the summary is not comprehensive and not specific. Based on the existing learning resources, I Will resummarize it:
JMS is called
(such as dBase or Microsoft Access) to a Working Group database server (for example, Sybase sql/anywhere). Then to the Enterprise database server (for example, DB2 or Oracle). No matter what your project looks like, there's always a database product that's affordable, performance, and functionality that you can use.
Like databases, MQ products are sometimes referred to as message-oriented middleware (MOM)
work. During the waiting period, the sender is in a blocking state. In the RPC system, the client and server must be online at the same time, but this requirement is usually difficult to meet. At the same time, mom is based on the Asynchronous interaction mechanism and abstracts a message queue. This message queue allows access over the network. Note that the "message" mentioned here refers to the requests
17) JMS: java Message Service (Java Message Service), jmsmessage
JMS is a standard, just like EJB, which has many open-source and commercial implementations. The specification corresponding to ms technology is jsr914. The implementation of the Specification is called jms
lost. And MQ is the equivalent of a middleware I send a request must first be communicated to the Message Queuing component, and then by the Message Queuing component to another server to request, have a response and then return to the original requestor, because the MessageQueue component will persist the message on the local, So even if the sudden crash, the request message is not lost. For example, we have a complex request to generate a report, t
be either a producer or a consumer, and a business system consisting of a JMS Provider. JMS enables us to send messages from one application to another through the messaging service (that is, JMS Provider, sometimes referred to as a message broker or a messaging server).The programming process for JMS is simple, and i
RPC: (Remote Procedure Call)A platform-neutral approach designed to communicate between applications, ignoring differences between operating systems and languages. Multi-lingual supportRMI: (Remote Method invocation)The Java version of RPC, the underlying technology of EJBRMI uses JRMP (Java Remote method Protocol) communication protocol, which is a kind of remote calling method built on TCP/IP protocol.RMI
Atitit. Java Queue Queue System and its own definition of the database-based queue summary o7t1. Block queue and non-clogging queue 12. Java.util.Queue interface. 13. Concurrentlinkedqueue 24. Blockingqueue Jam
For many friends, want to be familiar with JMS related development knowledge, online example write is also more chaotic, special manual compiled an example and server configuration, I hope you like, support my
1 JBoss Configuration Queue Message Queue
Open the JBoss install
Data Structure Java Implementation -- queue's "wonderful" second-priority queue, java queuePreface
In many cases, some data storage not only requires FIFO, but also sorting based on the priority of the data, that is, the priority must first go out, the priority of the same FIFO, in this case, the priority queue is u
Java multi-thread (9) blocking queue, java multi-thread blocking queue
Reprinted please indicate the source: http://blog.csdn.net/xingjiarong/article/details/48005091
In the previous blog, we introduced how to use Object locks, conditional locks, and more convenient synchronized keywords to implement multi-thread sync
Atitit. java queue System and custom database-Based queue summary o7t and atitito7t
Atitit. java queue System and custom database-Based queue summary o7t
1. Blocking queue and non-bloc
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.