Queue queue = (Queue) initialContext.lookup((String) args.get("queue-location"));
javax.jms.Queue queue = (javax.jms.Queue) initialContext.lookup((String) args.get("queue-location"));
    public void execute(Map transientVars, Map args, PropertySet ps) {        WorkflowEntry entry = (WorkflowEntry) transientVars.get("entry");        try {            Hashtable env = new Hashtable(args);            InitialContext initialContext = new InitialContext(env);            if (args.containsKey("queue-factory-location")) {                QueueConnectionFactory queueFactory = (QueueConnectionFactory) initialContext.lookup((String) args.get("queue-factory-location"));                QueueConnection conn = queueFactory.createQueueConnection();                conn.start();                QueueSession queueSession = conn.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);                Queue queue = (Queue) initialContext.lookup((String) args.get("queue-location"));                QueueSender sender = queueSession.createSender(queue);                TextMessage message = queueSession.createTextMessage();                populateMessage(message, entry, args);                sender.send(message);            } else if (args.containsKey("topic-factory-location")) {                TopicConnectionFactory topicFactory = (TopicConnectionFactory) initialContext.lookup((String) args.get("topic-factory-location"));                TopicConnection conn = topicFactory.createTopicConnection();                conn.start();                TopicSession topicSession = conn.createTopicSession(false, Session.AUTO_ACKNOWLEDGE);                Topic topic = (Topic) initialContext.lookup((String) args.get("topic-location"));                TopicPublisher publisher = topicSession.createPublisher(topic);                TextMessage message = topicSession.createTextMessage();                populateMessage(message, entry, args);                publisher.publish(message);            }        } catch (Exception ex) {            log.error("Error sending JMS message", ex);        }    }