提交 6f3ef609 编写于 作者: Z Zhou Rui

初级版本实现ContainerEntity

上级 00cb4dbd
......@@ -3,8 +3,10 @@
"includes": [],
"excludes": [],
"batchSize": 1000.0,
"mode": "lite",
"###enable": "是否启用.###",
"###includes": "导出导入包含对象,可以使用通配符*.###",
"###excludes": "导出导入排除对象,可以使用通配符*.###",
"###batchSize": "批量对象数量.###"
"###batchSize": "批量对象数量.###",
"###mode": "导出数据模式,lite|full,默认使用lite###"
}
\ No newline at end of file
......@@ -146,4 +146,4 @@ if [ -d ${current_dir}/local/update ]; then
rm -Rf ${current_dir}/local/update
fi
fi
setsid ${current_dir}/jvm/linux/bin/java -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=20000 -Djava.awt.headless=true -Xms2g -Xmx8g -XX:+UseG1GC -XX:+HeapDumpOnOutOfMemoryError -jar ${current_dir}/console.jar
\ No newline at end of file
setsid ${current_dir}/jvm/linux/bin/java -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.port=1099 -Dcom.sun.management.jmxremote.authenticate=false -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=20000 -Djava.awt.headless=true -Xms2g -Xmx8g -XX:+UseG1GC -XX:+HeapDumpOnOutOfMemoryError -jar ${current_dir}/console.jar
\ No newline at end of file
......@@ -22,21 +22,21 @@ public @interface ContainerEntity {
/**
* 执行dump时分组数量
*/
public int dumpSize();
public int dumpSize() default 1000;
/**
* 类型
*/
public Type type();
public Type type() default Type.content;
/**
* 引用,强数据,软数据(软数据不会影响系统运行)
*/
public Reference reference();
public Reference reference() default Reference.strong;
public enum Type {
element, content, log;
element, content, log, custom;
}
public enum Reference {
......
......@@ -61,7 +61,10 @@ public class DynamicEntityBuilder {
public JavaFile build() throws Exception {
AnnotationSpec annotationSpec_entity = AnnotationSpec.builder(Entity.class).build();
AnnotationSpec annotationSpec_containerEntity = AnnotationSpec.builder(ContainerEntity.class).build();
AnnotationSpec annotationSpec_containerEntity = AnnotationSpec.builder(ContainerEntity.class)
.addMember("dumpSize", "500")
.addMember("type", "com.x.base.core.entity.annotation.ContainerEntity.Type.custom")
.addMember("reference", "com.x.base.core.entity.annotation.ContainerEntity.Reference.strong").build();
AnnotationSpec annotationSpec_table = AnnotationSpec.builder(Table.class)
.addMember("name", "\"" + dynamicEntity.tableName() + "\"")
.addMember("uniqueConstraints", "{@javax.persistence.UniqueConstraint(name = \""
......@@ -119,16 +122,16 @@ public class DynamicEntityBuilder {
}
private void createIdField(Builder builder) {
// public String getId() {
// return id;
// }
// public void setId(String id) {
// this.id = id;
// }
// @FieldDescribe("数据库主键,自动生成.")
// @Id
// @Column(length = length_id, name = ColumnNamePrefix + id_FIELDNAME)
// private String id = createId();
// public String getId() {
// return id;
// }
// public void setId(String id) {
// this.id = id;
// }
// @FieldDescribe("数据库主键,自动生成.")
// @Id
// @Column(length = length_id, name = ColumnNamePrefix + id_FIELDNAME)
// private String id = createId();
AnnotationSpec fieldDescribe = AnnotationSpec.builder(FieldDescribe.class).addMember("value", "\"数据库主键,自动生成.\"")
.build();
AnnotationSpec id = AnnotationSpec.builder(Id.class).build();
......@@ -174,12 +177,13 @@ public class DynamicEntityBuilder {
}
private void createField(Builder builder, Field field, Class<?> typeClass) {
// public static final String stringValue_FIELDNAME = "stringValue";
// @FieldDescribe("文本字段.")
// @Column(length = JpaObject.length_255B, name = ColumnNamePrefix + stringValue_FIELDNAME)
// @Index(name = TABLE + IndexNameMiddle + stringValue_FIELDNAME)
// @CheckPersist(allowEmpty = true)
// private String stringValue;
// public static final String stringValue_FIELDNAME = "stringValue";
// @FieldDescribe("文本字段.")
// @Column(length = JpaObject.length_255B, name = ColumnNamePrefix +
// stringValue_FIELDNAME)
// @Index(name = TABLE + IndexNameMiddle + stringValue_FIELDNAME)
// @CheckPersist(allowEmpty = true)
// private String stringValue;
AnnotationSpec column = null;
if (typeClass == String.class) {
column = AnnotationSpec.builder(Column.class).addMember("length", "length_255B")
......@@ -314,16 +318,20 @@ public class DynamicEntityBuilder {
private void createListFields(Builder builder, Field field, Class<?> typeClass) {
// public static final String groupList_FIELDNAME = "groupList";
// @FieldDescribe("群组的群组成员.存放群组 ID.")
// @ContainerTable(name = TABLE + ContainerTableNameMiddle + groupList_FIELDNAME, joinIndex = @Index(name = TABLE
// + IndexNameMiddle + groupList_FIELDNAME + JoinIndexNameSuffix))
// @ElementIndex(name = TABLE + IndexNameMiddle + groupList_FIELDNAME + ElementIndexNameSuffix)
// @PersistentCollection(fetch = FetchType.EAGER)
// @OrderColumn(name = ORDERCOLUMNCOLUMN)
// @ElementColumn(length = JpaObject.length_id, name = ColumnNamePrefix + groupList_FIELDNAME)
// @CheckPersist(allowEmpty = true, citationExists = @CitationExist(type = Group.class))
// private List<String> groupList;
// public static final String groupList_FIELDNAME = "groupList";
// @FieldDescribe("群组的群组成员.存放群组 ID.")
// @ContainerTable(name = TABLE + ContainerTableNameMiddle +
// groupList_FIELDNAME, joinIndex = @Index(name = TABLE
// + IndexNameMiddle + groupList_FIELDNAME + JoinIndexNameSuffix))
// @ElementIndex(name = TABLE + IndexNameMiddle + groupList_FIELDNAME +
// ElementIndexNameSuffix)
// @PersistentCollection(fetch = FetchType.EAGER)
// @OrderColumn(name = ORDERCOLUMNCOLUMN)
// @ElementColumn(length = JpaObject.length_id, name = ColumnNamePrefix +
// groupList_FIELDNAME)
// @CheckPersist(allowEmpty = true, citationExists = @CitationExist(type =
// Group.class))
// private List<String> groupList;
AnnotationSpec containerTable = AnnotationSpec.builder(ContainerTable.class)
.addMember("name", "TABLE + ContainerTableNameMiddle + " + field.fieldName())
......@@ -375,11 +383,12 @@ public class DynamicEntityBuilder {
private void createStringLobField(Builder builder, Field field) {
// public static final String stringLobValue_FIELDNAME = "stringLobValue";
// @FieldDescribe("长文本.")
// @Lob
// @Basic(fetch = FetchType.EAGER)
// @Column(length = JpaObject.length_10M, name = ColumnNamePrefix + stringLobValue_FIELDNAME)
// public static final String stringLobValue_FIELDNAME = "stringLobValue";
// @FieldDescribe("长文本.")
// @Lob
// @Basic(fetch = FetchType.EAGER)
// @Column(length = JpaObject.length_10M, name = ColumnNamePrefix +
// stringLobValue_FIELDNAME)
AnnotationSpec lob = AnnotationSpec.builder(Lob.class).build();
......@@ -410,15 +419,20 @@ public class DynamicEntityBuilder {
private void createStringMapField(Builder builder, Field field) {
// @FieldDescribe("Map类型.")
// @CheckPersist(allowEmpty = true)
// @PersistentMap(fetch = FetchType.EAGER, elementType = String.class, keyType = String.class)
// @ContainerTable(name = TABLE + ContainerTableNameMiddle + mapValueMap_FIELDNAME, joinIndex = @Index(name = TABLE
// + IndexNameMiddle + mapValueMap_FIELDNAME + JoinIndexNameSuffix))
// @KeyColumn(name = ColumnNamePrefix + key_FIELDNAME)
// @ElementColumn(length = length_255B, name = ColumnNamePrefix + mapValueMap_FIELDNAME)
// @ElementIndex(name = TABLE + IndexNameMiddle + mapValueMap_FIELDNAME + ElementIndexNameSuffix)
// @KeyIndex(name = TABLE + IndexNameMiddle + mapValueMap_FIELDNAME + KeyIndexNameSuffix)
// @FieldDescribe("Map类型.")
// @CheckPersist(allowEmpty = true)
// @PersistentMap(fetch = FetchType.EAGER, elementType = String.class, keyType =
// String.class)
// @ContainerTable(name = TABLE + ContainerTableNameMiddle +
// mapValueMap_FIELDNAME, joinIndex = @Index(name = TABLE
// + IndexNameMiddle + mapValueMap_FIELDNAME + JoinIndexNameSuffix))
// @KeyColumn(name = ColumnNamePrefix + key_FIELDNAME)
// @ElementColumn(length = length_255B, name = ColumnNamePrefix +
// mapValueMap_FIELDNAME)
// @ElementIndex(name = TABLE + IndexNameMiddle + mapValueMap_FIELDNAME +
// ElementIndexNameSuffix)
// @KeyIndex(name = TABLE + IndexNameMiddle + mapValueMap_FIELDNAME +
// KeyIndexNameSuffix)
AnnotationSpec persistentMap = AnnotationSpec.builder(PersistentMap.class)
.addMember("fetch", " javax.persistence.FetchType.EAGER").addMember("elementType", "String.class")
......
......@@ -4,23 +4,29 @@ import java.util.ArrayList;
import java.util.List;
import org.apache.commons.lang3.BooleanUtils;
import org.apache.commons.lang3.StringUtils;
import com.x.base.core.project.annotation.FieldDescribe;
import com.x.base.core.project.tools.ListTools;
public class DumpRestoreData extends ConfigObject {
public static String TYPE_FULL = "full";
public static String TYPE_LITE = "lite";
public static DumpRestoreData defaultInstance() {
return new DumpRestoreData();
}
public static final int default_batchSize = 1000;
public static final String default_type = TYPE_LITE;
public DumpRestoreData() {
this.enable = false;
this.includes = new ArrayList<String>();
this.excludes = new ArrayList<String>();
this.batchSize = default_batchSize;
this.mode = default_type;
}
@FieldDescribe("是否启用.")
......@@ -35,6 +41,13 @@ public class DumpRestoreData extends ConfigObject {
@FieldDescribe("批量对象数量.")
private Integer batchSize;
@FieldDescribe("导出数据模式,lite|full,默认使用lite")
private String mode;
public String getMode() {
return StringUtils.equals(TYPE_FULL, mode) ? TYPE_FULL : TYPE_LITE;
}
public Boolean getEnable() {
return BooleanUtils.isTrue(this.enable);
}
......@@ -78,4 +91,8 @@ public class DumpRestoreData extends ConfigObject {
this.enable = enable;
}
public void setMode(String mode) {
this.mode = mode;
}
}
......@@ -51,7 +51,7 @@ public class Timertask_BatchOperationTask extends AbstractJob {
}
} else {
logger.info(
"Timertask_BatchOperationTask -> not fount any cms batch operation, try to check unreview document in database......");
"Timertask_BatchOperationTask -> not found any cms batch operation, try to check unreview document in database......");
// 如果队列里已经没有任务了,那么检查一下是否还有未revieiw的文档,添加到队列
DocumentInfoService documentInfoService = new DocumentInfoService();
try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
......
package com.x.server.console.action;
import java.io.File;
import java.io.IOException;
import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Objects;
import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
......@@ -20,7 +23,10 @@ import org.apache.openjpa.persistence.OpenJPAPersistence;
import com.google.gson.Gson;
import com.x.base.core.container.factory.PersistenceXmlHelper;
import com.x.base.core.entity.JpaObject;
import com.x.base.core.entity.annotation.ContainerEntity;
import com.x.base.core.entity.annotation.ContainerEntity.Reference;
import com.x.base.core.project.config.Config;
import com.x.base.core.project.config.DumpRestoreData;
import com.x.base.core.project.gson.XGsonBuilder;
import com.x.base.core.project.logger.Logger;
import com.x.base.core.project.logger.LoggerFactory;
......@@ -40,6 +46,7 @@ public class DumpData {
private Gson pureGsonDateFormated = XGsonBuilder.instance();
@SuppressWarnings("unchecked")
public boolean execute(String path) throws Exception {
if (StringUtils.isEmpty(path)) {
this.dir = new File(Config.base(), "local/dump/dumpData_" + DateTools.compact(this.start));
......@@ -56,8 +63,9 @@ public class DumpData {
/* 初始化完成 */
List<String> containerEntityNames = new ArrayList<>();
containerEntityNames.addAll((List<String>) Config.resource(Config.RESOURCE_CONTAINERENTITYNAMES));
List<String> containerEntityNames = this.entities();
/** 过滤include exclude 条件 */
List<String> classNames = ListTools.includesExcludesWildcard(containerEntityNames,
Config.dumpRestoreData().getIncludes(), Config.dumpRestoreData().getExcludes());
logger.print("dump data find {} data to dump, start at {}.", classNames.size(), DateTools.format(start));
......@@ -65,18 +73,17 @@ public class DumpData {
PersistenceXmlHelper.write(persistence.getAbsolutePath(), classNames);
for (int i = 0; i < classNames.size(); i++) {
Class<JpaObject> cls = (Class<JpaObject>) Class.forName(classNames.get(i));
EntityManagerFactory emf = OpenJPAPersistence.createEntityManagerFactory(cls.getName(),
persistence.getName(),
PersistenceXmlHelper.properties(cls.getName(), Config.slice().getEnable()));
EntityManager em = emf.createEntityManager();
try {
logger.print("dump data({}/{}): {}, count: {}.", (i + 1), classNames.size(), cls.getName(),
this.estimateCount(em, cls));
this.dump(cls, em);
} finally {
em.close();
emf.close();
}
EntityManagerFactory emf = OpenJPAPersistence.createEntityManagerFactory(cls.getName(),
persistence.getName(), PersistenceXmlHelper.properties(cls.getName(), Config.slice().getEnable()));
EntityManager em = emf.createEntityManager();
try {
logger.print("dump data({}/{}): {}, count: {}.", (i + 1), classNames.size(), cls.getName(),
this.estimateCount(em, cls));
this.dump(cls, em);
} finally {
em.close();
emf.close();
}
}
FileUtils.write(new File(dir, "catalog.json"), pureGsonDateFormated.toJson(this.catalog),
DefaultCharset.charset);
......@@ -97,17 +104,18 @@ public class DumpData {
return this.catalog.values().stream().mapToInt(Integer::intValue).sum();
}
private <T> void dump(Class<T> cls, EntityManager em) throws Exception {
private <T> void dump(Class<T> cls, EntityManager em)
throws IOException, IllegalAccessException, InvocationTargetException, NoSuchMethodException {
/** 创建最终存储文件的目录 */
File directory = new File(dir, cls.getName());
FileUtils.forceMkdir(directory);
FileUtils.cleanDirectory(directory);
int count = 0;
int size = Config.dumpRestoreData().getBatchSize();
ContainerEntity containerEntity = cls.getAnnotation(ContainerEntity.class);
String id = "";
List<T> list = null;
int count = 0;
do {
list = this.list(em, cls, id, size);
list = this.list(em, cls, id, containerEntity.dumpSize());
if (ListTools.isNotEmpty(list)) {
count = count + list.size();
id = BeanUtils.getProperty(list.get(list.size() - 1), JpaObject.id_FIELDNAME);
......@@ -115,7 +123,6 @@ public class DumpData {
FileUtils.write(file, pureGsonDateFormated.toJson(list), DefaultCharset.charset);
}
em.clear();
Runtime.getRuntime().gc();
} while (ListTools.isNotEmpty(list));
this.catalog.put(cls.getName(), count);
}
......@@ -132,4 +139,26 @@ public class DumpData {
return em.createQuery(cq).setMaxResults(size).getResultList();
}
/**
* 根据设置的模式不同输出需要dump的entity className
*
* @return
* @throws Exception
*/
@SuppressWarnings("unchecked")
private List<String> entities() throws Exception {
List<String> list = new ArrayList<>();
if (StringUtils.equals(Config.dumpRestoreData().getMode(), DumpRestoreData.TYPE_FULL)) {
list.addAll((List<String>) Config.resource(Config.RESOURCE_CONTAINERENTITYNAMES));
return list;
}
for (String str : (List<String>) Config.resource(Config.RESOURCE_CONTAINERENTITYNAMES)) {
Class<?> cls = Class.forName(str);
ContainerEntity containerEntity = cls.getAnnotation(ContainerEntity.class);
if (Objects.equals(containerEntity.reference(), Reference.strong)) {
list.add(str);
}
}
return list;
}
}
\ No newline at end of file
package com.x.server.console.action;
import org.apache.commons.lang3.StringUtils;
import com.x.base.core.entity.dataitem.ItemCategory;
import com.x.base.core.project.config.Config;
import com.x.base.core.project.logger.Logger;
import com.x.base.core.project.logger.LoggerFactory;
import com.x.bbs.entity.BBSOperationRecord;
......
......@@ -8,9 +8,7 @@ import java.util.HashMap;
import java.util.Map;
import java.util.Map.Entry;
import com.google.gson.Gson;
import com.x.base.core.project.config.Config;
import com.x.base.core.project.gson.XGsonBuilder;
import com.x.base.core.project.logger.Logger;
import com.x.base.core.project.logger.LoggerFactory;
import com.x.base.core.project.tools.DateTools;
......
......@@ -17,7 +17,7 @@ import com.x.base.core.entity.annotation.ContainerEntity;
import com.x.base.core.project.annotation.FieldDescribe;
import com.x.general.core.entity.PersistenceProperties;
@ContainerEntity(dumpSize = 1000, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
@ContainerEntity(dumpSize = 1000, type = ContainerEntity.Type.element, reference = ContainerEntity.Reference.soft)
@Entity
@Table(name = PersistenceProperties.Area.District.table, uniqueConstraints = {
@UniqueConstraint(name = PersistenceProperties.Area.District.table + JpaObject.IndexNameMiddle
......
......@@ -23,7 +23,7 @@ import com.x.base.core.project.gson.XGsonBuilder;
import com.x.processplatform.core.entity.PersistenceProperties;
@Entity
@ContainerEntity(dumpSize = 5, type = ContainerEntity.Type.element, reference = ContainerEntity.Reference.soft)
@ContainerEntity(dumpSize = 5, type = ContainerEntity.Type.log, reference = ContainerEntity.Reference.soft)
@Table(name = PersistenceProperties.Element.FormVersion.table, uniqueConstraints = {
@UniqueConstraint(name = PersistenceProperties.Element.FormVersion.table + JpaObject.IndexNameMiddle
+ JpaObject.DefaultUniqueConstraintSuffix, columnNames = { JpaObject.IDCOLUMN,
......
......@@ -23,7 +23,7 @@ import com.x.base.core.project.gson.XGsonBuilder;
import com.x.processplatform.core.entity.PersistenceProperties;
@Entity
@ContainerEntity(dumpSize = 5, type = ContainerEntity.Type.element, reference = ContainerEntity.Reference.strong)
@ContainerEntity(dumpSize = 5, type = ContainerEntity.Type.log, reference = ContainerEntity.Reference.soft)
@Table(name = PersistenceProperties.Element.ProcessVersion.table, uniqueConstraints = {
@UniqueConstraint(name = PersistenceProperties.Element.ProcessVersion.table + JpaObject.IndexNameMiddle
+ JpaObject.DefaultUniqueConstraintSuffix, columnNames = { JpaObject.IDCOLUMN,
......
......@@ -23,7 +23,7 @@ import com.x.base.core.project.gson.XGsonBuilder;
import com.x.processplatform.core.entity.PersistenceProperties;
@Entity
@ContainerEntity(dumpSize = 5, type = ContainerEntity.Type.element, reference = ContainerEntity.Reference.strong)
@ContainerEntity(dumpSize = 5, type = ContainerEntity.Type.log, reference = ContainerEntity.Reference.soft)
@Table(name = PersistenceProperties.Element.ScriptVersion.table, uniqueConstraints = {
@UniqueConstraint(name = PersistenceProperties.Element.ScriptVersion.table + JpaObject.IndexNameMiddle
+ JpaObject.DefaultUniqueConstraintSuffix, columnNames = { JpaObject.IDCOLUMN,
......
......@@ -23,7 +23,7 @@ import com.x.base.core.project.annotation.FieldDescribe;
import com.x.base.core.project.tools.StringTools;
@Entity
@ContainerEntity(dumpSize = 1000, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
@ContainerEntity(dumpSize = 1000, type = ContainerEntity.Type.log, reference = ContainerEntity.Reference.soft)
@Table(name = PersistenceProperties.PromptErrorLog.table, uniqueConstraints = {
@UniqueConstraint(name = PersistenceProperties.PromptErrorLog.table + JpaObject.IndexNameMiddle
+ JpaObject.DefaultUniqueConstraintSuffix, columnNames = { JpaObject.IDCOLUMN,
......
......@@ -22,7 +22,7 @@ import com.x.base.core.entity.annotation.ContainerEntity;
import com.x.base.core.project.annotation.FieldDescribe;
@Entity
@ContainerEntity(dumpSize = 1000, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
@ContainerEntity(dumpSize = 1000, type = ContainerEntity.Type.log, reference = ContainerEntity.Reference.soft)
@Table(name = PersistenceProperties.ScheduleLog.table, uniqueConstraints = {
@UniqueConstraint(name = PersistenceProperties.ScheduleLog.table + JpaObject.IndexNameMiddle
+ JpaObject.DefaultUniqueConstraintSuffix, columnNames = { JpaObject.IDCOLUMN,
......
......@@ -23,7 +23,7 @@ import com.x.base.core.project.annotation.FieldDescribe;
import com.x.base.core.project.tools.StringTools;
@Entity
@ContainerEntity(dumpSize = 1000, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
@ContainerEntity(dumpSize = 1000, type = ContainerEntity.Type.log, reference = ContainerEntity.Reference.soft)
@Table(name = PersistenceProperties.UnexpectedErrorLog.table, uniqueConstraints = {
@UniqueConstraint(name = PersistenceProperties.UnexpectedErrorLog.table + JpaObject.IndexNameMiddle
+ JpaObject.DefaultUniqueConstraintSuffix, columnNames = { JpaObject.IDCOLUMN,
......
......@@ -23,7 +23,7 @@ import com.x.base.core.project.annotation.FieldDescribe;
import com.x.base.core.project.tools.StringTools;
@Entity
@ContainerEntity(dumpSize = 1000, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
@ContainerEntity(dumpSize = 1000, type = ContainerEntity.Type.log, reference = ContainerEntity.Reference.soft)
@Table(name = PersistenceProperties.WarnLog.table, uniqueConstraints = {
@UniqueConstraint(name = PersistenceProperties.WarnLog.table + JpaObject.IndexNameMiddle
+ JpaObject.DefaultUniqueConstraintSuffix, columnNames = { JpaObject.IDCOLUMN,
......
......@@ -6,13 +6,11 @@ import com.x.base.core.container.EntityManagerContainer;
import com.x.base.core.container.factory.EntityManagerContainerFactory;
import com.x.base.core.entity.annotation.CheckRemoveType;
import com.x.base.core.project.cache.ApplicationCache;
import com.x.base.core.project.exception.ExceptionAccessDenied;
import com.x.base.core.project.exception.ExceptionEntityNotExist;
import com.x.base.core.project.http.ActionResult;
import com.x.base.core.project.http.EffectivePerson;
import com.x.base.core.project.jaxrs.WoId;
import com.x.query.assemble.designer.Business;
import com.x.query.core.entity.Query;
import com.x.query.core.entity.schema.Statement;
import com.x.query.core.entity.schema.Table;
......
......@@ -541,9 +541,6 @@ public abstract class Plan extends GsonPropertyObject {
/* 有两个地方用到了 */
private ScriptEngine getScriptEngine() throws ScriptException, Exception {
// ScriptEngineManager manager = new ScriptEngineManager();
// ScriptEngine scriptEngine = manager.getEngineByName("JavaScript");
// return scriptEngine;
if (null == this.scriptEngine) {
scriptEngine = ScriptFactory.newScriptEngine();
scriptEngine.eval(Config.mooToolsScriptText());
......
......@@ -49,7 +49,7 @@ public class Timertask_BatchOperationTask extends AbstractJob {
}
}
}else {
logger.info("Timertask_BatchOperationTask -> not fount any task batch operation, try to check unreview task in database......");
logger.info("Timertask_BatchOperationTask -> not found any task batch operation, try to check unreview task in database......");
//如果队列里已经没有任务了,那么检查一下是否还有未revieiw的工作任务,添加到队列刷新工作作息的Review
BatchOperationPersistService batchOperationPersistService = new BatchOperationPersistService();
TaskQueryService taskQueryService = new TaskQueryService();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册