MyMessageDrivenPage.jsp


Dosyayı İndir
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@page import="javax.jms.*"%>
<%@page import="javax.naming.*"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">
<html>
    <body>
        <h2>İleti Gönderici</h2>
        <%
        String text="İletiyle Sürülen Taneye Metin";
        InitialContext context = new InitialContext();
        ConnectionFactory connectionFactory = (ConnectionFactory) context.lookup("MyConnectionFactory");
        Connection connection = connectionFactory.createConnection();
        Session jmsSession = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
        Queue queue = (Queue) context.lookup("MyQueue");
        MessageProducer producer = jmsSession.createProducer(queue);
        TextMessage message = jmsSession.createTextMessage();
        message.setText(text);
        producer.send(message);
        producer.send(jmsSession.createMessage());
        connection.close();
        %>
        Metin gönderildi : <%=text%>
    </body>
</html>

				
Dosyayı İndir

Bu Sayfayı Paylaş:




Bu Sayfayı Paylaş:

İletişim Bilgileri

Takip Et

Her Hakkı Saklıdır. Bu sitede yayınlanan tüm bilgi ve fikirlerin kullanımından fibiler.com sorumlu değildir. Bu sitede üretilmiş , derlenmiş içerikleri, fibiler.com'u kaynak göstermek koşuluyla kendi sitenizde kullanılabilirsiniz. Ancak telif hakkı olan içeriklerin hakları sahiplerine aittir