You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2020/06/12 06:49:16 UTC
[GitHub] [shardingsphere-elastic-job-lite] mmx1960 opened a new issue #771: esjob can not shutdown correctly when encountering spring context destory in initializing
mmx1960 opened a new issue #771:
URL: https://github.com/apache/shardingsphere-elastic-job-lite/issues/771
**Description :**
I have more than one job in an elastic-job base project and running in the spring envionment.
when spring application initializing and some of jobs was already initialized ,but before initialize other jobs , some compoents encountering a problem and throw an error, it cause the
spring beans' destory(call spring destory method) and rest of initializing processes must be stop.
for all that , the initialized jobs still running .so the application is running but some uninitial jobs‘ state was shutdown and in the running jobs' method , it can not run correctly(because some components such as datasource was already shutdown.
**Which version of ElasticJob did you use?**
2.1.5
**Which project did you use? ElasticJob-Lite or ElasticJob-Cloud?**
ElasticJob-Lite
**Expected behavior**
all jobs in project and the application must shutdown
**Actual behavior**
some jobs was running and some jobs was shutdown , the application still running
**Reason analyze (If you can)**
the elastic-job framework didn't handle the spring destory event and when spring initialize failed , esjob still in the memory.
**Steps to reproduce the behavior.**
1. create two jobs implements SimpleJob and config as elastic-job
2. in the second job class , inject an instance which not in spring context.
3. run the application an will see the first job is running and second not.
**Example codes for reproduce this issue (such as a github link).**
simple jobs code like that
```
public A implements SimpleJob{
public void execute(ShardingContext shardingContext) {
System.out.println("A");
}
}
```
```
public B implements SimpleJob{
@Autowired
A a;
public void execute(ShardingContext shardingContext) {
System.out.println("B");
}
}
```
make A job before B job in the esjob-config xml file
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere-elastic-job-lite] mmx1960 commented on issue #771: esjob can not shutdown correctly when encountering spring context destory in initializing
Posted by GitBox <gi...@apache.org>.
mmx1960 commented on issue #771:
URL: https://github.com/apache/shardingsphere-elastic-job-lite/issues/771#issuecomment-644823646
> Hi, @terrymanu and @mmx1960 , this issue seems to be fixed by #583 .
thank u , this commit is sure to fixed this issue, but there is another little problem and i will open a new issue
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere-elastic-job-lite] mmx1960 closed issue #771: esjob can not shutdown correctly when encountering spring context destory in initializing
Posted by GitBox <gi...@apache.org>.
mmx1960 closed issue #771:
URL: https://github.com/apache/shardingsphere-elastic-job-lite/issues/771
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere-elastic-job-lite] Technoboy- commented on issue #771: esjob can not shutdown correctly when encountering spring context destory in initializing
Posted by GitBox <gi...@apache.org>.
Technoboy- commented on issue #771:
URL: https://github.com/apache/shardingsphere-elastic-job-lite/issues/771#issuecomment-644811311
Hi, @terrymanu and @mmx1960 , this issue seems to be fixed by #583 .
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere-elastic-job-lite] Technoboy- commented on issue #771: esjob can not shutdown correctly when encountering spring context destory in initializing
Posted by GitBox <gi...@apache.org>.
Technoboy- commented on issue #771:
URL: https://github.com/apache/shardingsphere-elastic-job-lite/issues/771#issuecomment-644207066
I will try to reproduce in the latest version, and if the bug still exists, I will try to fix it later.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org