[JBoss JIRA] (WFLY-9591) Emulate Artemis 1.x address convention
by Jeff Mesnil (JIRA)
[ https://issues.jboss.org/browse/WFLY-9591?page=com.atlassian.jira.plugin.... ]
Jeff Mesnil updated WFLY-9591:
------------------------------
Summary: Emulate Artemis 1.x address convention (was: Correct attributes representing Artemis addresses)
> Emulate Artemis 1.x address convention
> --------------------------------------
>
> Key: WFLY-9591
> URL: https://issues.jboss.org/browse/WFLY-9591
> Project: WildFly
> Issue Type: Bug
> Components: JMS
> Reporter: Jeff Mesnil
> Assignee: Jeff Mesnil
>
> Artemis 2.x has changed the naming convention for its resources.
> JMS Queue (resp. topic) no longer uses the "jms.queue." (resp. "jms.topic.") prefix to name its address and core queues.
> In the messaging-activemq subsystem, there are many attributes that correspond to such addresses.
> In the default configuration, we specified addresses for expiry and DLQ in the address-setting resources:
> {code}
> <address-setting name="#"
> dead-letter-address="jms.queue.DLQ"
> expiry-address="jms.queue.ExpiryQueue" />
> {code}
> This configuration must now be updated to use the new address naming convention:
> {code}
> <address-setting name="#"
> dead-letter-address="DLQ"
> expiry-address="ExpiryQueue" />
> {code}
> In order to preserve backwards compatibility, we must also "correct" previous configuration when they are loaded.
> If we detect that an attribute that corresponds to an Artemis address has a value that starts with "jms.queue." or "jms.topic.", we log a warning that such value is no longer correct for Artemis and use instead the value without the prefix.
> There is also a special case for the cluster-connection that was using the "jms" value in the default configuration to forward any address that started with "jms" (i.e. any JMS resources) to the cluster.
> This is no longer correct with Artemis 2.4 and instead we must use the "" (empty string) so that any addresses are forwarded to the cluster.
> Again, we must also correct the attribute if its value is "jms" to use "" instead.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
8 years, 3 months
[JBoss JIRA] (DROOLS-2242) Wrong pattern cloning causes missing FromNode sharing and eventually a NPE
by Mario Fusco (JIRA)
Mario Fusco created DROOLS-2242:
-----------------------------------
Summary: Wrong pattern cloning causes missing FromNode sharing and eventually a NPE
Key: DROOLS-2242
URL: https://issues.jboss.org/browse/DROOLS-2242
Project: Drools
Issue Type: Bug
Reporter: Mario Fusco
Assignee: Mario Fusco
Wrong cloning of a pattern having a FromNode as source causes wrong initialization of both node and pattern which in turn prevents sharing of FromNode when possible.
Even worse when the duplicated FromNode are part of a subnetwork also the RiaNode at the end of the subnetwork is wrongly initialized leading to a NPE like the following:
{node}
java.lang.NullPointerException
at org.drools.core.reteoo.RiaPathMemory.initDataDriven(RiaPathMemory.java:35)
at org.drools.core.reteoo.PathMemory.<init>(PathMemory.java:50)
{node}
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
8 years, 3 months
[JBoss JIRA] (WFLY-9610) Start of a BatchJob is called, but BatchJob is seems no started. Absent entries in DB tables step_execution, job_execution
by Cheng Fang (JIRA)
[ https://issues.jboss.org/browse/WFLY-9610?page=com.atlassian.jira.plugin.... ]
Cheng Fang commented on WFLY-9610:
----------------------------------
After a job execution is submitted, a new job execution entry is created and inserted into job repository db, whether it will be on hold or not. And the next time it is updated to the db is when the job execution gets the chance to run with available thread and so it can update itself into the db with new batch status.
the change to {{org.jberet.runtime.runner.JobExecutionRunner}}:
https://github.com/jberet/jsr352/commit/f27fb499aea1232bec1ee8050cb995e37...
The real change is moving the end curl brace from line 50 to line 84 to expand the if condition block so that the processing is skipped in case of STOPPING.
> Start of a BatchJob is called, but BatchJob is seems no started. Absent entries in DB tables step_execution, job_execution
> --------------------------------------------------------------------------------------------------------------------------
>
> Key: WFLY-9610
> URL: https://issues.jboss.org/browse/WFLY-9610
> Project: WildFly
> Issue Type: Bug
> Components: Batch
> Affects Versions: 9.0.1.Final
> Environment: Cluster, standalone-full-ha
> Reporter: Serg Pol
> Assignee: Cheng Fang
>
> Start of a BatchJob is called and record/entry is absent sometimes in DB table "step_execution" as well as Endtime and Exitstatus in the table job_execution (there is just info about start of BatchJob).
> There are no any error nessages.
> BatchJob is not started in this case according Log.
> Any idea? Thanks
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
8 years, 3 months
[JBoss JIRA] (DROOLS-2241) Wrong pattern cloning causes missing FromNode sharing and eventually a NPE
by Mario Fusco (JIRA)
Mario Fusco created DROOLS-2241:
-----------------------------------
Summary: Wrong pattern cloning causes missing FromNode sharing and eventually a NPE
Key: DROOLS-2241
URL: https://issues.jboss.org/browse/DROOLS-2241
Project: Drools
Issue Type: Bug
Reporter: Mario Fusco
Assignee: Mario Fusco
Wrong cloning of a pattern having a FromNode as source causes wrong initialization of both node and pattern which in turn prevents sharing of FromNode when possible.
Even worse when the duplicated FromNode are part of a subnetwork also the RiaNode at the end of the subnetwork is wrongly initialized leading to a NPE like the following:
{node}
java.lang.NullPointerException
at org.drools.core.reteoo.RiaPathMemory.initDataDriven(RiaPathMemory.java:35)
at org.drools.core.reteoo.PathMemory.<init>(PathMemory.java:50)
{node}
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
8 years, 3 months
[JBoss JIRA] (DROOLS-2240) Timer rules with pseudo clock don't fire
by Edson Tirelli (JIRA)
[ https://issues.jboss.org/browse/DROOLS-2240?page=com.atlassian.jira.plugi... ]
Edson Tirelli reassigned DROOLS-2240:
-------------------------------------
Assignee: Mario Fusco (was: Edson Tirelli)
> Timer rules with pseudo clock don't fire
> ----------------------------------------
>
> Key: DROOLS-2240
> URL: https://issues.jboss.org/browse/DROOLS-2240
> Project: Drools
> Issue Type: Bug
> Affects Versions: 7.5.0.Final
> Reporter: Christian Bauer
> Assignee: Mario Fusco
>
> We are trying to test rules with timer option and the pseudo clock.
> The problem can probably also be seen by enabling (note the @Ignore) this test: https://github.com/kiegroup/drools/blob/master/drools-compiler/src/test/j...
> Based on this class, this is a minimal test that shows the problem:
> {code}
> import org.drools.core.time.SessionPseudoClock;
> import org.junit.Test;
> import org.kie.api.KieServices;
> import org.kie.api.builder.KieFileSystem;
> import org.kie.api.builder.model.KieBaseModel;
> import org.kie.api.builder.model.KieModuleModel;
> import org.kie.api.runtime.KieSession;
> import org.kie.api.runtime.conf.ClockTypeOption;
> import java.util.concurrent.ExecutorService;
> import java.util.concurrent.Executors;
> import java.util.concurrent.Future;
> import java.util.concurrent.TimeUnit;
> import static org.junit.Assert.assertEquals;
> /**
> * Based on:
> * https://github.com/kiegroup/drools/blob/master/drools-compiler/src/test/j...
> */
> public class PseudoClockTimerTest {
> private KieSession ksession;
> private SessionPseudoClock clock;
> public void init(String clockType) {
> String drl = "package test.rules\n" +
> "\n" +
> "rule \"Do something triggered by timer\"\n" +
> "timer (int: 1s 1s)\n" +
> "then\n" +
> " System.out.println(\"### DO SOMETHING \" + drools.getWorkingMemory().getSessionClock().getCurrentTime());\n" +
> " insert(\"### TIME IS \" + drools.getWorkingMemory().getSessionClock().getCurrentTime());\n" +
> "end\n";
> KieServices ks = KieServices.Factory.get();
> KieModuleModel module = ks.newKieModuleModel();
> KieBaseModel defaultBase = module.newKieBaseModel("defaultKBase")
> .setDefault(true)
> .addPackage("*");
> defaultBase.newKieSessionModel("defaultKSession")
> .setDefault(true)
> .setClockType(ClockTypeOption.get(clockType));
> KieFileSystem kfs = ks.newKieFileSystem()
> .write("src/main/resources/r1.drl", drl);
> kfs.writeKModuleXML(module.toXML());
> ks.newKieBuilder(kfs).buildAll();
> ksession = ks.newKieContainer(ks.getRepository().getDefaultReleaseId())
> .newKieSession();
> if (clockType.equals("pseudo"))
> clock = ksession.getSessionClock();
> }
> public void cleanup() {
> ksession.dispose();
> }
> @Test
> public void testTimerExecution() throws Exception {
> init("realtime");
> performRealtimeClockTest();
> cleanup();
> init("pseudo");
> performPseudoClockTest();
> cleanup();
> }
> private void performRealtimeClockTest() throws Exception {
> ExecutorService thread = Executors.newSingleThreadExecutor();
> final Future fireUntilHaltResult = thread.submit(() -> ksession.fireUntilHalt());
> try {
> Thread.sleep(10500);
> assertEquals(10, ksession.getFactCount());
> } finally {
> ksession.halt();
> fireUntilHaltResult.get(60000, TimeUnit.SECONDS);
> thread.shutdown();
> }
> }
> private void performPseudoClockTest() throws Exception {
> ExecutorService thread = Executors.newSingleThreadExecutor();
> final Future fireUntilHaltResult = thread.submit(() -> ksession.fireUntilHalt());
> try {
> Thread.sleep(500);
> // NOT WORKING:
> // clock.advanceTime(10, TimeUnit.SECONDS);
> // Thread.sleep(50);
> // WORKAROUND:
> for (int i = 0; i < 10; i++) {
> clock.advanceTime(1, TimeUnit.SECONDS);
> Thread.sleep(50);
> }
> assertEquals(10, ksession.getFactCount());
> } finally {
> ksession.halt();
> fireUntilHaltResult.get(60000, TimeUnit.SECONDS);
> thread.shutdown();
> }
> }
> }
> {code}
> See the NOT WORKING and WORKAROUND markers. There doesn't seem to be any other test in the codebase with timer rules and the pseudo clock, so our conclusion is that this combination is not working at all.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
8 years, 3 months
[JBoss JIRA] (WFCORE-3507) CLI, use arrow Down key to scroll
by Jean-Francois Denise (JIRA)
Jean-Francois Denise created WFCORE-3507:
--------------------------------------------
Summary: CLI, use arrow Down key to scroll
Key: WFCORE-3507
URL: https://issues.jboss.org/browse/WFCORE-3507
Project: WildFly Core
Issue Type: Enhancement
Components: CLI
Reporter: Jean-Francois Denise
Assignee: Jean-Francois Denise
In addition to return key, Down arrow is an obvious way to scroll a line of content.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
8 years, 3 months
[JBoss JIRA] (DROOLS-2240) Timer rules with pseudo clock don't fire
by Christian Bauer (JIRA)
Christian Bauer created DROOLS-2240:
---------------------------------------
Summary: Timer rules with pseudo clock don't fire
Key: DROOLS-2240
URL: https://issues.jboss.org/browse/DROOLS-2240
Project: Drools
Issue Type: Bug
Affects Versions: 7.5.0.Final
Reporter: Christian Bauer
Assignee: Edson Tirelli
We are trying to test rules with timer option and the pseudo clock.
The problem can probably also be seen by enabling (note the @Ignore) this test: https://github.com/kiegroup/drools/blob/master/drools-compiler/src/test/j...
Based on this class, this is a minimal test that shows the problem:
{code}
import org.drools.core.time.SessionPseudoClock;
import org.junit.Test;
import org.kie.api.KieServices;
import org.kie.api.builder.KieFileSystem;
import org.kie.api.builder.model.KieBaseModel;
import org.kie.api.builder.model.KieModuleModel;
import org.kie.api.runtime.KieSession;
import org.kie.api.runtime.conf.ClockTypeOption;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.Future;
import java.util.concurrent.TimeUnit;
import static org.junit.Assert.assertEquals;
/**
* Based on:
* https://github.com/kiegroup/drools/blob/master/drools-compiler/src/test/j...
*/
public class PseudoClockTimerTest {
private KieSession ksession;
private SessionPseudoClock clock;
public void init(String clockType) {
String drl = "package test.rules\n" +
"\n" +
"rule \"Do something triggered by timer\"\n" +
"timer (int: 1s 1s)\n" +
"then\n" +
" System.out.println(\"### DO SOMETHING \" + drools.getWorkingMemory().getSessionClock().getCurrentTime());\n" +
" insert(\"### TIME IS \" + drools.getWorkingMemory().getSessionClock().getCurrentTime());\n" +
"end\n";
KieServices ks = KieServices.Factory.get();
KieModuleModel module = ks.newKieModuleModel();
KieBaseModel defaultBase = module.newKieBaseModel("defaultKBase")
.setDefault(true)
.addPackage("*");
defaultBase.newKieSessionModel("defaultKSession")
.setDefault(true)
.setClockType(ClockTypeOption.get(clockType));
KieFileSystem kfs = ks.newKieFileSystem()
.write("src/main/resources/r1.drl", drl);
kfs.writeKModuleXML(module.toXML());
ks.newKieBuilder(kfs).buildAll();
ksession = ks.newKieContainer(ks.getRepository().getDefaultReleaseId())
.newKieSession();
if (clockType.equals("pseudo"))
clock = ksession.getSessionClock();
}
public void cleanup() {
ksession.dispose();
}
@Test
public void testTimerExecution() throws Exception {
init("realtime");
performRealtimeClockTest();
cleanup();
init("pseudo");
performPseudoClockTest();
cleanup();
}
private void performRealtimeClockTest() throws Exception {
ExecutorService thread = Executors.newSingleThreadExecutor();
final Future fireUntilHaltResult = thread.submit(() -> ksession.fireUntilHalt());
try {
Thread.sleep(10500);
assertEquals(10, ksession.getFactCount());
} finally {
ksession.halt();
fireUntilHaltResult.get(60000, TimeUnit.SECONDS);
thread.shutdown();
}
}
private void performPseudoClockTest() throws Exception {
ExecutorService thread = Executors.newSingleThreadExecutor();
final Future fireUntilHaltResult = thread.submit(() -> ksession.fireUntilHalt());
try {
Thread.sleep(500);
// NOT WORKING:
// clock.advanceTime(10, TimeUnit.SECONDS);
// Thread.sleep(50);
// WORKAROUND:
for (int i = 0; i < 10; i++) {
clock.advanceTime(1, TimeUnit.SECONDS);
Thread.sleep(50);
}
assertEquals(10, ksession.getFactCount());
} finally {
ksession.halt();
fireUntilHaltResult.get(60000, TimeUnit.SECONDS);
thread.shutdown();
}
}
}
{code}
See the NOT WORKING and WORKAROUND markers. There doesn't seem to be any other test in the codebase with timer rules and the pseudo clock, so our conclusion is that this combination is not working at all.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
8 years, 3 months
[JBoss JIRA] (DROOLS-2233) DMN: time(date("2017-08-10")) should return 00:00:00z time
by Tibor Zimányi (JIRA)
[ https://issues.jboss.org/browse/DROOLS-2233?page=com.atlassian.jira.plugi... ]
Tibor Zimányi updated DROOLS-2233:
----------------------------------
Description:
According to the specification in section "10.3.2.3.5 date":
"Where necessary, including the valuedt function (see 10.3.2.x.6), a date value is considered to be equivalent to a date time value in which the time of day is UTC midnight (00:00:00)."
Currently the case time(date("2017-08-10")) returns null, because the evaluation ends with DateTimeException, because internally we represent dates as LocalDate class, which doesn't have time part.
was:
According to the specification in section "10.3.2.3.5 date":
"Where necessary, including the valuedt function (see 10.3.2.x.6), a date value is considered to be equivalent to a date time value in which the time of day is UTC midnight (00:00:00)."
Currently the case time(date("2017-08-10")) returns null, because the evaluation ends with DateTimeException, because internally we represent dates as LocalDate class, which doesn't have time part.
I will provide a PR with a fix.
> DMN: time(date("2017-08-10")) should return 00:00:00z time
> ----------------------------------------------------------
>
> Key: DROOLS-2233
> URL: https://issues.jboss.org/browse/DROOLS-2233
> Project: Drools
> Issue Type: Bug
> Components: dmn engine
> Affects Versions: 7.5.0.Final
> Reporter: Tibor Zimányi
> Assignee: Tibor Zimányi
>
> According to the specification in section "10.3.2.3.5 date":
> "Where necessary, including the valuedt function (see 10.3.2.x.6), a date value is considered to be equivalent to a date time value in which the time of day is UTC midnight (00:00:00)."
> Currently the case time(date("2017-08-10")) returns null, because the evaluation ends with DateTimeException, because internally we represent dates as LocalDate class, which doesn't have time part.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
8 years, 3 months