[JBoss JIRA] (DROOLS-2240) Timer rules with pseudo clock don't fire
by Christian Bauer (JIRA)
[ https://issues.jboss.org/browse/DROOLS-2240?page=com.atlassian.jira.plugi... ]
Christian Bauer commented on DROOLS-2240:
-----------------------------------------
Should this work then?
{code}
for (int i = 0; i < 10; i++) {
clock.advanceTime(1, TimeUnit.SECONDS);
}
Thread.sleep(50);
{code}
> 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] (DROOLS-2240) Timer rules with pseudo clock don't fire
by Christian Bauer (JIRA)
[ https://issues.jboss.org/browse/DROOLS-2240?page=com.atlassian.jira.plugi... ]
Christian Bauer commented on DROOLS-2240:
-----------------------------------------
Instead of the hundreds of workbench screenshots, maybe that should be in the documentation?
> 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] (DROOLS-2240) Timer rules with pseudo clock don't fire
by Mario Fusco (JIRA)
[ https://issues.jboss.org/browse/DROOLS-2240?page=com.atlassian.jira.plugi... ]
Mario Fusco resolved DROOLS-2240.
---------------------------------
Resolution: Explained
You have a rule that is fires every second, have a pseudo-clock that makes a jump of 10 seconds in one shoot and expect the rule to fire 10 times. This is not how the psuedo-clock is supposed to work. Conversely time conditions are evaluated once at each discrete jump so what happens when you do 10 seconds jump is that the timestamp for the next expected rule firing is compared with the current time and if it's lower the rule fires once and that's all. When instead of do 10 subsequent jumps the condition is evaluated 10 times and then also the rule fires 10 times as per your expectations.
> 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] (ELY-1487) HTTP Digest SHA mechs missing in available mechanisms
by Jan Kalina (JIRA)
[ https://issues.jboss.org/browse/ELY-1487?page=com.atlassian.jira.plugin.s... ]
Jan Kalina updated ELY-1487:
----------------------------
Affects Version/s: 1.2.0.Beta11
> HTTP Digest SHA mechs missing in available mechanisms
> -----------------------------------------------------
>
> Key: ELY-1487
> URL: https://issues.jboss.org/browse/ELY-1487
> Project: WildFly Elytron
> Issue Type: Bug
> Affects Versions: 1.2.0.Beta11
> Reporter: Jan Kalina
> Assignee: Jan Kalina
>
> DIGEST-SHA-256 and DIGEST-SHA-512-256 are not correctly registered:
> When trying to deploy application using one of them for authentication:
> {code}
> org.jboss.arquillian.container.spi.client.container.DeploymentException: Cannot deploy DigestSha256MechTestCase.war: {"WFLYCTL0062: Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-1" => {"WFLYCTL0080: Failed services" => {"jboss.undertow.deployment.default-server.default-host./DigestSha256MechTestCase" => "java.lang.RuntimeException: java.lang.IllegalStateException: WFLYUT0084: There are no mechanisms available from the HttpAuthenticationFactory.
> Caused by: java.lang.RuntimeException: java.lang.IllegalStateException: WFLYUT0084: There are no mechanisms available from the HttpAuthenticationFactory.
> Caused by: java.lang.IllegalStateException: WFLYUT0084: There are no mechanisms available from the HttpAuthenticationFactory."}}}}
> {code}
> Problem is mechanisms are missing in output of {{ServerMechanismFactoryImpl.getMechanismNames()}}.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
8 years, 3 months
[JBoss JIRA] (ELY-1487) HTTP Digest SHA mechs missing in available mechanisms
by Jan Kalina (JIRA)
Jan Kalina created ELY-1487:
-------------------------------
Summary: HTTP Digest SHA mechs missing in available mechanisms
Key: ELY-1487
URL: https://issues.jboss.org/browse/ELY-1487
Project: WildFly Elytron
Issue Type: Bug
Reporter: Jan Kalina
Assignee: Jan Kalina
DIGEST-SHA-256 and DIGEST-SHA-512-256 are not correctly registered:
When trying to deploy application using one of them for authentication:
{code}
org.jboss.arquillian.container.spi.client.container.DeploymentException: Cannot deploy DigestSha256MechTestCase.war: {"WFLYCTL0062: Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-1" => {"WFLYCTL0080: Failed services" => {"jboss.undertow.deployment.default-server.default-host./DigestSha256MechTestCase" => "java.lang.RuntimeException: java.lang.IllegalStateException: WFLYUT0084: There are no mechanisms available from the HttpAuthenticationFactory.
Caused by: java.lang.RuntimeException: java.lang.IllegalStateException: WFLYUT0084: There are no mechanisms available from the HttpAuthenticationFactory.
Caused by: java.lang.IllegalStateException: WFLYUT0084: There are no mechanisms available from the HttpAuthenticationFactory."}}}}
{code}
Problem is mechanisms are missing in output of {{ServerMechanismFactoryImpl.getMechanismNames()}}.
--
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 Mario Fusco (JIRA)
[ https://issues.jboss.org/browse/DROOLS-2240?page=com.atlassian.jira.plugi... ]
Mario Fusco updated DROOLS-2240:
--------------------------------
Sprint: 2018 Week 01-02
> 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] (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:
------------------------------
Description:
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 decided to preserve Artemis 1.x address convention for JMS resources created by the messaging-activemq subsystem.
The user configuration and management code will remain compatible without any change.
was:
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.
> 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 decided to preserve Artemis 1.x address convention for JMS resources created by the messaging-activemq subsystem.
> The user configuration and management code will remain compatible without any change.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
8 years, 3 months