[JBoss JIRA] (WFLY-3410) Old “remote://“ protocol is hard coded RemoteDomainConnectionService
by Emmanuel Hugonnet (JIRA)
[ https://issues.jboss.org/browse/WFLY-3410?page=com.atlassian.jira.plugin.... ]
Emmanuel Hugonnet commented on WFLY-3410:
-----------------------------------------
RemoteDomainConnectionService
public synchronized void register() throws IOException {
...
masterURI = new URI("remote://" + NetworkUtils.formatPossibleIpv6Address(host) + ":" + port);
> Old “remote://“ protocol is hard coded RemoteDomainConnectionService
> --------------------------------------------------------------------
>
> Key: WFLY-3410
> URL: https://issues.jboss.org/browse/WFLY-3410
> Project: WildFly
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Reporter: Arun Gupta
>
> Email conversation on wildfly-dev:
> http://lists.jboss.org/pipermail/wildfly-dev/2014-May/002157.html
> > 1). Why the following entry is still referring to 9999 ? Shouldn't it be 9990 ?
> >
> > <domain-controller>
> > <remote host="10.211.55.7" port="9999"/>
> > </domain-controller>
> >
> > FTR it only works with 9999, not with 9990.
> >
> > Domain Controller shows the message:
> >
> > [Host Controller] 15:36:22,811 INFO [org.jboss.as.domain] (Host
> > Controller Service Threads - 28) JBAS010918: Registered remote slave
> > host "slave", WildFly 8.1.0.CR2 “Kenny”
> It looks like we hardcode the old “remote://“ protocol in RemoteDomainConnectionService rather than the new http-remoting protocol, so it is a bug. I am not sure if that is something we should attempt to negotiate explicitly, or to make the <remote> element take a ‘protocol’ attribute?
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
11 years, 10 months
[JBoss JIRA] (WFLY-3756) Rename package name of whole Arquillian Wildfly adapter
by Karel Piwko (JIRA)
[ https://issues.jboss.org/browse/WFLY-3756?page=com.atlassian.jira.plugin.... ]
Karel Piwko updated WFLY-3756:
------------------------------
Assignee: Stefan Miklosovic (was: Karel Piwko)
> Rename package name of whole Arquillian Wildfly adapter
> -------------------------------------------------------
>
> Key: WFLY-3756
> URL: https://issues.jboss.org/browse/WFLY-3756
> Project: WildFly
> Issue Type: Feature Request
> Security Level: Public(Everyone can see)
> Components: Test Suite
> Affects Versions: 8.1.0.Final
> Reporter: Stefan Miklosovic
> Assignee: Stefan Miklosovic
>
> Speaking about Arquillian Wildfly container adapter, some time ago it seems to me it was directly embedded into wildfly repository at github when I recall that correctly.
> Right now, it is deleted from there and is moved to https://github.com/wildfly/wildfly-arquillian
> The problem is that when you want to make a test which mixes two containers together, to be concrete, good old AS7 and new Wildfly, you can not do that since its package name are just same so you have naming clash on your class path.
> I am author of multiple container extension (1) (2) under Arquillian umbrella which enables the usage of two different container adapters in one test run which is not possible normally. While it was possible to make the difference between Jboss AS 7 and Wildfly since theirs package names were org.jboss.as and org.wildfly respectively when Wildfly was embedded in Wildfly repo itself, you can not do this anymore.
> This affects e.g. guys from Infinispan project which are trying to cover the migration from JBoss AS to Wildfly and they are writing tests for it. (you have old Jbosses and Wildflies and Infinispan can migrate data from one server to another and drop the old ones).
> I suggest to rename package name to org.wildfly to not collide anymore.
> Thanks a lot!
> (1) https://github.com/arquillian/arquillian-droidium/tree/master/droidium-co...
> (2) https://github.com/arquillian/arquillian-droidium/tree/master/droidium-co...
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
11 years, 10 months
[JBoss JIRA] (WFLY-3756) Rename package name of whole Arquillian Wildfly adapter
by Karel Piwko (JIRA)
[ https://issues.jboss.org/browse/WFLY-3756?page=com.atlassian.jira.plugin.... ]
Karel Piwko commented on WFLY-3756:
-----------------------------------
+1, this is a nice catch. [~smikloso] can you prepare a PR for such change? It should be completely transparent for users as the depend only on G:A:V. Users of multi-container extensions might be affected but I guess that you can bridge the change to Droidium users quite easily.
> Rename package name of whole Arquillian Wildfly adapter
> -------------------------------------------------------
>
> Key: WFLY-3756
> URL: https://issues.jboss.org/browse/WFLY-3756
> Project: WildFly
> Issue Type: Feature Request
> Security Level: Public(Everyone can see)
> Components: Test Suite
> Affects Versions: 8.1.0.Final
> Reporter: Stefan Miklosovic
> Assignee: Karel Piwko
>
> Speaking about Arquillian Wildfly container adapter, some time ago it seems to me it was directly embedded into wildfly repository at github when I recall that correctly.
> Right now, it is deleted from there and is moved to https://github.com/wildfly/wildfly-arquillian
> The problem is that when you want to make a test which mixes two containers together, to be concrete, good old AS7 and new Wildfly, you can not do that since its package name are just same so you have naming clash on your class path.
> I am author of multiple container extension (1) (2) under Arquillian umbrella which enables the usage of two different container adapters in one test run which is not possible normally. While it was possible to make the difference between Jboss AS 7 and Wildfly since theirs package names were org.jboss.as and org.wildfly respectively when Wildfly was embedded in Wildfly repo itself, you can not do this anymore.
> This affects e.g. guys from Infinispan project which are trying to cover the migration from JBoss AS to Wildfly and they are writing tests for it. (you have old Jbosses and Wildflies and Infinispan can migrate data from one server to another and drop the old ones).
> I suggest to rename package name to org.wildfly to not collide anymore.
> Thanks a lot!
> (1) https://github.com/arquillian/arquillian-droidium/tree/master/droidium-co...
> (2) https://github.com/arquillian/arquillian-droidium/tree/master/droidium-co...
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
11 years, 10 months
[JBoss JIRA] (JGRP-1872) Table: purge() with incorrect seqnos moves HD/LOW back
by Bela Ban (JIRA)
[ https://issues.jboss.org/browse/JGRP-1872?page=com.atlassian.jira.plugin.... ]
Bela Ban updated JGRP-1872:
---------------------------
Fix Version/s: (was: 3.5)
> Table: purge() with incorrect seqnos moves HD/LOW back
> ------------------------------------------------------
>
> Key: JGRP-1872
> URL: https://issues.jboss.org/browse/JGRP-1872
> Project: JGroups
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Reporter: Bela Ban
> Assignee: Bela Ban
> Fix For: 3.4.6
>
>
> When we have a Table with {{low=40, hd=40, hr=45}} and receive a {{purge(30,true)}}, then the table will be {{low=30,hd=30,hr=45}}.
> This only happens with parameter {{force}} being {{true}}.
> This doesn't cause any bugs, but until the next (correct) {{purge()}} is invoked, the table will show and incorrect number of missing messages.
> SOLUTION: add the check to the start of {{purge()}}:
> {code}
> if(seqno <= low) // perhaps check for force as well
> return;
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
11 years, 10 months
[JBoss JIRA] (JGRP-1872) Table: purge() with incorrect seqnos moves HD/LOW back
by Bela Ban (JIRA)
[ https://issues.jboss.org/browse/JGRP-1872?page=com.atlassian.jira.plugin.... ]
Bela Ban commented on JGRP-1872:
--------------------------------
Turns out master (3.5) already has the fix; need to backport it to the 3.4 branch only
> Table: purge() with incorrect seqnos moves HD/LOW back
> ------------------------------------------------------
>
> Key: JGRP-1872
> URL: https://issues.jboss.org/browse/JGRP-1872
> Project: JGroups
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Reporter: Bela Ban
> Assignee: Bela Ban
> Fix For: 3.4.6
>
>
> When we have a Table with {{low=40, hd=40, hr=45}} and receive a {{purge(30,true)}}, then the table will be {{low=30,hd=30,hr=45}}.
> This only happens with parameter {{force}} being {{true}}.
> This doesn't cause any bugs, but until the next (correct) {{purge()}} is invoked, the table will show and incorrect number of missing messages.
> SOLUTION: add the check to the start of {{purge()}}:
> {code}
> if(seqno <= low) // perhaps check for force as well
> return;
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
11 years, 10 months
[JBoss JIRA] (WFLY-3405) Variable interpolation not applied to remote-outbound-connection username attribute due to calling asString() instead of resolve() on the ModelValue
by Enrique González Martínez (JIRA)
[ https://issues.jboss.org/browse/WFLY-3405?page=com.atlassian.jira.plugin.... ]
Enrique González Martínez commented on WFLY-3405:
-------------------------------------------------
Variable interpolation not done during outbound connection instantiation. Using the same criteria as the other parameters that allow expressions to get the value (Accessing the AD to resolve the value)
> Variable interpolation not applied to remote-outbound-connection username attribute due to calling asString() instead of resolve() on the ModelValue
> ----------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: WFLY-3405
> URL: https://issues.jboss.org/browse/WFLY-3405
> Project: WildFly
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Remoting
> Affects Versions: JBoss AS7 7.2.0.Final, 8.0.0.Final, 8.1.0.Final
> Reporter: Mikal Henriksen
> Assignee: Enrique González Martínez
>
> We want to externalize the username and password used for remote ejb between two AS7.2 instances. But variable interpolation does not work in the <remote-outbound-connection> element's username attribute. It always sends the variable expression verbatim according to attached debugger, and trace logging of org.jboss.security on the target server.
> I dug through the code and found the problem. The offending line as of writing this:
> https://github.com/wildfly/wildfly/blob/dd3724f600e00e9cc539066cf0bd359f7...
> I checked the api here: http://grepcode.com/file/repository.jboss.org/nexus/content/repositories/...
> It looks like you're supposed to use resolve(), not asString(). The earliest version I verified this mistake was 7.2.0.Final, which is the version we're running. It's still there in the latest revision of master of the Wildfly repo.
> This problem possibly also affects other elements and attributes, so you may want to do a full usage scan of org.jboss.dmr.ModelValue#asString().
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
11 years, 10 months
[JBoss JIRA] (JGRP-1872) Table: purge() with incorrect seqnos moves HD/LOW back
by Bela Ban (JIRA)
[ https://issues.jboss.org/browse/JGRP-1872?page=com.atlassian.jira.plugin.... ]
Bela Ban edited comment on JGRP-1872 at 8/26/14 6:43 AM:
---------------------------------------------------------
Additional todos:
* Synchronize access to fields, e.g. hd/hr/size: not all methods do this. Examples: {{getMissing()}}, {{size()}} etc.
* Document that {{computeSize()}} and {{computeIndex()}} can never overflow (from int -> long -> negative value), as {{offset}} is set in {{resize()}} or {{compact()}}.
** Even if we _had_ a negative value, we'd get an {{ArrayIndexOutOfBounds}} exception rather than incorrect state.
was (Author: belaban):
Additionla todos:
* Synchronize access to fields, e.g. hd/hr/size: not all methods do this. Examples: {{getMissing()}}, {{size()}} etc.
* Document that {{computeSize()}} and {{computeIndex()}} can never overflow (from int -> long -> negative value), as {{offset}} is set in {{resize()}} or {{compact()}}.
** Even if we _had_ a negative value, we'd get an {{ArrayIndexOutOfBounds}} exception rather than incorrect state.
> Table: purge() with incorrect seqnos moves HD/LOW back
> ------------------------------------------------------
>
> Key: JGRP-1872
> URL: https://issues.jboss.org/browse/JGRP-1872
> Project: JGroups
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Reporter: Bela Ban
> Assignee: Bela Ban
> Fix For: 3.4.6, 3.5
>
>
> When we have a Table with {{low=40, hd=40, hr=45}} and receive a {{purge(30,true)}}, then the table will be {{low=30,hd=30,hr=45}}.
> This only happens with parameter {{force}} being {{true}}.
> This doesn't cause any bugs, but until the next (correct) {{purge()}} is invoked, the table will show and incorrect number of missing messages.
> SOLUTION: add the check to the start of {{purge()}}:
> {code}
> if(seqno <= low) // perhaps check for force as well
> return;
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
11 years, 10 months
[JBoss JIRA] (DROOLS-579) Wrong doc for RuleRuntime.getQueryResults - throwing RuntimeException instead of empty results
by Matteo Mortari (JIRA)
[ https://issues.jboss.org/browse/DROOLS-579?page=com.atlassian.jira.plugin... ]
Matteo Mortari updated DROOLS-579:
----------------------------------
Attachment: 20140826.drools6test-missingquery.zip
attaching reproducer / code example as per JIRA record description.
> Wrong doc for RuleRuntime.getQueryResults - throwing RuntimeException instead of empty results
> ----------------------------------------------------------------------------------------------
>
> Key: DROOLS-579
> URL: https://issues.jboss.org/browse/DROOLS-579
> Project: Drools
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Affects Versions: 6.1.0.Final
> Reporter: Matteo Mortari
> Assignee: Mark Proctor
> Attachments: 20140826.drools6test-missingquery.zip
>
>
> The [javadoc|http://docs.jboss.org/drools/release/6.1.0.Final/kie-api-javadoc/..., java.lang.Object...)] for public api {{RuleRuntime.getQueryResults}} mentions: _If the query does not exist or no results match the query it is empty_ ; however if query does not exist, actually RuntimeException is thrown instead. Details follows. I'm reporting this as I assume this will become even more relevant for the execution server, ref 2nd test below.
> h5. Proposals
> My proposals are that either:
> * javadoc shall be at least corrected - I know there is no obligation to document unchecked exceptions, but [here the doc is explicitly saying something different|http://docs.jboss.org/drools/release/6.1.0.Final/kie-api-javado..., java.lang.Object...)] . I will attach pull request accordingly.
> * the public api method shall reflect the doc and {{QueryResult}} returned should resemble Java 8's Optional then - if I understood some good api design styles to mitigate this scenario from Mario, instead of throwing the RuntimeException, the {{QueryResult}} returned could stand in place of Java 8's Optional. Without dependency on Java 8 API, the {{QueryResult}} in case 'query does not exist' could be empty, to guarantee retro-compatibility, and have specific methods to distinguish root cause of being empty between query-not-found or no-results-match-criteria.
> ... or possibly ack the former option for the time being, and welcome the latter option as a suggestion for enhancement on the new releases, please? Thanks
> h5. Details
> If you consider the following code
> {code}
> @Test
> public void missingQueryViaApi() {
> String drl =
> "query \"my query A\"\n" +
> " $r : String()\n" +
> "end";
>
> KieHelper helper = new KieHelper();
> helper.addContent( drl, ResourceType.DRL );
> KieSession ksession = helper.build().newKieSession();
>
> // If ... no results match the query it is empty
> QueryResults validQueryNameResults = ksession.getQueryResults("my query A");
> assertNotNull("The query exists so result should NOT be null", validQueryNameResults);
> assertEquals("The query exists and result should be empty", 0, validQueryNameResults.size());
>
> // If the query does not exist ... it is empty
> boolean hasThrownRTE = false;
> try {
> ksession.getQueryResults("an non-existent query");
> } catch (RuntimeException e) {
> hasThrownRTE = true;
> }
> assertFalse("Should not throw RTE, should be sort-of 'empty' by doc", hasThrownRTE);
> }
> {code}
> The test fails on the last assert, as accordingly to [javadoc|http://docs.jboss.org/drools/release/6.1.0.Final/kie-api-javadoc/..., java.lang.Object...)], but instead it actually throws the RuntimeException.
> This becomes even more of an issue if you consider invoking via Commands:
> {code}
> @Test
> public void missingQueryViaCommands() {
> String drl =
> "query \"my query A\"\n" +
> " $r : String()\n" +
> "end";
>
> String someText = "This is some text";
>
> KieHelper helper = new KieHelper();
> helper.addContent( drl, ResourceType.DRL );
> KieSession ksession = helper.build().newKieSession();
> List<Command<?>> cmds = new ArrayList<Command<?>>();
> cmds.add( CommandFactory.newInsert( someText ));
> cmds.add( CommandFactory.newQuery( "results A", "my query A" ));
> cmds.add( CommandFactory.newQuery( "results NE", "an non-existent query" ));
>
> ExecutionResults results = ksession.execute( CommandFactory.newBatchExecution( cmds ) );
>
> QueryResults queryResults = ( QueryResults ) results.getValue( "results A" );
> assertEquals(someText, queryResults.iterator().next().get("$r") );
> }
> {code}
> The test fails on the {{ksession.execute()}} and that's why I wanted to report this I spotted, because I'm afraid might have more deep implications for the drools execution server.
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
11 years, 10 months
[JBoss JIRA] (DROOLS-579) Wrong doc for RuleRuntime.getQueryResults - throwing RuntimeException instead of empty results
by Matteo Mortari (JIRA)
Matteo Mortari created DROOLS-579:
-------------------------------------
Summary: Wrong doc for RuleRuntime.getQueryResults - throwing RuntimeException instead of empty results
Key: DROOLS-579
URL: https://issues.jboss.org/browse/DROOLS-579
Project: Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Affects Versions: 6.1.0.Final
Reporter: Matteo Mortari
Assignee: Mark Proctor
The [javadoc|http://docs.jboss.org/drools/release/6.1.0.Final/kie-api-javadoc/..., java.lang.Object...)] for public api {{RuleRuntime.getQueryResults}} mentions: _If the query does not exist or no results match the query it is empty_ ; however if query does not exist, actually RuntimeException is thrown instead. Details follows. I'm reporting this as I assume this will become even more relevant for the execution server, ref 2nd test below.
h5. Proposals
My proposals are that either:
* javadoc shall be at least corrected - I know there is no obligation to document unchecked exceptions, but [here the doc is explicitly saying something different|http://docs.jboss.org/drools/release/6.1.0.Final/kie-api-javado..., java.lang.Object...)] . I will attach pull request accordingly.
* the public api method shall reflect the doc and {{QueryResult}} returned should resemble Java 8's Optional then - if I understood some good api design styles to mitigate this scenario from Mario, instead of throwing the RuntimeException, the {{QueryResult}} returned could stand in place of Java 8's Optional. Without dependency on Java 8 API, the {{QueryResult}} in case 'query does not exist' could be empty, to guarantee retro-compatibility, and have specific methods to distinguish root cause of being empty between query-not-found or no-results-match-criteria.
... or possibly ack the former option for the time being, and welcome the latter option as a suggestion for enhancement on the new releases, please? Thanks
h5. Details
If you consider the following code
{code}
@Test
public void missingQueryViaApi() {
String drl =
"query \"my query A\"\n" +
" $r : String()\n" +
"end";
KieHelper helper = new KieHelper();
helper.addContent( drl, ResourceType.DRL );
KieSession ksession = helper.build().newKieSession();
// If ... no results match the query it is empty
QueryResults validQueryNameResults = ksession.getQueryResults("my query A");
assertNotNull("The query exists so result should NOT be null", validQueryNameResults);
assertEquals("The query exists and result should be empty", 0, validQueryNameResults.size());
// If the query does not exist ... it is empty
boolean hasThrownRTE = false;
try {
ksession.getQueryResults("an non-existent query");
} catch (RuntimeException e) {
hasThrownRTE = true;
}
assertFalse("Should not throw RTE, should be sort-of 'empty' by doc", hasThrownRTE);
}
{code}
The test fails on the last assert, as accordingly to [javadoc|http://docs.jboss.org/drools/release/6.1.0.Final/kie-api-javadoc/..., java.lang.Object...)], but instead it actually throws the RuntimeException.
This becomes even more of an issue if you consider invoking via Commands:
{code}
@Test
public void missingQueryViaCommands() {
String drl =
"query \"my query A\"\n" +
" $r : String()\n" +
"end";
String someText = "This is some text";
KieHelper helper = new KieHelper();
helper.addContent( drl, ResourceType.DRL );
KieSession ksession = helper.build().newKieSession();
List<Command<?>> cmds = new ArrayList<Command<?>>();
cmds.add( CommandFactory.newInsert( someText ));
cmds.add( CommandFactory.newQuery( "results A", "my query A" ));
cmds.add( CommandFactory.newQuery( "results NE", "an non-existent query" ));
ExecutionResults results = ksession.execute( CommandFactory.newBatchExecution( cmds ) );
QueryResults queryResults = ( QueryResults ) results.getValue( "results A" );
assertEquals(someText, queryResults.iterator().next().get("$r") );
}
{code}
The test fails on the {{ksession.execute()}} and that's why I wanted to report this I spotted, because I'm afraid might have more deep implications for the drools execution server.
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
11 years, 10 months