Package flex.messaging.services.messaging.adapters

Examples of flex.messaging.services.messaging.adapters.JMSAdapter


       
        // <channels>
        msgDest.addChannel("qa-polling-amf");
       
        //Properties that appear in the destination above must "really" be set in a JMS adapter
        JMSAdapter adapter = new JMSAdapter();
        adapter.setId("jms");
        // Use JMSSettings object for the <jms> properties above
        JMSSettings js = new JMSSettings();
        js.setDestinationType("Topic");
        js.setMessageType("javax.jms.TextMessage");
        //js.setConnectionFactory("java:comp/env/jms/flex/TopicConnectionFactory");
        js.setDestinationJNDIName("java:comp/env/jms/topic/flex/simpletopic");
        js.setDeliveryMode("NON_PERSISTENT");
        js.setMessagePriority(javax.jms.Message.DEFAULT_PRIORITY);
        js.setAcknowledgeMode("AUTO_ACKNOWLEDGE");
        adapter.setJMSSettings(js);
        adapter.getJMSSettings();
        adapter.setDestination(msgDest);
       
        return msgDest;
    }
View Full Code Here


       
        // <channels>
        msgDest.addChannel("qa-polling-amf");
       
        //Properties that appear in the destination above must "really" be set in a JMS adapter
        JMSAdapter adapter = new JMSAdapter();
        adapter.setId("jms");
        // Use JMSSettings object for the <jms> properties above
        JMSSettings js = new JMSSettings();
        js.setDestinationType("Topic");
        js.setMessageType("javax.jms.TextMessage");
        js.setConnectionFactory("java:comp/env/jms/flex/TopicConnectionFactory");
        //js.setDestinationJNDIName("java:comp/env/jms/topic/flex/simpletopic");
        js.setDeliveryMode("NON_PERSISTENT");
        js.setMessagePriority(javax.jms.Message.DEFAULT_PRIORITY);
        js.setAcknowledgeMode("AUTO_ACKNOWLEDGE");
        adapter.setJMSSettings(js);
        adapter.getJMSSettings();
        adapter.setDestination(msgDest);
       
        return msgDest;
    }
View Full Code Here

        ServerSettings ss = new ServerSettings();
        ss.setDurable(false);
        destination.setServerSettings(ss);

        String adapterId = "jms";
        JMSAdapter adapter = (JMSAdapter)destination.createAdapter(adapterId);

        // JMS settings are set at the adapter level
        JMSSettings jms = new JMSSettings();
        jms.setDestinationType("Topic");
        jms.setMessageType("javax.jms.TextMessage");
        jms.setConnectionFactory("jms/flex/TopicConnectionFactory");
        jms.setDestinationJNDIName("jms/topic/flex/simpletopic");
        jms.setDeliveryMode("NON_PERSISTENT");
        //jms.setMessagePriority(javax.jms.Message.DEFAULT_PRIORITY);
        jms.setAcknowledgeMode("AUTO_ACKNOWLEDGE");
        jms.setMaxProducers(1);
        Hashtable envProps = new Hashtable();
        envProps.put("Context.SECURITY_PRINCIPAL", "anonymous");
        envProps.put("Context.SECURITY_CREDENTIALS", "anonymous");
        envProps.put("Context.PROVIDER_URL", "http://{server.name}:1856");
        envProps.put("Context.INITIAL_CONTEXT_FACTORY", "fiorano.jms.runtime.naming.FioranoInitialContextFactory");
        jms.setInitialContextEnvironment(envProps);
        adapter.setJMSSettings(jms);

        destination.setSecurityConstraint("sample-users");

        destination.addChannel("my-polling-amf");
    }
View Full Code Here

        js.setConnectionFactory("java:comp/env/jms/flex/TopicConnectionFactory");
        js.setDestinationType("Topic");       
        js.setMessageType("javax.jms.TextMessage");       
        js.setDestinationJNDIName("java:comp/env/jms/topic/flex/simpletopic");

        JMSAdapter adapter = new JMSAdapter();
        adapter.setId("jms");
        adapter.setJMSSettings(js);
        adapter.setDestination(msgDestination);

        if (msgService.isStarted())
            msgDestination.start();

        return "Destination: " + id + " created for Service: " + serviceId;
View Full Code Here

       
        // <channels>
        msgDest.addChannel("qa-polling-amf");
       
        //Properties that appear in the destination above must "really" be set in a JMS adapter
        JMSAdapter adapter = new JMSAdapter();
        adapter.setId("jms");
        // Use JMSSettings object for the <jms> properties above
        JMSSettings js = new JMSSettings();
        js.setDestinationType("Topic");
        js.setMessageType("javax.jms.TextMessage");
       
    String jndiAppend = "";
        if (getAppServer() == "tomcat")
        {
        //  System.out.println("***** running on TomCat - appending java:comp/env/ *****)");
            jndiAppend = "java:comp/env/";
        }
 
        Log.getLogger("QE.DEBUG").debug("jndiAppend =" + jndiAppend);
        System.out.println("appServer: " +  getAppServer() );
        if (getAppServer() == "jboss") {
          //  System.out.println("****running on jboss *****)");
          //  js.setConnectionFactory(jndiAppend + "jms/flex/TopicConnectionFactory");
          //  js.setDestinationJNDIName(jndiAppend + "jms/topic/flex/simpletopic");
          // Changing this to match the names in jbossmq-destinations-service.xml, jms-ds.xml (in \default\deploy\jms directory),
          // and messaging-config.xml on the jboss regression machine
                                               
            js.setConnectionFactory("java:XAConnectionFactory");
            js.setDestinationJNDIName("topic/FlexTopic");
        }
        else {
         //   System.out.println("***** not jboss *****)"); 
           js.setConnectionFactory(jndiAppend + "jms/flex/TopicConnectionFactory");
           js.setDestinationJNDIName(jndiAppend + "jms/topic/flex/simpletopic");
        }
       
        js.setDeliveryMode("NON_PERSISTENT");
        js.setMessagePriority(javax.jms.Message.DEFAULT_PRIORITY);
        js.setAcknowledgeMode("AUTO_ACKNOWLEDGE");
        adapter.setJMSSettings(js);
        adapter.getJMSSettings();
        adapter.setDestination(msgDest);
       
        return msgDest;
    }
View Full Code Here

TOP

Related Classes of flex.messaging.services.messaging.adapters.JMSAdapter

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.