Package javax.jms

Examples of javax.jms.Destination


        List ret = new ArrayList();
        try {
            ObjectName adminObjectName = NameFactory.getComponentName(null,
                    null, destinationApplicationName, NameFactory.JCA_RESOURCE,
                    destinationModuleName, destinationName, null, baseContext);
            Destination dest = (Destination) kernel.invoke(adminObjectName,
                    "$getResource");
            if (dest instanceof Queue) {
                Queue queue = (Queue) dest;
                QueueConnectionFactory qConFactory = null;
                QueueConnection qConnection = null;
View Full Code Here


        public final String name = this.toString();

        public synchronized void onMessage(Message message) {
            try {
                Destination dest = message.getJMSDestination();
                List messages = null;
                if (!messagesMap.containsKey(dest)) {
                    register((Topic) dest);
                }
                messages = (List) messagesMap.get(dest);
View Full Code Here

            Map.Entry entry = (Map.Entry) iter.next();
            String key = entry.getKey().toString();
            if (key.startsWith(DESTINATION_PREFIX))
            {
                String jndiName = key.substring(DESTINATION_PREFIX.length());
                Destination dest = createDestination(entry.getValue().toString().trim());
                if (dest != null)
                {
                    data.put(jndiName, dest);
                }
            }
View Full Code Here

    public void testUnidirectionalHeartbeating() throws Exception
    {
        setTestSystemProperty(QPID_HEARTBEAT_INTERVAL,"1");
        AMQConnection receiveConn = (AMQConnection) getConnection();
        AMQConnection sendConn = (AMQConnection) getConnection();
        Destination destination = getTestQueue();
        TestListener receiveListener = new TestListener();
        TestListener sendListener = new TestListener();


        Session receiveSession = receiveConn.createSession(false, Session.CLIENT_ACKNOWLEDGE);
View Full Code Here

            setTestSystemProperty(ClientProperties.DEST_SYNTAX, "ADDR");
            setTestSystemProperty(InitialContext.INITIAL_CONTEXT_FACTORY, "org.apache.qpid.jndi.PropertiesFileInitialContextFactory");
            setTestSystemProperty(InitialContext.PROVIDER_URL,  f.toURI().toURL().toString());

            InitialContext context = new InitialContext();
            Destination dest = (Destination) context.lookup("topicExchange");
            assertNotNull("Lookup from URI based context should not be null", dest);
            assertTrue("Unexpected value from lookup", dest.toString().contains("destName"));

            ConnectionFactory factory = (ConnectionFactory) context.lookup("qpidConnectionfactory");
            assertTrue("ConnectionFactory was not an instance of AMQConnectionFactory", factory instanceof AMQConnectionFactory);
            assertEquals("Unexpected ConnectionURL value", CONNECTION_URL.replaceAll("password", "********"),
                        ((AMQConnectionFactory)factory).getConnectionURLString());
View Full Code Here

   
    ConnectionFactory connectionFactory = null;
        Connection connection = null;
        Session session = null;
        MessageProducer producer = null;
        Destination destination = null;
       
        try {
      connectionFactory = (ConnectionFactory) context.lookup("jms/RemoteConnectionFactory");
      System.out.println("Acquiring connection factory success, " + connectionFactory);
     
View Full Code Here

   
    ConnectionFactory connectionFactory = null;
        Connection connection = null;
        Session session = null;
        MessageProducer producer = null;
        Destination destination = null;
       
        try {
      connectionFactory = (ConnectionFactory) context.lookup("jms/RemoteConnectionFactory");
      System.out.println("Acquiring connection factory success, " + connectionFactory);
     
View Full Code Here

    Connection connection = factory.createConnection();
    connection.start();

    Session session = connection.createSession(true,
        Session.AUTO_ACKNOWLEDGE);
    Destination destination = session.createQueue(DESTINATION_NAME);
    MessageProducer producer = session.createProducer(destination);


    for(String event : events) {
      TextMessage message = session.createTextMessage();
View Full Code Here

    Connection connection = factory.createConnection();
    connection.start();

    Session session = connection.createSession(true,
        Session.AUTO_ACKNOWLEDGE);
    Destination destination = session.createTopic(DESTINATION_NAME);
    MessageProducer producer = session.createProducer(destination);


    for(String event : events) {
      TextMessage message = session.createTextMessage();
View Full Code Here

    public MessageProducerResources doCreateProducerModel() throws Exception {
        MessageProducerResources answer;
        Connection conn = getConnectionResource().borrowConnection();
        try {
            Session session = conn.createSession(isEndpointTransacted(), getAcknowledgeMode());
            Destination destination = getEndpoint().getDestinationCreationStrategy().createDestination(session, getDestinationName(), isTopic());
            MessageProducer messageProducer = JmsObjectFactory.createMessageProducer(session, destination, isPersistent(), getTtl());

            answer = new MessageProducerResources(session, messageProducer);

        } catch (Exception e) {
View Full Code Here

TOP

Related Classes of javax.jms.Destination

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.