[JBoss JIRA] (WFLY-4379) Always expose <transaction-support> for resource adapters
by Jesper Pedersen (JIRA)
[ https://issues.jboss.org/browse/WFLY-4379?page=com.atlassian.jira.plugin.... ]
Jesper Pedersen updated WFLY-4379:
----------------------------------
Priority: Critical (was: Major)
> Always expose <transaction-support> for resource adapters
> ---------------------------------------------------------
>
> Key: WFLY-4379
> URL: https://issues.jboss.org/browse/WFLY-4379
> Project: WildFly
> Issue Type: Task
> Components: JCA
> Reporter: Jesper Pedersen
> Assignee: Stefano Maestri
> Priority: Critical
> Fix For: 9.0.0.CR1
>
>
> The <transaction-support> setting for resource adapters should always be exposed in the DMR model - e.g. no "undefined".
> If the value isn't explicit defined by the deployment, then it will be obtained from the metadata repository of the archive in question.
> This also makes it clear that <xa-pool> is used for XATransaction deployments.
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
9 years, 8 months
[JBoss JIRA] (WFLY-4430) Remove transport from DWM
by Jesper Pedersen (JIRA)
Jesper Pedersen created WFLY-4430:
-------------------------------------
Summary: Remove transport from DWM
Key: WFLY-4430
URL: https://issues.jboss.org/browse/WFLY-4430
Project: WildFly
Issue Type: Task
Components: JCA
Reporter: Jesper Pedersen
Assignee: Stefano Maestri
Priority: Blocker
Fix For: 9.0.0.CR1
Remove 'transport' and 'transportType' from DWM. Use the unique name of the DWM for channel name
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
9 years, 8 months
[JBoss JIRA] (WFLY-4429) Refactor JCA subsystems
by Jesper Pedersen (JIRA)
Jesper Pedersen created WFLY-4429:
-------------------------------------
Summary: Refactor JCA subsystems
Key: WFLY-4429
URL: https://issues.jboss.org/browse/WFLY-4429
Project: WildFly
Issue Type: Task
Components: JCA
Reporter: Jesper Pedersen
Assignee: Stefano Maestri
Priority: Blocker
Fix For: 9.0.0.CR1
Make use of PASSIVE services, and PersistentResource in :jca:, :datasources: and :resource-adapters:
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
9 years, 8 months
[JBoss JIRA] (WFLY-3991) JDK 1.8 javax.script.ScriptEngineFactory: Provider com.sun.script.javascript.RhinoScriptEngineFactory not found
by RH Bugzilla Integration (JIRA)
[ https://issues.jboss.org/browse/WFLY-3991?page=com.atlassian.jira.plugin.... ]
RH Bugzilla Integration commented on WFLY-3991:
-----------------------------------------------
David Le Sage <dlesage(a)redhat.com> changed the Status of [bug 1195150|https://bugzilla.redhat.com/show_bug.cgi?id=1195150] from ASSIGNED to CLOSED
> JDK 1.8 javax.script.ScriptEngineFactory: Provider com.sun.script.javascript.RhinoScriptEngineFactory not found
> ---------------------------------------------------------------------------------------------------------------
>
> Key: WFLY-3991
> URL: https://issues.jboss.org/browse/WFLY-3991
> Project: WildFly
> Issue Type: Enhancement
> Reporter: Manuel Blechschmidt
> Assignee: Jason Greene
> Labels: JS223, JavaScript, Scripting
>
> When using the ScriptManager in a JSF bean the following happens:
> ERROR [stderr] (default task-21) ScriptEngineManager providers.next(): javax.script.ScriptEngineFactory: Provider com.sun.script.javascript.RhinoScriptEngineFactory not found
> {code}
> package de.example.log.jsf;
> import java.io.ByteArrayOutputStream;
> import java.io.IOException;
> import java.io.PrintStream;
> import javax.enterprise.inject.Model;
> import javax.faces.application.FacesMessage;
> import javax.faces.context.FacesContext;
> import javax.inject.Inject;
> import javax.script.Bindings;
> import javax.script.ScriptEngine;
> import javax.script.ScriptEngineManager;
> import javax.script.ScriptException;
> @Model
> public class Scripting {
> private String script;
> private String output;
> private ScriptEngineManager mgr = new ScriptEngineManager();
> public static String utilJavaScript = "var print = function (s) { __newOut.print(s); }; var println = function (s) { __newOut.println(s); };";
> public String execute() {
> ScriptEngine jsEngine = mgr.getEngineByName("JavaScript");
> ByteArrayOutputStream outputBuffer = new ByteArrayOutputStream(8192);
> PrintStream newOut = new PrintStream(outputBuffer, true);
> Bindings bindings = jsEngine.createBindings();
> bindings.put("__newOut", newOut);
> try {
> jsEngine.eval(utilJavaScript + getScript(), bindings);
> } catch (ScriptException from) {
> FacesContext.getCurrentInstance().addMessage(
> null,
> new FacesMessage(from.getColumnNumber() + " "
> + from.getFileName() + " " + from.getLineNumber()
> + " " + from.getMessage()));
> return null;
> }
> newOut.close();
> String returnString = outputBuffer.toString();
> setOutput(returnString);
> try {
> outputBuffer.close();
> } catch (IOException e) {
> FacesContext.getCurrentInstance().addMessage(
> null,
> new FacesMessage(e.getLocalizedMessage()));
> }
> return null;
> }
> public String getScript() {
> return script;
> }
> public void setScript(String script) {
> this.script = script;
> }
> public String getOutput() {
> return output;
> }
> public void setOutput(String output) {
> this.output = output;
> }
> }
> {code}
> The script engines are configured in the following file:
> WILDFLY_HOME/modules/system/layers/base/sun/jdk/main/service-loader-resources/META-INF/services/javax.script.ScriptEngineFactory
> {code}
> com.sun.script.javascript.RhinoScriptEngineFactory
> jdk.nashorn.api.scripting.NashornScriptEngineFactory
> {code}
> It should be made sure that with every JDK JSR 223 compliant requests for a JavaScript engine will work out of the box.
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
9 years, 8 months
[JBoss JIRA] (WFLY-4427) Step status of the failed step by <fail> element becomes COMPLETED.
by Takashi Nishigaya (JIRA)
[ https://issues.jboss.org/browse/WFLY-4427?page=com.atlassian.jira.plugin.... ]
Takashi Nishigaya edited comment on WFLY-4427 at 3/14/15 11:05 AM:
-------------------------------------------------------------------
Thank you, Cheng.
I am considering the restarting use cases of using allow-start-if-complete attribute:
# All of the steps defined with allow-start-if-complete="false" (default)
#* This type of job cannot be restarted. This is almost the same meaning as restartable="false".
# All of the steps defined with allow-start-if-complete="true"
#* This type of job is designed to re-execute all of the steps of the failed job. This is the same as newly invoking start(), instead of restart().
# Mixed with steps with allow-start-if-complete="true" and allow-start-if-complete="false"
#* In this case, the behavior is a little bit confusing. If the job failed at the step with allow-start-if-complete="true", the restart() will re-execute all of the steps with allow-start-if-complete="true" and the rest of the steps unexecuted previously. But if failed at the step with allow-start-if-complete="false", the failed job cannot be restarted, because the failed step is always evaluated as the previous step status, COMPLETED.
I cannot imagine the real world scenario of case 3 and the effective usage of allow-start-if-complete.
When designing the job definitions, if we want to restart the failed job from the point of the step just failed previously, we cannot use the fail-by-exit-status strategy. In such case, we should use fail-by-throwing-a-exception strategy.
was (Author: nishigaya):
Thank you, Cheng.
I am considering the restarting use cases of using allow-start-if-complete attribute:
# All of the steps defined with allow-start-if-complete="false" (default)
#* This type of job cannot be restarted. This is almost the same meaning as restartable="false".
# All of the steps defined with allow-start-if-complete="true"
#* This type of job is designed to re-execute all of the steps of the failed job. This is the same as newly invoking start(), instead of restart().
# Mixed with steps with allow-start-if-complete="true" and allow-start-if-complete="false"
#* In this case, the behavior is a little bit confusing. If the job failed at the step with allow-start-if-complete="true", the restart() will re-execute all of the steps with allow-start-if-complete="true" and the rest of the steps unexecuted previously. But if failed at the step with allow-start-if-complete="false", the failed job cannot be restarted, because the failed step is always evaluated as the previous step status, FAILED.
I cannot imagine the real world scenario of case 3 and the effective usage of allow-start-if-complete.
When designing the job definitions, if we want to restart the failed job from the point of the step just failed previously, we cannot use the fail-by-exit-status strategy. In such case, we should use fail-by-throwing-a-exception strategy.
> Step status of the failed step by <fail> element becomes COMPLETED.
> -------------------------------------------------------------------
>
> Key: WFLY-4427
> URL: https://issues.jboss.org/browse/WFLY-4427
> Project: WildFly
> Issue Type: Bug
> Components: Batch
> Affects Versions: 8.2.0.Final
> Reporter: Takashi Nishigaya
> Assignee: Cheng Fang
> Attachments: batch-restart-failed.zip
>
>
> Assuming the following job definition, if STEP1 returns "1" as the exit status, the job status becomes FAILED. But the step status is COMPLETED.
> {noformat}
> job status: FAILED
> step: STEP1, step status: COMPLETED
> {noformat}
> {noformat}
> <job id="batch-job1" version="1.0" xmlns="http://xmlns.jcp.org/xml/ns/javaee"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/jobXML_1_0.xsd ">
> <step id="STEP1">
> <batchlet ref="TestBatchlet1" />
> <next on="0" to="STEP2" />
> <fail on="1" exit-status="FAILED_BY_EXIT_STATUS" />
> </step>
> <step id="STEP2">
> <batchlet ref="TestBatchlet2" />
> </step>
> </job>
> {noformat}
> In this case, we can not restart the failed job from the failed step STEP1.
> This behavior is correct based on the description of 10.8 Restart Processing, 3. a. in JSR 352.
> But it is not expected result.
> {quote}
> 10.8 Restart Processing
> 3. Starting at the restart position, each execution element is re-examined to determine if it should re-execute:
> a. If the execution element is a COMPLETED step that specifies allow-restart-if- complete=false, then follow the transition to the next
> execution element based on the exit status for this step from the previous execution.
> {quote}
> On the other hand, If the STEP1 is failed by throwing an exception, both of the resulting job status and the step status are FAILED.
> {noformat}
> job status: FAILED
> step: STEP1, step status: FAILED
> {noformat}
> In this case, restarting the failed job is correctly executed, because the step status is FAILED.
> I think the step status of the failed step should be FAILED in both cases. But the section "8.6.2 Fail Element" of JSR352 says nothing about what step status value must be exposed after failed.
> This behavior is the same in GlassFish 4 and WildFly 8.2.
> So, I want to know what is the correct specification or intended behavior.
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
9 years, 8 months
[JBoss JIRA] (WFCORE-598) Make it possible to register a child at a certain position
by Kabir Khan (JIRA)
Kabir Khan created WFCORE-598:
---------------------------------
Summary: Make it possible to register a child at a certain position
Key: WFCORE-598
URL: https://issues.jboss.org/browse/WFCORE-598
Project: WildFly Core
Issue Type: Feature Request
Components: Domain Management
Reporter: Kabir Khan
Assignee: Kabir Khan
Fix For: 1.0.0.Beta1
The BasicResource stores child resources in a LinkedHashMap so it is ordered in the order of the adds. It should be possible to insert a new child somewhere in the middle, rather than just at the end.
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
9 years, 8 months
[JBoss JIRA] (WFLY-4427) Step status of the failed step by <fail> element becomes COMPLETED.
by Takashi Nishigaya (JIRA)
[ https://issues.jboss.org/browse/WFLY-4427?page=com.atlassian.jira.plugin.... ]
Takashi Nishigaya edited comment on WFLY-4427 at 3/13/15 11:32 PM:
-------------------------------------------------------------------
Thank you, Cheng.
I am considering the restarting use cases of using allow-start-if-complete attribute:
# All of the steps defined with allow-start-if-complete="false" (default)
#* This type of job cannot be restarted. This is almost the same meaning as restartable="false".
# All of the steps defined with allow-start-if-complete="true"
#* This type of job is designed to re-execute all of the steps of the failed job. This is the same as newly invoking start(), instead of restart().
# Mixed with steps with allow-start-if-complete="true" and allow-start-if-complete="false"
#* In this case, the behavior is a little bit confusing. If the job failed at the step with allow-start-if-complete="true", the restart() will re-execute all of the steps with allow-start-if-complete="true" and the rest of the steps unexecuted previously. But if failed at the step with allow-start-if-complete="false", the failed job cannot be restarted, because the failed step is always evaluated as the previous step status, FAILED.
I cannot imagine the real world scenario of case 3 and the effective usage of allow-start-if-complete.
When designing the job definitions, if we want to restart the failed job from the point of the step just failed previously, we cannot use the fail-by-exit-status strategy. In such case, we should use fail-by-throwing-a-exception strategy.
was (Author: nishigaya):
Thank you, Cheng.
I am considering the restarting use cases of using allow-start-if-complete attribute:
# All of the steps defined with allow-start-if-complete="false" (default)
#* This type of job cannot be restarted. This is almost the same meaning as restartable="false".
# All of the steps defined with allow-start-if-complete="true"
#* This type of job is designed to re-execute all of the steps of the failed job. This is the same as newly invoking start(), instead of restart().
# Mixed with steps with allow-start-if-complete="true" and allow-start-if-complete="false"
#* In this case, the behavior is a little bit confusing. If the job failed at the step with allow-start-if-complete="true", the restart() will re-execute all of the steps with allow-start-if-complete="true" and the rest of the steps unexecuted previously. But if failed at the step with allow-start-if-complete="false", the failed job cannot be restarted, because the failed step is always evaluated as the previous step status, FAILED.
I cannot imagine the real world scenario of case 3 and the effective usage of allow-start-if-complete.
When designing the job definitions, if we want to restart the failed job from the point of the step just failed previously, we cannot use the fail-by-exit-status strategy. In such case, we should use fail-by-throwing-a-exception strategy.
> Step status of the failed step by <fail> element becomes COMPLETED.
> -------------------------------------------------------------------
>
> Key: WFLY-4427
> URL: https://issues.jboss.org/browse/WFLY-4427
> Project: WildFly
> Issue Type: Bug
> Components: Batch
> Affects Versions: 8.2.0.Final
> Reporter: Takashi Nishigaya
> Assignee: Cheng Fang
> Attachments: batch-restart-failed.zip
>
>
> Assuming the following job definition, if STEP1 returns "1" as the exit status, the job status becomes FAILED. But the step status is COMPLETED.
> {noformat}
> job status: FAILED
> step: STEP1, step status: COMPLETED
> {noformat}
> {noformat}
> <job id="batch-job1" version="1.0" xmlns="http://xmlns.jcp.org/xml/ns/javaee"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/jobXML_1_0.xsd ">
> <step id="STEP1">
> <batchlet ref="TestBatchlet1" />
> <next on="0" to="STEP2" />
> <fail on="1" exit-status="FAILED_BY_EXIT_STATUS" />
> </step>
> <step id="STEP2">
> <batchlet ref="TestBatchlet2" />
> </step>
> </job>
> {noformat}
> In this case, we can not restart the failed job from the failed step STEP1.
> This behavior is correct based on the description of 10.8 Restart Processing, 3. a. in JSR 352.
> But it is not expected result.
> {quote}
> 10.8 Restart Processing
> 3. Starting at the restart position, each execution element is re-examined to determine if it should re-execute:
> a. If the execution element is a COMPLETED step that specifies allow-restart-if- complete=false, then follow the transition to the next
> execution element based on the exit status for this step from the previous execution.
> {quote}
> On the other hand, If the STEP1 is failed by throwing an exception, both of the resulting job status and the step status are FAILED.
> {noformat}
> job status: FAILED
> step: STEP1, step status: FAILED
> {noformat}
> In this case, restarting the failed job is correctly executed, because the step status is FAILED.
> I think the step status of the failed step should be FAILED in both cases. But the section "8.6.2 Fail Element" of JSR352 says nothing about what step status value must be exposed after failed.
> This behavior is the same in GlassFish 4 and WildFly 8.2.
> So, I want to know what is the correct specification or intended behavior.
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
9 years, 8 months
[JBoss JIRA] (WFLY-4427) Step status of the failed step by <fail> element becomes COMPLETED.
by Takashi Nishigaya (JIRA)
[ https://issues.jboss.org/browse/WFLY-4427?page=com.atlassian.jira.plugin.... ]
Takashi Nishigaya edited comment on WFLY-4427 at 3/13/15 11:31 PM:
-------------------------------------------------------------------
Thank you, Cheng.
I am considering the restarting use cases of using allow-start-if-complete attribute:
# All of the steps defined with allow-start-if-complete="false" (default)
#* This type of job cannot be restarted. This is almost the same meaning as restartable="false".
# All of the steps defined with allow-start-if-complete="true"
#* This type of job is designed to re-execute all of the steps of the failed job. This is the same as newly invoking start(), instead of restart().
# Mixed with steps with allow-start-if-complete="true" and allow-start-if-complete="false"
#* In this case, the behavior is a little bit confusing. Ff the job failed at the step with allow-start-if-complete="true", the restart() will re-execute all of the steps with allow-start-if-complete="true" and the rest of the steps unexecuted previously. But if failed at the step with allow-start-if-complete="false", the failed job cannot be restarted, because the failed step is always evaluated as the previous step status, FAILED.
I cannot imagine the real world scenario of case 3 and the effective usage of allow-start-if-complete.
When designing the job definitions, if we want to restart the failed job from the point of the step just failed previously, we cannot use the fail-by-exit-status strategy. In such case, we should use fail-by-throwing-a-exception strategy.
was (Author: nishigaya):
Thank you, Cheng.
I am considering the restarting use cases of using allow-start-if-complete attribute:
# All of the steps defined with allow-start-if-complete="false" (default)
#* This type of job cannot be restarted. This is almost the same meaning as restartable="false".
# All of the steps defined with allow-start-if-complete="true"
#* This type of job is designed to re-execute all of the steps of the failed job. This is the same as newly invoking start(), instead of restart().
# Mixed with steps with allow-start-if-complete="true" and allow-start-if-complete="false"
#* In this type of job, restarting the failed job means compensation purpose. Restart() will only re-execute all of the steps with allow-start-if-complete="true" and the rest of the steps unexecuted previously. It is used only when a set of the job recovery steps is determined at design time.
When designing the job definitions, if we want to restart the failed job from the point of the step just failed previously, we cannot use the fail-by-exit-status strategy. In such case, we should use fail-by-throwing-a-exception strategy.
> Step status of the failed step by <fail> element becomes COMPLETED.
> -------------------------------------------------------------------
>
> Key: WFLY-4427
> URL: https://issues.jboss.org/browse/WFLY-4427
> Project: WildFly
> Issue Type: Bug
> Components: Batch
> Affects Versions: 8.2.0.Final
> Reporter: Takashi Nishigaya
> Assignee: Cheng Fang
> Attachments: batch-restart-failed.zip
>
>
> Assuming the following job definition, if STEP1 returns "1" as the exit status, the job status becomes FAILED. But the step status is COMPLETED.
> {noformat}
> job status: FAILED
> step: STEP1, step status: COMPLETED
> {noformat}
> {noformat}
> <job id="batch-job1" version="1.0" xmlns="http://xmlns.jcp.org/xml/ns/javaee"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/jobXML_1_0.xsd ">
> <step id="STEP1">
> <batchlet ref="TestBatchlet1" />
> <next on="0" to="STEP2" />
> <fail on="1" exit-status="FAILED_BY_EXIT_STATUS" />
> </step>
> <step id="STEP2">
> <batchlet ref="TestBatchlet2" />
> </step>
> </job>
> {noformat}
> In this case, we can not restart the failed job from the failed step STEP1.
> This behavior is correct based on the description of 10.8 Restart Processing, 3. a. in JSR 352.
> But it is not expected result.
> {quote}
> 10.8 Restart Processing
> 3. Starting at the restart position, each execution element is re-examined to determine if it should re-execute:
> a. If the execution element is a COMPLETED step that specifies allow-restart-if- complete=false, then follow the transition to the next
> execution element based on the exit status for this step from the previous execution.
> {quote}
> On the other hand, If the STEP1 is failed by throwing an exception, both of the resulting job status and the step status are FAILED.
> {noformat}
> job status: FAILED
> step: STEP1, step status: FAILED
> {noformat}
> In this case, restarting the failed job is correctly executed, because the step status is FAILED.
> I think the step status of the failed step should be FAILED in both cases. But the section "8.6.2 Fail Element" of JSR352 says nothing about what step status value must be exposed after failed.
> This behavior is the same in GlassFish 4 and WildFly 8.2.
> So, I want to know what is the correct specification or intended behavior.
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
9 years, 8 months
[JBoss JIRA] (WFLY-4427) Step status of the failed step by <fail> element becomes COMPLETED.
by Takashi Nishigaya (JIRA)
[ https://issues.jboss.org/browse/WFLY-4427?page=com.atlassian.jira.plugin.... ]
Takashi Nishigaya edited comment on WFLY-4427 at 3/13/15 11:32 PM:
-------------------------------------------------------------------
Thank you, Cheng.
I am considering the restarting use cases of using allow-start-if-complete attribute:
# All of the steps defined with allow-start-if-complete="false" (default)
#* This type of job cannot be restarted. This is almost the same meaning as restartable="false".
# All of the steps defined with allow-start-if-complete="true"
#* This type of job is designed to re-execute all of the steps of the failed job. This is the same as newly invoking start(), instead of restart().
# Mixed with steps with allow-start-if-complete="true" and allow-start-if-complete="false"
#* In this case, the behavior is a little bit confusing. If the job failed at the step with allow-start-if-complete="true", the restart() will re-execute all of the steps with allow-start-if-complete="true" and the rest of the steps unexecuted previously. But if failed at the step with allow-start-if-complete="false", the failed job cannot be restarted, because the failed step is always evaluated as the previous step status, FAILED.
I cannot imagine the real world scenario of case 3 and the effective usage of allow-start-if-complete.
When designing the job definitions, if we want to restart the failed job from the point of the step just failed previously, we cannot use the fail-by-exit-status strategy. In such case, we should use fail-by-throwing-a-exception strategy.
was (Author: nishigaya):
Thank you, Cheng.
I am considering the restarting use cases of using allow-start-if-complete attribute:
# All of the steps defined with allow-start-if-complete="false" (default)
#* This type of job cannot be restarted. This is almost the same meaning as restartable="false".
# All of the steps defined with allow-start-if-complete="true"
#* This type of job is designed to re-execute all of the steps of the failed job. This is the same as newly invoking start(), instead of restart().
# Mixed with steps with allow-start-if-complete="true" and allow-start-if-complete="false"
#* In this case, the behavior is a little bit confusing. Ff the job failed at the step with allow-start-if-complete="true", the restart() will re-execute all of the steps with allow-start-if-complete="true" and the rest of the steps unexecuted previously. But if failed at the step with allow-start-if-complete="false", the failed job cannot be restarted, because the failed step is always evaluated as the previous step status, FAILED.
I cannot imagine the real world scenario of case 3 and the effective usage of allow-start-if-complete.
When designing the job definitions, if we want to restart the failed job from the point of the step just failed previously, we cannot use the fail-by-exit-status strategy. In such case, we should use fail-by-throwing-a-exception strategy.
> Step status of the failed step by <fail> element becomes COMPLETED.
> -------------------------------------------------------------------
>
> Key: WFLY-4427
> URL: https://issues.jboss.org/browse/WFLY-4427
> Project: WildFly
> Issue Type: Bug
> Components: Batch
> Affects Versions: 8.2.0.Final
> Reporter: Takashi Nishigaya
> Assignee: Cheng Fang
> Attachments: batch-restart-failed.zip
>
>
> Assuming the following job definition, if STEP1 returns "1" as the exit status, the job status becomes FAILED. But the step status is COMPLETED.
> {noformat}
> job status: FAILED
> step: STEP1, step status: COMPLETED
> {noformat}
> {noformat}
> <job id="batch-job1" version="1.0" xmlns="http://xmlns.jcp.org/xml/ns/javaee"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/jobXML_1_0.xsd ">
> <step id="STEP1">
> <batchlet ref="TestBatchlet1" />
> <next on="0" to="STEP2" />
> <fail on="1" exit-status="FAILED_BY_EXIT_STATUS" />
> </step>
> <step id="STEP2">
> <batchlet ref="TestBatchlet2" />
> </step>
> </job>
> {noformat}
> In this case, we can not restart the failed job from the failed step STEP1.
> This behavior is correct based on the description of 10.8 Restart Processing, 3. a. in JSR 352.
> But it is not expected result.
> {quote}
> 10.8 Restart Processing
> 3. Starting at the restart position, each execution element is re-examined to determine if it should re-execute:
> a. If the execution element is a COMPLETED step that specifies allow-restart-if- complete=false, then follow the transition to the next
> execution element based on the exit status for this step from the previous execution.
> {quote}
> On the other hand, If the STEP1 is failed by throwing an exception, both of the resulting job status and the step status are FAILED.
> {noformat}
> job status: FAILED
> step: STEP1, step status: FAILED
> {noformat}
> In this case, restarting the failed job is correctly executed, because the step status is FAILED.
> I think the step status of the failed step should be FAILED in both cases. But the section "8.6.2 Fail Element" of JSR352 says nothing about what step status value must be exposed after failed.
> This behavior is the same in GlassFish 4 and WildFly 8.2.
> So, I want to know what is the correct specification or intended behavior.
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
9 years, 8 months
[JBoss JIRA] (WFLY-4427) Step status of the failed step by <fail> element becomes COMPLETED.
by Takashi Nishigaya (JIRA)
[ https://issues.jboss.org/browse/WFLY-4427?page=com.atlassian.jira.plugin.... ]
Takashi Nishigaya edited comment on WFLY-4427 at 3/13/15 9:21 PM:
------------------------------------------------------------------
Thank you, Cheng.
I am considering the restarting use cases of using allow-start-if-complete attribute:
# All of the steps defined with allow-start-if-complete="false" (default)
#* This type of job cannot be restarted. This is almost the same meaning as restartable="false".
# All of the steps defined with allow-start-if-complete="true"
#* This type of job is designed to re-execute all of the steps of the failed job. This is the same as newly invoking start(), instead of restart().
# Mixed with steps with allow-start-if-complete="true" and allow-start-if-complete="false"
#* In this type of job, restarting the failed job means compensation purpose. Restart() will only re-execute all of the steps with allow-start-if-complete="true" and the rest of the steps unexecuted previously. It is used only when a set of the job recovery steps is determined at design time.
When designing the job definitions, if we want to restart the failed job from the point of the step just failed previously, we cannot use the fail-by-exit-status strategy. In such case, we should use fail-by-throwing-a-exception strategy.
was (Author: nishigaya):
Thank you, Cheng.
I am considering the restarting use cases of using allow-start-if-complete attribute:
# All of the steps defined with allow-start-if-complete="false" (default)
#* This type of job cannot be restarted. This is almost the same meaning as restartable="false".
# All of the steps defined with allow-start-if-complete="true"
#* This type of job is designed to re-execute all of the steps of the failed job. This is the same as newly invoking start(), instead of restart().
# Mixed with steps with allow-start-if-complete="true" and allow-start-if-complete="false"
#* In this type of job, restarting the failed job means compensation purpose. Restart() will only re-execute all of the steps with allow-start-if-complete="true". It is used only when a set of the job recovery steps is determined at design time.
When designing the job definitions, if we want to restart the failed job from the point of the step just failed previously, we cannot use the fail-by-exit-status strategy. In such case, we should use fail-by-throwing-a-exception strategy.
> Step status of the failed step by <fail> element becomes COMPLETED.
> -------------------------------------------------------------------
>
> Key: WFLY-4427
> URL: https://issues.jboss.org/browse/WFLY-4427
> Project: WildFly
> Issue Type: Bug
> Components: Batch
> Affects Versions: 8.2.0.Final
> Reporter: Takashi Nishigaya
> Assignee: Cheng Fang
> Attachments: batch-restart-failed.zip
>
>
> Assuming the following job definition, if STEP1 returns "1" as the exit status, the job status becomes FAILED. But the step status is COMPLETED.
> {noformat}
> job status: FAILED
> step: STEP1, step status: COMPLETED
> {noformat}
> {noformat}
> <job id="batch-job1" version="1.0" xmlns="http://xmlns.jcp.org/xml/ns/javaee"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/jobXML_1_0.xsd ">
> <step id="STEP1">
> <batchlet ref="TestBatchlet1" />
> <next on="0" to="STEP2" />
> <fail on="1" exit-status="FAILED_BY_EXIT_STATUS" />
> </step>
> <step id="STEP2">
> <batchlet ref="TestBatchlet2" />
> </step>
> </job>
> {noformat}
> In this case, we can not restart the failed job from the failed step STEP1.
> This behavior is correct based on the description of 10.8 Restart Processing, 3. a. in JSR 352.
> But it is not expected result.
> {quote}
> 10.8 Restart Processing
> 3. Starting at the restart position, each execution element is re-examined to determine if it should re-execute:
> a. If the execution element is a COMPLETED step that specifies allow-restart-if- complete=false, then follow the transition to the next
> execution element based on the exit status for this step from the previous execution.
> {quote}
> On the other hand, If the STEP1 is failed by throwing an exception, both of the resulting job status and the step status are FAILED.
> {noformat}
> job status: FAILED
> step: STEP1, step status: FAILED
> {noformat}
> In this case, restarting the failed job is correctly executed, because the step status is FAILED.
> I think the step status of the failed step should be FAILED in both cases. But the section "8.6.2 Fail Element" of JSR352 says nothing about what step status value must be exposed after failed.
> This behavior is the same in GlassFish 4 and WildFly 8.2.
> So, I want to know what is the correct specification or intended behavior.
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
9 years, 8 months