[Red Hat JIRA] (DROOLS-5923) ResourceType does not work
by Mario Fusco (Jira)
[ https://issues.redhat.com/browse/DROOLS-5923?page=com.atlassian.jira.plug... ]
Mario Fusco updated DROOLS-5923:
--------------------------------
Sprint: 2020 Week 52-03 (from Dec 21)
> ResourceType does not work
> --------------------------
>
> Key: DROOLS-5923
> URL: https://issues.redhat.com/browse/DROOLS-5923
> Project: Drools
> Issue Type: Bug
> Reporter: Ruffian Jiang
> Assignee: Mario Fusco
> Priority: Major
>
> I use drools as follow:
> {code:java}
> import org.kie.internal.utils.KieHelper;
> // code placeholder
> public static final ResourceType LOCAL_DRL = ResourceType.addResourceTypeToRegistry("DRL",
> "Drools Rule Language",
> "src/main/resources/com/jiang",
> "drl");
> public KieSession loadForRule2(String drlStr) {
> KieHelper helper = new KieHelper();
> helper.addContent(drlStr, LOCAL_DRL);
> return helper.build().newKieSession();
> }
> {code}
> This param *defaultPath* dose not work, I see that the code is fixed,
>
> {code:java}
> // code placeholder
> private String generateResourceName(ResourceType type) {
> return "src/main/resources/file" + counter++ + "." + type.getDefaultExtension();
> }
> {code}
> I think it should be changed as follows
> {code:java}
> // code placeholder
> private String generateResourceName(ResourceType type) {
> return type.getDefaultPath() + counter++ + "." + type.getDefaultExtension();
> }{code}
> Now,i use another function to temporarily solve
> {code:java}
> // code placeholder
> helper.addContent(drlStr, "/com/jiang/ww.drl");
> {code}
>
>
>
--
This message was sent by Atlassian Jira
(v8.13.1#813001)
3 years, 3 months
[Red Hat JIRA] (WFLY-12375) Server returns 2 JSESSIONID cookies
by Parul Sharma (Jira)
[ https://issues.redhat.com/browse/WFLY-12375?page=com.atlassian.jira.plugi... ]
Parul Sharma closed WFLY-12375.
-------------------------------
Resolution: Cannot Reproduce
> Server returns 2 JSESSIONID cookies
> ------------------------------------
>
> Key: WFLY-12375
> URL: https://issues.redhat.com/browse/WFLY-12375
> Project: WildFly
> Issue Type: Bug
> Components: Web (Undertow)
> Affects Versions: 17.0.1.Final
> Reporter: Nicolas NESMON
> Assignee: Parul Sharma
> Priority: Major
> Labels: COOKIES, JSESSIONID
>
> Please find below the source code of my simplified JAX-RS application:
> {code:java}
> @ApplicationPath("myApp")
> public class Application extends javax.ws.rs.core.Application {
> public Application() {
> }
> @Override
> public Set<Object> getSingletons() {
> return Collections.singleton(new HelloWorldResource());
> }
> }
> {code}
> {code:java}
> @Path("/")
> @Produces(MediaType.TEXT_PLAIN)
> public class HelloWorldResource {
> @Context
> private HttpServletRequest httpServletRequest;
> @GET
> public Response helloWorld() {
> HttpSession session = this.httpServletRequest.getSession(false);
> return Response.ok(session == null ? "Hello world" : "Bye bye world")
> .cookie(new NewCookie("JSESSIONID", "id", "demo", null, null, -1, false)).build();
> }
> }
> {code}
> When deploying this application in WF 17.0.1.Final and running following request:
> {noformat}
> GET http://localhost:8080/demo/myApp/
> Host: localhost:8080
> User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:68.0) Gecko/20100101 Firefox/68.0
> Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
> Accept-Language: fr,fr-FR;q=0.8,en-US;q=0.5,en;q=0.3
> Accept-Encoding: gzip, deflate
> Connection: keep-alive
> Upgrade-Insecure-Requests: 1
> Pragma: no-cache
> Cache-Control: no-cache
> Cookie: JSESSIONID=Hello => without this cookie, I only get the cookie I created.
> {noformat}
> I get following response
> {noformat}
> HTTP/1.1 200 OK
> Connection: keep-alive
> Set-Cookie: JSESSIONID=id;Version=1;Path=/demo
> Set-Cookie: JSESSIONID=hello.vpi070236; path=/demo
> Content-Type: text/plain;charset=UTF-8
> Content-Length: 11
> Date: Tue, 13 Aug 2019 23:28:15 GMT
> {noformat}
> As you may notice, there are 2 JSESSIONID cookies in the response:
> * The one I was expecting with "id" value since I created it.
> * Another one created by the server even if I did not ask for it since in my code I don't create no HTTP session. And by the way this JSESSIONID cookie is created but there no server side session created...weird
> Any idea why this second JSESSIONID cookies is created by the server ?
> Since my real application don't use HTTP session at all the workaround I found is to set session tracking mode to URL:
> {noformat}
> <web-app>
> <session-config>
> <tracking-mode>URL</tracking-mode>
> </session-config>
> </web-app>
> {noformat}
> Thanks
--
This message was sent by Atlassian Jira
(v8.13.1#813001)
3 years, 3 months
[Red Hat JIRA] (DROOLS-5923) ResourceType does not work
by Ruffian Jiang (Jira)
Ruffian Jiang created DROOLS-5923:
-------------------------------------
Summary: ResourceType does not work
Key: DROOLS-5923
URL: https://issues.redhat.com/browse/DROOLS-5923
Project: Drools
Issue Type: Bug
Reporter: Ruffian Jiang
Assignee: Mario Fusco
I use drools as follow:
{code:java}
import org.kie.internal.utils.KieHelper;
// code placeholder
public static final ResourceType LOCAL_DRL = ResourceType.addResourceTypeToRegistry("DRL",
"Drools Rule Language",
"src/main/resources/com/jiang",
"drl");
public KieSession loadForRule2(String drlStr) {
KieHelper helper = new KieHelper();
helper.addContent(drlStr, LOCAL_DRL);
return helper.build().newKieSession();
}
{code}
This param *defaultPath* dose not work, I see that the code is fixed,
{code:java}
// code placeholder
private String generateResourceName(ResourceType type) {
return "src/main/resources/file" + counter++ + "." + type.getDefaultExtension();
}
{code}
I think it should be changed as follows
{code:java}
// code placeholder
private String generateResourceName(ResourceType type) {
return type.getDefaultPath() + counter++ + "." + type.getDefaultExtension();
}{code}
Now,i use another function to temporarily solve
{code:java}
// code placeholder
helper.addContent(drlStr, "/com/jiang/ww.drl");
{code}
--
This message was sent by Atlassian Jira
(v8.13.1#813001)
3 years, 3 months
[Red Hat JIRA] (WFLY-14256) Clean up set of installations provisioned in testsuite/layers when -Dts.ee9 is used
by Brian Stansberry (Jira)
Brian Stansberry created WFLY-14256:
---------------------------------------
Summary: Clean up set of installations provisioned in testsuite/layers when -Dts.ee9 is used
Key: WFLY-14256
URL: https://issues.redhat.com/browse/WFLY-14256
Project: WildFly
Issue Type: Task
Components: Build System, Test Suite
Reporter: Brian Stansberry
The testsuite/layers pom uses the provisioning.phase.preview.excluded property to disable some provisioning executions when -Dts.ee9 is used. Basically it should disable all that require the wildfly-servlet feature pack (as they are off-topic) and all that require the test-feature-pack (as it's not based on wildfly-preview.). There are a few cases where this isn't handled correctly; fix them.
--
This message was sent by Atlassian Jira
(v8.13.1#813001)
3 years, 3 months
[Red Hat JIRA] (WFLY-14256) Clean up set of installations provisioned in testsuite/layers when -Dts.ee9 is used
by Brian Stansberry (Jira)
[ https://issues.redhat.com/browse/WFLY-14256?page=com.atlassian.jira.plugi... ]
Brian Stansberry reassigned WFLY-14256:
---------------------------------------
Assignee: Brian Stansberry
> Clean up set of installations provisioned in testsuite/layers when -Dts.ee9 is used
> -----------------------------------------------------------------------------------
>
> Key: WFLY-14256
> URL: https://issues.redhat.com/browse/WFLY-14256
> Project: WildFly
> Issue Type: Task
> Components: Build System, Test Suite
> Reporter: Brian Stansberry
> Assignee: Brian Stansberry
> Priority: Minor
>
> The testsuite/layers pom uses the provisioning.phase.preview.excluded property to disable some provisioning executions when -Dts.ee9 is used. Basically it should disable all that require the wildfly-servlet feature pack (as they are off-topic) and all that require the test-feature-pack (as it's not based on wildfly-preview.). There are a few cases where this isn't handled correctly; fix them.
--
This message was sent by Atlassian Jira
(v8.13.1#813001)
3 years, 3 months