Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
weixin_42566577
o2oa
提交
07abf707
o2oa
项目概览
weixin_42566577
/
o2oa
与 Fork 源项目一致
Fork自
浙江兰德纵横网络技术股份有限公司 / o2oa
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
o2oa
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
07abf707
编写于
3月 25, 2022
作者:
R
Ray
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
clear debug
上级
18977852
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
43 addition
and
68 deletion
+43
-68
o2server/x_base_core_project/src/main/java/com/x/base/core/container/factory/SliceEntityManagerContainerFactory.java
...container/factory/SliceEntityManagerContainerFactory.java
+0
-36
o2server/x_base_core_project/src/main/java/com/x/base/core/entity/annotation/JsonPropertiesValueHandler.java
...se/core/entity/annotation/JsonPropertiesValueHandler.java
+1
-5
o2server/x_console/src/main/java/com/x/server/console/server/application/ApplicationServerTools.java
...er/console/server/application/ApplicationServerTools.java
+0
-4
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/ThisApplication.java
...m/x/processplatform/assemble/surface/ThisApplication.java
+22
-0
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/control/ActionGetWorkOrWorkCompleted.java
...e/surface/jaxrs/control/ActionGetWorkOrWorkCompleted.java
+2
-3
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/control/BaseAction.java
...ssplatform/assemble/surface/jaxrs/control/BaseAction.java
+3
-4
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/work/BaseAction.java
...ocessplatform/assemble/surface/jaxrs/work/BaseAction.java
+1
-3
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/work/V2GetWorkOrWorkCompleted.java
...assemble/surface/jaxrs/work/V2GetWorkOrWorkCompleted.java
+14
-13
未找到文件。
o2server/x_base_core_project/src/main/java/com/x/base/core/container/factory/SliceEntityManagerContainerFactory.java
浏览文件 @
07abf707
...
...
@@ -29,10 +29,6 @@ import com.x.base.core.entity.annotation.CheckPersist;
import
com.x.base.core.entity.annotation.CheckRemove
;
import
com.x.base.core.entity.annotation.Flag
;
import
com.x.base.core.entity.annotation.RestrictFlag
;
import
com.x.base.core.entity.dynamic.DynamicBaseEntity
;
import
com.x.base.core.entity.dynamic.DynamicEntity
;
import
com.x.base.core.project.gson.XGsonBuilder
;
import
com.x.base.core.project.tools.ClassLoaderTools
;
public
abstract
class
SliceEntityManagerContainerFactory
{
...
...
@@ -177,36 +173,4 @@ public abstract class SliceEntityManagerContainerFactory {
}
}
// public void refreshDynamicEntity(String webApplicationDirectory, List<String> entities) throws Exception {
// File path = new File(webApplicationDirectory + "/WEB-INF/classes/" + PERSISTENCE_XML_PATH);
// List<String> classNames = PersistenceXmlHelper.write(path.getAbsolutePath(), entities, true);
// ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
// for (String className : classNames) {
// if (className.startsWith(DynamicEntity.CLASS_PACKAGE)
// || className.equals(DynamicBaseEntity.class.getName())) {
// @SuppressWarnings("unchecked")
// Class<? extends JpaObject> clz = (Class<? extends JpaObject>) classLoader.loadClass(className);
// checkPersistFieldMap.put(clz, this.loadCheckPersistField(clz));
// checkRemoveFieldMap.put(clz, this.loadCheckRemoveField(clz));
// Properties properties = PersistenceXmlHelper.properties(clz.getName(), false);
// entityManagerFactoryMap.put(clz,
// OpenJPAPersistence.createEntityManagerFactory(clz.getName(), PERSISTENCE_XML_PATH, properties));
// List<Field> flagFields = new ArrayList<>();
// List<Field> restrictFlagFields = new ArrayList<>();
// for (Field o : FieldUtils.getFieldsListWithAnnotation(clz, Id.class)) {
// flagFields.add(o);
// restrictFlagFields.add(o);
// }
// for (Field o : FieldUtils.getFieldsListWithAnnotation(clz, Flag.class)) {
// flagFields.add(o);
// restrictFlagFields.add(o);
// }
// for (Field o : FieldUtils.getFieldsListWithAnnotation(clz, RestrictFlag.class)) {
// restrictFlagFields.add(o);
// }
// flagMap.put(clz, Collections.unmodifiableList(flagFields));
// restrictFlagMap.put(clz, Collections.unmodifiableList(restrictFlagFields));
// }
// }
// }
}
\ No newline at end of file
o2server/x_base_core_project/src/main/java/com/x/base/core/entity/annotation/JsonPropertiesValueHandler.java
浏览文件 @
07abf707
...
...
@@ -34,7 +34,7 @@ import com.x.base.core.project.gson.XGsonBuilder;
public
class
JsonPropertiesValueHandler
extends
AbstractValueHandler
{
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
String
PROXY_SUFFIX
=
"$proxy"
;
//
private static final String PROXY_SUFFIX = "$proxy";
private
Gson
gson
=
XGsonBuilder
.
instance
();
...
...
@@ -72,10 +72,6 @@ public class JsonPropertiesValueHandler extends AbstractValueHandler {
return
null
;
try
{
String
className
=
vm
.
getDeclaredType
().
getName
();
System
.
out
.
println
(
"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
);
System
.
out
.
println
(
className
+
":"
+
Thread
.
currentThread
().
getName
()
+
":"
+
Thread
.
currentThread
().
getContextClassLoader
());
System
.
out
.
println
(
"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
);
Class
<?>
cls
=
Thread
.
currentThread
().
getContextClassLoader
().
loadClass
(
className
);
return
gson
.
fromJson
(
val
.
toString
(),
cls
);
}
catch
(
ClassNotFoundException
e
)
{
...
...
o2server/x_console/src/main/java/com/x/server/console/server/application/ApplicationServerTools.java
浏览文件 @
07abf707
...
...
@@ -249,10 +249,6 @@ public class ApplicationServerTools extends JettySeverTools {
List
<
ClassInfo
>
officialClassInfos
)
{
officialClassInfos
.
parallelStream
().
forEach
(
info
->
{
try
{
System
.
out
.
println
(
"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!@@@@@@@@@"
);
System
.
out
.
println
(
Thread
.
currentThread
().
getContextClassLoader
());
System
.
out
.
println
(
Thread
.
currentThread
().
getId
());
System
.
out
.
println
(
"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!@@@@@@@@@"
);
Class
<?>
clz
=
Thread
.
currentThread
().
getContextClassLoader
().
loadClass
(
info
.
getName
());
Path
war
=
Paths
.
get
(
Config
.
dir_store
().
toString
(),
info
.
getSimpleName
()
+
PathTools
.
DOT_WAR
);
Path
dir
=
Paths
.
get
(
Config
.
dir_servers_applicationServer_work
().
toString
(),
info
.
getSimpleName
());
...
...
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/ThisApplication.java
浏览文件 @
07abf707
package
com.x.processplatform.assemble.surface
;
import
java.util.concurrent.ExecutorService
;
import
java.util.concurrent.SynchronousQueue
;
import
java.util.concurrent.ThreadFactory
;
import
java.util.concurrent.ThreadPoolExecutor
;
import
java.util.concurrent.TimeUnit
;
import
com.google.common.util.concurrent.ThreadFactoryBuilder
;
import
com.x.base.core.project.Context
;
import
com.x.base.core.project.cache.CacheManager
;
import
com.x.base.core.project.message.MessageConnector
;
...
...
@@ -13,6 +20,20 @@ public class ThisApplication {
protected
static
Context
context
;
private
static
ExecutorService
threadPool
;
public
static
ExecutorService
threadPool
()
{
return
threadPool
;
}
private
static
void
initThreadPool
()
{
int
maximumPoolSize
=
Runtime
.
getRuntime
().
availableProcessors
()
+
1
;
ThreadFactory
threadFactory
=
new
ThreadFactoryBuilder
()
.
setNameFormat
(
ThisApplication
.
class
.
getPackageName
()
+
"-threadpool-%d"
).
build
();
threadPool
=
new
ThreadPoolExecutor
(
0
,
maximumPoolSize
,
120
,
TimeUnit
.
SECONDS
,
new
SynchronousQueue
<>(),
threadFactory
);
}
public
static
Context
context
()
{
return
context
;
}
...
...
@@ -21,6 +42,7 @@ public class ThisApplication {
try
{
CacheManager
.
init
(
context
.
clazz
().
getSimpleName
());
context
.
schedule
(
CleanKeyLock
.
class
,
"2 0/2 * * * ?"
);
initThreadPool
();
MessageConnector
.
start
(
context
());
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
...
...
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/control/ActionGetWorkOrWorkCompleted.java
浏览文件 @
07abf707
...
...
@@ -3,9 +3,7 @@ package com.x.processplatform.assemble.surface.jaxrs.control;
import
java.util.HashMap
;
import
java.util.Map
;
import
java.util.concurrent.CompletableFuture
;
import
java.util.concurrent.ExecutionException
;
import
java.util.concurrent.TimeUnit
;
import
java.util.concurrent.TimeoutException
;
import
org.apache.commons.lang3.BooleanUtils
;
...
...
@@ -19,6 +17,7 @@ import com.x.base.core.project.logger.Logger;
import
com.x.base.core.project.logger.LoggerFactory
;
import
com.x.base.core.project.tools.PropertyTools
;
import
com.x.processplatform.assemble.surface.Business
;
import
com.x.processplatform.assemble.surface.ThisApplication
;
import
com.x.processplatform.core.entity.content.Read
;
import
com.x.processplatform.core.entity.content.Task
;
import
com.x.processplatform.core.entity.content.TaskCompleted
;
...
...
@@ -80,7 +79,7 @@ class ActionGetWorkOrWorkCompleted extends BaseAction {
logger
.
error
(
e
);
}
return
wo
;
});
}
,
ThisApplication
.
threadPool
()
);
}
private
Wo
workCompleted
(
Business
business
,
EffectivePerson
effectivePerson
,
WorkCompleted
workCompleted
)
...
...
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/control/BaseAction.java
浏览文件 @
07abf707
...
...
@@ -11,6 +11,7 @@ import com.x.base.core.project.jaxrs.StandardJaxrsAction;
import
com.x.base.core.project.logger.Logger
;
import
com.x.base.core.project.logger.LoggerFactory
;
import
com.x.processplatform.assemble.surface.Business
;
import
com.x.processplatform.assemble.surface.ThisApplication
;
abstract
class
BaseAction
extends
StandardJaxrsAction
{
...
...
@@ -153,10 +154,8 @@ abstract class BaseAction extends StandardJaxrsAction {
}
protected
CompletableFuture
<
Boolean
>
checkControlFuture
(
EffectivePerson
effectivePerson
,
String
flag
,
ClassLoader
classLoader
)
{
protected
CompletableFuture
<
Boolean
>
checkControlFuture
(
EffectivePerson
effectivePerson
,
String
flag
)
{
return
CompletableFuture
.
supplyAsync
(()
->
{
Thread
.
currentThread
().
setContextClassLoader
(
classLoader
);
Boolean
value
=
false
;
try
(
EntityManagerContainer
emc
=
EntityManagerContainerFactory
.
instance
().
create
())
{
Business
business
=
new
Business
(
emc
);
...
...
@@ -166,7 +165,7 @@ abstract class BaseAction extends StandardJaxrsAction {
logger
.
error
(
e
);
}
return
value
;
});
}
,
ThisApplication
.
threadPool
()
);
}
}
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/work/BaseAction.java
浏览文件 @
07abf707
...
...
@@ -113,10 +113,8 @@ abstract class BaseAction extends StandardJaxrsAction {
}
}
protected
CompletableFuture
<
Boolean
>
checkControlFuture
(
EffectivePerson
effectivePerson
,
String
flag
,
ClassLoader
classLoader
)
{
protected
CompletableFuture
<
Boolean
>
checkControlFuture
(
EffectivePerson
effectivePerson
,
String
flag
)
{
return
CompletableFuture
.
supplyAsync
(()
->
{
Thread
.
currentThread
().
setContextClassLoader
(
classLoader
);
Boolean
value
=
false
;
try
(
EntityManagerContainer
emc
=
EntityManagerContainerFactory
.
instance
().
create
())
{
Business
business
=
new
Business
(
emc
);
...
...
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/work/V2GetWorkOrWorkCompleted.java
浏览文件 @
07abf707
...
...
@@ -33,6 +33,7 @@ import com.x.base.core.project.organization.Person;
import
com.x.base.core.project.organization.Unit
;
import
com.x.base.core.project.tools.ListTools
;
import
com.x.processplatform.assemble.surface.Business
;
import
com.x.processplatform.assemble.surface.ThisApplication
;
import
com.x.processplatform.core.entity.content.Attachment
;
import
com.x.processplatform.core.entity.content.Data
;
import
com.x.processplatform.core.entity.content.Read
;
...
...
@@ -157,7 +158,7 @@ class V2GetWorkOrWorkCompleted extends BaseAction {
}
catch
(
Exception
e
)
{
logger
.
error
(
e
);
}
});
}
,
ThisApplication
.
threadPool
()
);
}
private
CompletableFuture
<
Void
>
taskFuture
(
EffectivePerson
effectivePerson
,
String
job
,
String
workId
,
Wo
wo
)
{
...
...
@@ -169,7 +170,7 @@ class V2GetWorkOrWorkCompleted extends BaseAction {
}
catch
(
Exception
e
)
{
logger
.
error
(
e
);
}
});
}
,
ThisApplication
.
threadPool
()
);
}
private
CompletableFuture
<
Void
>
attachmentFuture
(
EffectivePerson
effectivePerson
,
String
job
,
Wo
wo
)
{
...
...
@@ -202,7 +203,7 @@ class V2GetWorkOrWorkCompleted extends BaseAction {
}
catch
(
Exception
e
)
{
logger
.
error
(
e
);
}
});
}
,
ThisApplication
.
threadPool
()
);
}
private
CompletableFuture
<
Void
>
readFuture
(
EffectivePerson
effectivePerson
,
String
job
,
Wo
wo
)
{
...
...
@@ -214,7 +215,7 @@ class V2GetWorkOrWorkCompleted extends BaseAction {
}
catch
(
Exception
e
)
{
logger
.
error
(
e
);
}
});
}
,
ThisApplication
.
threadPool
()
);
}
private
CompletableFuture
<
Void
>
workJsonFuture
(
Work
work
,
Wo
wo
)
{
...
...
@@ -224,7 +225,7 @@ class V2GetWorkOrWorkCompleted extends BaseAction {
}
catch
(
Exception
e
)
{
logger
.
error
(
e
);
}
});
}
,
ThisApplication
.
threadPool
()
);
}
private
CompletableFuture
<
Void
>
activityRouteFuture
(
Work
work
,
Wo
wo
)
{
...
...
@@ -243,7 +244,7 @@ class V2GetWorkOrWorkCompleted extends BaseAction {
}
catch
(
Exception
e
)
{
logger
.
error
(
e
);
}
});
}
,
ThisApplication
.
threadPool
()
);
}
private
CompletableFuture
<
Void
>
creatorIdentityFuture
(
String
creatorIdentity
,
Wo
wo
)
{
...
...
@@ -254,7 +255,7 @@ class V2GetWorkOrWorkCompleted extends BaseAction {
}
catch
(
Exception
e
)
{
logger
.
error
(
e
);
}
});
}
,
ThisApplication
.
threadPool
()
);
}
private
CompletableFuture
<
Void
>
creatorPersonFuture
(
String
creatorPerson
,
Wo
wo
)
{
...
...
@@ -265,7 +266,7 @@ class V2GetWorkOrWorkCompleted extends BaseAction {
}
catch
(
Exception
e
)
{
logger
.
error
(
e
);
}
});
}
,
ThisApplication
.
threadPool
()
);
}
private
CompletableFuture
<
Void
>
creatorUnitFuture
(
String
creatorUnit
,
Wo
wo
)
{
...
...
@@ -276,7 +277,7 @@ class V2GetWorkOrWorkCompleted extends BaseAction {
}
catch
(
Exception
e
)
{
logger
.
error
(
e
);
}
});
}
,
ThisApplication
.
threadPool
()
);
}
private
CompletableFuture
<
Void
>
workCompletedJsonFuture
(
WorkCompleted
workCompleted
,
Wo
wo
)
{
...
...
@@ -286,7 +287,7 @@ class V2GetWorkOrWorkCompleted extends BaseAction {
}
catch
(
Exception
e
)
{
logger
.
error
(
e
);
}
});
}
,
ThisApplication
.
threadPool
()
);
}
private
CompletableFuture
<
Void
>
recordFuture
(
EffectivePerson
effectivePerson
,
String
job
,
Wo
wo
)
{
...
...
@@ -297,7 +298,7 @@ class V2GetWorkOrWorkCompleted extends BaseAction {
}
catch
(
Exception
e
)
{
logger
.
error
(
e
);
}
});
}
,
ThisApplication
.
threadPool
()
);
}
private
CompletableFuture
<
Void
>
workCompletedRecordFuture
(
EffectivePerson
effectivePerson
,
...
...
@@ -315,7 +316,7 @@ class V2GetWorkOrWorkCompleted extends BaseAction {
}
catch
(
Exception
e
)
{
logger
.
error
(
e
);
}
});
}
,
ThisApplication
.
threadPool
()
);
}
private
CompletableFuture
<
Void
>
workCompletedDataFuture
(
WorkCompleted
workCompleted
,
Wo
wo
)
{
...
...
@@ -337,7 +338,7 @@ class V2GetWorkOrWorkCompleted extends BaseAction {
logger
.
error
(
e
);
}
}
});
}
,
ThisApplication
.
threadPool
()
);
}
private
boolean
attachmentRead
(
Attachment
attachment
,
EffectivePerson
effectivePerson
,
List
<
String
>
identities
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录