Blame view

backend/bpm-runtime/src/main/java/com/hotent/runtime/jms/PublishExtendJarConsumer.java 1.88 KB
8d73e917   陈威   初始化提交
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
//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));
////		}
////	}
//
//
//}