//package com.hotent.runtime.jms; // //import com.hotent.base.constants.JmsConstant; //import com.hotent.base.util.*; //import com.hotent.runtime.manager.BpmExtendJarManager; //import com.hotent.runtime.model.BpmExtendJar; //import org.apache.activemq.command.ActiveMQTextMessage; //import org.slf4j.Logger; //import org.slf4j.LoggerFactory; //import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; //import org.springframework.jms.annotation.JmsListener; //import org.springframework.stereotype.Service; // //import javax.jms.JMSException; //import java.io.Serializable; //import java.util.ArrayList; //import java.util.List; //import java.util.Map; // //@Service //@ConditionalOnProperty(value="jms.enable", matchIfMissing = true) //public class PublishExtendJarConsumer { // // // // // // @JmsListener(destination = JmsConstant.BPM_REMOVE_EXTEND_CLASS, containerFactory="jmsListenerContainerTopic") // public void receiveRemove(Object model) throws JMSException { // logger.debug("[JMS]: Topic message is :" + model.getClass().getName() + "---" + model); // if (BeanUtils.isEmpty(model) || !(model instanceof ActiveMQTextMessage)) // return; // // ActiveMQTextMessage message = (ActiveMQTextMessage) model; // Serializable object = message.getText(); // if (!(object instanceof String)) { // return; // } // ExtendClassLoader.removeRegistedBean((String)object); // } // //// //// private void handlerJarPublish(Object source) throws JMSException { //// if (BeanUtils.isEmpty(source) || !(source instanceof ActiveMQTextMessage)) //// return; //// //// ActiveMQTextMessage message = (ActiveMQTextMessage) source; //// Serializable object = message.getText(); //// if (!(object instanceof String)) { //// return; //// } //// try { //// publishJar((String) object); //// } catch (Exception e) { //// logger.error(ExceptionUtil.getExceptionMessage(e)); //// } //// } // // //}