[JBoss JIRA] (WFWIP-312) [EAP7-1386] servletContext and servletConfig in config provider names are always null
by Petr Kremensky (Jira)
[ https://issues.redhat.com/browse/WFWIP-312?page=com.atlassian.jira.plugin... ]
Petr Kremensky updated WFWIP-312:
---------------------------------
Attachment: source-names.war
> [EAP7-1386] servletContext and servletConfig in config provider names are always null
> -------------------------------------------------------------------------------------
>
> Key: WFWIP-312
> URL: https://issues.redhat.com/browse/WFWIP-312
> Project: WildFly WIP
> Issue Type: Quality Risk
> Reporter: Petr Kremensky
> Assignee: Ronald Sigal
> Priority: Major
> Attachments: source-names.war
>
>
> I've noticed that names of additional config sources provided by EAP7-1386 are always:
> {noformat}
> null:null:ServletConfigSource
> null:null:FilterConfigSource
> null:ServletContextConfigSource
> {noformat}
> I've tried to enhance the https://www.geeksforgeeks.org/difference-between-servletconfig-and-servle... example with MP config, to get the different names
> Servlet additions:
> {code:java}
> System.out.println("-------------------------------------");
> System.out.println("Servlet context name: " + getServletContext().getServletContextName());
> System.out.println("Servlet virtual server name: " + getServletContext().getVirtualServerName());
> System.out.println("Servlet name from servlet config: " + getServletConfig().getServletName());
> System.out.println("Servlet name: " + getServletName());
> System.out.println("Servlet info: " + getServletInfo());
> ConfigProvider.getConfig().getConfigSources().forEach(configSource -> {
> System.out.println("=================================");
> System.out.println(configSource.getName());
> System.out.println(configSource.getOrdinal());
> System.out.println("Property names: " + configSource.getPropertyNames().stream().collect(Collectors.joining(", ")));
> });
> System.out.println("-------------------------------------");
> {code}
> web.xml addition
> {code:xml}
> <web-app>
> + <display-name>test</display-name>
> ...
> {code}
> server output:
> {noformat}
> -------------------------------------
> Servlet context name: test
> Servlet virtual server name: default-host
> Servlet name from servlet config: recruiter
> Servlet name: recruiter
> Servlet info:
> =================================
> SysPropConfigSource
> 400
> Property names: [Standalone], awt.toolkit, java.specification.version ...
> =================================
> EnvConfigSource
> 300
> Property names: PATH, ...
> =================================
> null:null:ServletConfigSource
> 60
> Property names:
> =================================
> null:null:FilterConfigSource
> 50
> Property names:
> =================================
> null:ServletContextConfigSource
> 40
> Property names:
> -------------------------------------
> {noformat}
> Looking into sources https://github.com/resteasy/Resteasy/pull/2250/files#diff-c4301c90ec39134...
> {code:java}
> @Override
> public String getName() {
> if (name == null) {
> synchronized(this) {
> if (name == null) {
> ServletContext servletContext = ResteasyProviderFactory.getContextData(ServletContext.class);
> ServletConfig servletConfig = ResteasyProviderFactory.getContextData(ServletConfig.class);
> StringBuilder sb = new StringBuilder();
> name = sb.append(servletContext != null ? servletContext.getServletContextName() : null).append(":")
> .append(servletConfig != null ? servletConfig.getServletName() : null)
> .append(":ServletConfigSource").toString();
> }
> }
> }
> return name;
> }
> {code}
> My simple-minded expectation would be that the config sources will use the fields provided in the name.
> I'll add sources in a minute...
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
6 years
[JBoss JIRA] (WFWIP-312) [EAP7-1386] servletContext and servletConfig in config provider names are always null
by Petr Kremensky (Jira)
Petr Kremensky created WFWIP-312:
------------------------------------
Summary: [EAP7-1386] servletContext and servletConfig in config provider names are always null
Key: WFWIP-312
URL: https://issues.redhat.com/browse/WFWIP-312
Project: WildFly WIP
Issue Type: Quality Risk
Reporter: Petr Kremensky
Assignee: Ronald Sigal
I've noticed that names of additional config sources provided by EAP7-1386 are always:
{noformat}
null:null:ServletConfigSource
null:null:FilterConfigSource
null:ServletContextConfigSource
{noformat}
I've tried to enhance the https://www.geeksforgeeks.org/difference-between-servletconfig-and-servle... example with MP config, to get the different names
Servlet additions:
{code:java}
System.out.println("-------------------------------------");
System.out.println("Servlet context name: " + getServletContext().getServletContextName());
System.out.println("Servlet virtual server name: " + getServletContext().getVirtualServerName());
System.out.println("Servlet name from servlet config: " + getServletConfig().getServletName());
System.out.println("Servlet name: " + getServletName());
System.out.println("Servlet info: " + getServletInfo());
ConfigProvider.getConfig().getConfigSources().forEach(configSource -> {
System.out.println("=================================");
System.out.println(configSource.getName());
System.out.println(configSource.getOrdinal());
System.out.println("Property names: " + configSource.getPropertyNames().stream().collect(Collectors.joining(", ")));
});
System.out.println("-------------------------------------");
{code}
web.xml addition
{code:xml}
<web-app>
+ <display-name>test</display-name>
...
{code}
server output:
{noformat}
-------------------------------------
Servlet context name: test
Servlet virtual server name: default-host
Servlet name from servlet config: recruiter
Servlet name: recruiter
Servlet info:
=================================
SysPropConfigSource
400
Property names: [Standalone], awt.toolkit, java.specification.version ...
=================================
EnvConfigSource
300
Property names: PATH, ...
=================================
null:null:ServletConfigSource
60
Property names:
=================================
null:null:FilterConfigSource
50
Property names:
=================================
null:ServletContextConfigSource
40
Property names:
-------------------------------------
{noformat}
Looking into sources https://github.com/resteasy/Resteasy/pull/2250/files#diff-c4301c90ec39134...
{code:java}
@Override
public String getName() {
if (name == null) {
synchronized(this) {
if (name == null) {
ServletContext servletContext = ResteasyProviderFactory.getContextData(ServletContext.class);
ServletConfig servletConfig = ResteasyProviderFactory.getContextData(ServletConfig.class);
StringBuilder sb = new StringBuilder();
name = sb.append(servletContext != null ? servletContext.getServletContextName() : null).append(":")
.append(servletConfig != null ? servletConfig.getServletName() : null)
.append(":ServletConfigSource").toString();
}
}
}
return name;
}
{code}
My simple-minded expectation would be that the config sources will use the fields provided in the name.
I'll add sources in a minute...
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
6 years
[JBoss JIRA] (DROOLS-5274) Spreadsheet type selector is not necessary
by Jozef Marko (Jira)
Jozef Marko created DROOLS-5274:
-----------------------------------
Summary: Spreadsheet type selector is not necessary
Key: DROOLS-5274
URL: https://issues.redhat.com/browse/DROOLS-5274
Project: Drools
Issue Type: Enhancement
Components: XLS Decision Table Editor
Affects Versions: 7.37.0.Final
Reporter: Jozef Marko
Assignee: Jozef Marko
During XLS/XLSX spreadsheet table creation your needs to say if he is uploading XLS or XLSX file. However that information can be derived from file upload widget. That widget does not allow to submit other file than XLS or XLSX.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
6 years
[JBoss JIRA] (DROOLS-5271) RHS statements ordering changes with modify block in executable model
by Toshiya Kobayashi (Jira)
[ https://issues.redhat.com/browse/DROOLS-5271?page=com.atlassian.jira.plug... ]
Toshiya Kobayashi updated DROOLS-5271:
--------------------------------------
Description:
The order of statements in RHS changes with executable model when modify block is involved.
{code:java}
import org.drools.modelcompiler.domain.Person;global java.util.List list;
rule R when
$p1 : Person(name == "John")
$p2 : Person(name == "Paul")
then
list.add($p1.getAge());
list.add($p2.getAge());
modify($p1) { setAge($p1.getAge()+1) }
list.add($p1.getAge());
list.add($p2.getAge());
modify($p2) { setAge($p2.getAge()+5) }
list.add($p1.getAge());
list.add($p2.getAge());
end
{code}
Below is the generated code.
{code:java}
D.on(var_$p1,
var_$p2,
var_list).execute((org.drools.model.Drools drools, org.drools.modelcompiler.domain.Person $p1, org.drools.modelcompiler.domain.Person $p2, java.util.List list) -> {
{
{
list.add($p1.getAge());
list.add($p2.getAge());
list.add($p1.getAge());
list.add($p2.getAge());
list.add($p1.getAge());
list.add($p2.getAge());
($p1).setAge($p1.getAge() + 1);
drools.update($p1,
mask_$p1);
($p2).setAge($p2.getAge() + 5);
drools.update($p2,
mask_$p2);
}
}
}));
{code}
was:
The order of statements in RHS changes with executable model when modify block is involved. The below rule can tell the difference with standard-drl.
{code:java}
import org.drools.modelcompiler.domain.Person;global java.util.List list;
rule R when
$p1 : Person(name == "John")
$p2 : Person(name == "Paul")
then
list.add($p1.getAge());
list.add($p2.getAge());
modify($p1) { setAge($p1.getAge()+1) }
list.add($p1.getAge());
list.add($p2.getAge());
modify($p2) { setAge($p2.getAge()+5) }
list.add($p1.getAge());
list.add($p2.getAge());
end
{code}
{code:java}
D.on(var_$p1,
var_$p2,
var_list).execute((org.drools.model.Drools drools, org.drools.modelcompiler.domain.Person $p1, org.drools.modelcompiler.domain.Person $p2, java.util.List list) -> {
{
{
list.add($p1.getAge());
list.add($p2.getAge());
list.add($p1.getAge());
list.add($p2.getAge());
list.add($p1.getAge());
list.add($p2.getAge());
($p1).setAge($p1.getAge() + 1);
drools.update($p1,
mask_$p1);
($p2).setAge($p2.getAge() + 5);
drools.update($p2,
mask_$p2);
}
}
}));
{code}
> RHS statements ordering changes with modify block in executable model
> ---------------------------------------------------------------------
>
> Key: DROOLS-5271
> URL: https://issues.redhat.com/browse/DROOLS-5271
> Project: Drools
> Issue Type: Bug
> Components: executable model
> Affects Versions: 7.36.0.Final
> Reporter: Toshiya Kobayashi
> Assignee: Toshiya Kobayashi
> Priority: Major
>
> The order of statements in RHS changes with executable model when modify block is involved.
> {code:java}
> import org.drools.modelcompiler.domain.Person;global java.util.List list;
> rule R when
> $p1 : Person(name == "John")
> $p2 : Person(name == "Paul")
> then
> list.add($p1.getAge());
> list.add($p2.getAge());
> modify($p1) { setAge($p1.getAge()+1) }
> list.add($p1.getAge());
> list.add($p2.getAge());
> modify($p2) { setAge($p2.getAge()+5) }
> list.add($p1.getAge());
> list.add($p2.getAge());
> end
> {code}
> Below is the generated code.
> {code:java}
> D.on(var_$p1,
> var_$p2,
> var_list).execute((org.drools.model.Drools drools, org.drools.modelcompiler.domain.Person $p1, org.drools.modelcompiler.domain.Person $p2, java.util.List list) -> {
> {
> {
> list.add($p1.getAge());
> list.add($p2.getAge());
> list.add($p1.getAge());
> list.add($p2.getAge());
> list.add($p1.getAge());
> list.add($p2.getAge());
> ($p1).setAge($p1.getAge() + 1);
> drools.update($p1,
> mask_$p1);
> ($p2).setAge($p2.getAge() + 5);
> drools.update($p2,
> mask_$p2);
> }
> }
> }));
> {code}
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
6 years
[JBoss JIRA] (DROOLS-5271) RHS statements ordering changes with modify block in executable model
by Toshiya Kobayashi (Jira)
[ https://issues.redhat.com/browse/DROOLS-5271?page=com.atlassian.jira.plug... ]
Toshiya Kobayashi updated DROOLS-5271:
--------------------------------------
Description:
The order of statements in RHS changes with executable model when modify block is involved. The below rule can tell the difference with standard-drl.
{code:java}
import org.drools.modelcompiler.domain.Person;global java.util.List list;
rule R when
$p1 : Person(name == "John")
$p2 : Person(name == "Paul")
then
list.add($p1.getAge());
list.add($p2.getAge());
modify($p1) { setAge($p1.getAge()+1) }
list.add($p1.getAge());
list.add($p2.getAge());
modify($p2) { setAge($p2.getAge()+5) }
list.add($p1.getAge());
list.add($p2.getAge());
end
{code}
{code:java}
D.on(var_$p1,
var_$p2,
var_list).execute((org.drools.model.Drools drools, org.drools.modelcompiler.domain.Person $p1, org.drools.modelcompiler.domain.Person $p2, java.util.List list) -> {
{
{
list.add($p1.getAge());
list.add($p2.getAge());
list.add($p1.getAge());
list.add($p2.getAge());
list.add($p1.getAge());
list.add($p2.getAge());
($p1).setAge($p1.getAge() + 1);
drools.update($p1,
mask_$p1);
($p2).setAge($p2.getAge() + 5);
drools.update($p2,
mask_$p2);
}
}
}));
{code}
was:
The order of statements in RHS changes with executable model when modify block is involved. The below rule can tell the difference with standard-drl.
{noformat}
import org.drools.modelcompiler.domain.Person;global java.util.List list;
rule R when
$p1 : Person(name == "John")
$p2 : Person(name == "Paul")
then
list.add($p1.getAge());
list.add($p2.getAge());
modify($p1) { setAge($p1.getAge()+1) }
list.add($p1.getAge());
list.add($p2.getAge());
modify($p2) { setAge($p2.getAge()+5) }
list.add($p1.getAge());
list.add($p2.getAge());
end
{noformat}
{code:java}
{code}
> RHS statements ordering changes with modify block in executable model
> ---------------------------------------------------------------------
>
> Key: DROOLS-5271
> URL: https://issues.redhat.com/browse/DROOLS-5271
> Project: Drools
> Issue Type: Bug
> Components: executable model
> Affects Versions: 7.36.0.Final
> Reporter: Toshiya Kobayashi
> Assignee: Toshiya Kobayashi
> Priority: Major
>
> The order of statements in RHS changes with executable model when modify block is involved. The below rule can tell the difference with standard-drl.
> {code:java}
> import org.drools.modelcompiler.domain.Person;global java.util.List list;
> rule R when
> $p1 : Person(name == "John")
> $p2 : Person(name == "Paul")
> then
> list.add($p1.getAge());
> list.add($p2.getAge());
> modify($p1) { setAge($p1.getAge()+1) }
> list.add($p1.getAge());
> list.add($p2.getAge());
> modify($p2) { setAge($p2.getAge()+5) }
> list.add($p1.getAge());
> list.add($p2.getAge());
> end
> {code}
> {code:java}
> D.on(var_$p1,
> var_$p2,
> var_list).execute((org.drools.model.Drools drools, org.drools.modelcompiler.domain.Person $p1, org.drools.modelcompiler.domain.Person $p2, java.util.List list) -> {
> {
> {
> list.add($p1.getAge());
> list.add($p2.getAge());
> list.add($p1.getAge());
> list.add($p2.getAge());
> list.add($p1.getAge());
> list.add($p2.getAge());
> ($p1).setAge($p1.getAge() + 1);
> drools.update($p1,
> mask_$p1);
> ($p2).setAge($p2.getAge() + 5);
> drools.update($p2,
> mask_$p2);
> }
> }
> }));
> {code}
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
6 years
[JBoss JIRA] (DROOLS-5271) RHS statements ordering changes with modify block in executable model
by Toshiya Kobayashi (Jira)
[ https://issues.redhat.com/browse/DROOLS-5271?page=com.atlassian.jira.plug... ]
Toshiya Kobayashi updated DROOLS-5271:
--------------------------------------
Description:
The order of statements in RHS changes with executable model when modify block is involved. The below rule can tell the difference with standard-drl.
{noformat}
import org.drools.modelcompiler.domain.Person;global java.util.List list;
rule R when
$p1 : Person(name == "John")
$p2 : Person(name == "Paul")
then
list.add($p1.getAge());
list.add($p2.getAge());
modify($p1) { setAge($p1.getAge()+1) }
list.add($p1.getAge());
list.add($p2.getAge());
modify($p2) { setAge($p2.getAge()+5) }
list.add($p1.getAge());
list.add($p2.getAge());
end
{noformat}
{code:java}
D.on(var_$p1,
var_$p2,
var_list).execute((org.drools.model.Drools drools, org.drools.modelcompiler.domain.Person $p1, org.drools.modelcompiler.domain.Person $p2, java.util.List list) -> {
{
{
list.add($p1.getAge());
list.add($p2.getAge());
list.add($p1.getAge());
list.add($p2.getAge());
list.add($p1.getAge());
list.add($p2.getAge());
($p1).setAge($p1.getAge() + 1);
drools.update($p1,
mask_$p1);
($p2).setAge($p2.getAge() + 5);
drools.update($p2,
mask_$p2);
}
}
}));
{code}
was:
The order of statements in RHS changes with executable model when modify block is involved. The below rule can tell the difference with standard-drl.
{noformat}
import org.drools.modelcompiler.domain.Person;global java.util.List list;
rule R when
$p1 : Person(name == "John")
$p2 : Person(name == "Paul")
then
list.add($p1.getAge());
list.add($p2.getAge());
modify($p1) { setAge($p1.getAge()+1) }
list.add($p1.getAge());
list.add($p2.getAge());
modify($p2) { setAge($p2.getAge()+5) }
list.add($p1.getAge());
list.add($p2.getAge());
end
{noformat}
> RHS statements ordering changes with modify block in executable model
> ---------------------------------------------------------------------
>
> Key: DROOLS-5271
> URL: https://issues.redhat.com/browse/DROOLS-5271
> Project: Drools
> Issue Type: Bug
> Components: executable model
> Affects Versions: 7.36.0.Final
> Reporter: Toshiya Kobayashi
> Assignee: Toshiya Kobayashi
> Priority: Major
>
> The order of statements in RHS changes with executable model when modify block is involved. The below rule can tell the difference with standard-drl.
> {noformat}
> import org.drools.modelcompiler.domain.Person;global java.util.List list;
> rule R when
> $p1 : Person(name == "John")
> $p2 : Person(name == "Paul")
> then
> list.add($p1.getAge());
> list.add($p2.getAge());
> modify($p1) { setAge($p1.getAge()+1) }
> list.add($p1.getAge());
> list.add($p2.getAge());
> modify($p2) { setAge($p2.getAge()+5) }
> list.add($p1.getAge());
> list.add($p2.getAge());
> end
> {noformat}
> {code:java}
> D.on(var_$p1,
> var_$p2,
> var_list).execute((org.drools.model.Drools drools, org.drools.modelcompiler.domain.Person $p1, org.drools.modelcompiler.domain.Person $p2, java.util.List list) -> {
> {
> {
> list.add($p1.getAge());
> list.add($p2.getAge());
> list.add($p1.getAge());
> list.add($p2.getAge());
> list.add($p1.getAge());
> list.add($p2.getAge());
> ($p1).setAge($p1.getAge() + 1);
> drools.update($p1,
> mask_$p1);
> ($p2).setAge($p2.getAge() + 5);
> drools.update($p2,
> mask_$p2);
> }
> }
> }));
> {code}
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
6 years
[JBoss JIRA] (DROOLS-5271) RHS statements ordering changes with modify block in executable model
by Toshiya Kobayashi (Jira)
[ https://issues.redhat.com/browse/DROOLS-5271?page=com.atlassian.jira.plug... ]
Toshiya Kobayashi updated DROOLS-5271:
--------------------------------------
Description:
The order of statements in RHS changes with executable model when modify block is involved. The below rule can tell the difference with standard-drl.
{noformat}
import org.drools.modelcompiler.domain.Person;global java.util.List list;
rule R when
$p1 : Person(name == "John")
$p2 : Person(name == "Paul")
then
list.add($p1.getAge());
list.add($p2.getAge());
modify($p1) { setAge($p1.getAge()+1) }
list.add($p1.getAge());
list.add($p2.getAge());
modify($p2) { setAge($p2.getAge()+5) }
list.add($p1.getAge());
list.add($p2.getAge());
end
{noformat}
{code:java}
{code}
was:
The order of statements in RHS changes with executable model when modify block is involved. The below rule can tell the difference with standard-drl.
{noformat}
import org.drools.modelcompiler.domain.Person;global java.util.List list;
rule R when
$p1 : Person(name == "John")
$p2 : Person(name == "Paul")
then
list.add($p1.getAge());
list.add($p2.getAge());
modify($p1) { setAge($p1.getAge()+1) }
list.add($p1.getAge());
list.add($p2.getAge());
modify($p2) { setAge($p2.getAge()+5) }
list.add($p1.getAge());
list.add($p2.getAge());
end
{noformat}
{code:java}
D.on(var_$p1,
var_$p2,
var_list).execute((org.drools.model.Drools drools, org.drools.modelcompiler.domain.Person $p1, org.drools.modelcompiler.domain.Person $p2, java.util.List list) -> {
{
{
list.add($p1.getAge());
list.add($p2.getAge());
list.add($p1.getAge());
list.add($p2.getAge());
list.add($p1.getAge());
list.add($p2.getAge());
($p1).setAge($p1.getAge() + 1);
drools.update($p1,
mask_$p1);
($p2).setAge($p2.getAge() + 5);
drools.update($p2,
mask_$p2);
}
}
}));
{code}
> RHS statements ordering changes with modify block in executable model
> ---------------------------------------------------------------------
>
> Key: DROOLS-5271
> URL: https://issues.redhat.com/browse/DROOLS-5271
> Project: Drools
> Issue Type: Bug
> Components: executable model
> Affects Versions: 7.36.0.Final
> Reporter: Toshiya Kobayashi
> Assignee: Toshiya Kobayashi
> Priority: Major
>
> The order of statements in RHS changes with executable model when modify block is involved. The below rule can tell the difference with standard-drl.
> {noformat}
> import org.drools.modelcompiler.domain.Person;global java.util.List list;
> rule R when
> $p1 : Person(name == "John")
> $p2 : Person(name == "Paul")
> then
> list.add($p1.getAge());
> list.add($p2.getAge());
> modify($p1) { setAge($p1.getAge()+1) }
> list.add($p1.getAge());
> list.add($p2.getAge());
> modify($p2) { setAge($p2.getAge()+5) }
> list.add($p1.getAge());
> list.add($p2.getAge());
> end
> {noformat}
> {code:java}
> {code}
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
6 years