[JBoss JIRA] (WFLY-11956) @PostConstruct on @ApplicationScoped bean called too late in case @Valid is annotated on a business method
by Joerg Baesner (Jira)
[ https://issues.jboss.org/browse/WFLY-11956?page=com.atlassian.jira.plugin... ]
Joerg Baesner commented on WFLY-11956:
--------------------------------------
Thanks Christian for confirming this to be a valid workaround, but it is not viable for you. Anyhow it is a bug calling the business method before the @PostConstruct
> @PostConstruct on @ApplicationScoped bean called too late in case @Valid is annotated on a business method
> ----------------------------------------------------------------------------------------------------------
>
> Key: WFLY-11956
> URL: https://issues.jboss.org/browse/WFLY-11956
> Project: WildFly
> Issue Type: Bug
> Components: Bean Validation, REST
> Affects Versions: 16.0.0.Final
> Reporter: Joerg Baesner
> Assignee: Ronald Sigal
> Priority: Major
> Attachments: logging.txt, playground.zip
>
>
> Having a bean class with {{@ApplicationScoped}}, which has a {{@PostConstruct}} and is implementing the following _Interface_:
> {code}
> @Path("/validated")
> public interface ValidatedJaxRsInterface {
>
> @GET
> @Valid
> @Produces(MediaType.APPLICATION_JSON)
> GreetingModel getHelloGreeting();
> }
> {code}
> will result in calling the {{getHelloGreeting}} method of the implementation class twice *_before_* the {{@PostConstruct}} is getting executed.
> This can be reproduced with the attached reproducer application...
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
7 years, 3 months
[JBoss JIRA] (WFLY-11975) Distributed web session metadata payload contains unnecessary nanosecond precision
by Paul Ferraro (Jira)
Paul Ferraro created WFLY-11975:
-----------------------------------
Summary: Distributed web session metadata payload contains unnecessary nanosecond precision
Key: WFLY-11975
URL: https://issues.jboss.org/browse/WFLY-11975
Project: WildFly
Issue Type: Bug
Components: Clustering
Affects Versions: 16.0.0.Final
Reporter: Paul Ferraro
Assignee: Paul Ferraro
The creation timestamp of a distributed web session is represented by a java.time.Instant. The externalizer for an Instant marshals an integer containing the nanosecond precision, which is unnecessary, as the HttpSession API only requires millisecond precision.
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
7 years, 3 months
[JBoss JIRA] (WFLY-11970) SFSB memory leak due to Date() usage
by Paul Ferraro (Jira)
[ https://issues.jboss.org/browse/WFLY-11970?page=com.atlassian.jira.plugin... ]
Paul Ferraro commented on WFLY-11970:
-------------------------------------
{quote}I was assuming the use of Date().getTime() and System.currentTimeMillis() was so that the lastAccessed timestamp would be valid on failover on a different system{quote}
Yeah, nevermind. We can't use System.nanoTime() for lastAccessedTime, since different members can have different origin times.
> SFSB memory leak due to Date() usage
> ------------------------------------
>
> Key: WFLY-11970
> URL: https://issues.jboss.org/browse/WFLY-11970
> Project: WildFly
> Issue Type: Bug
> Components: EJB
> Affects Versions: 11.0.0.Final
> Reporter: Dennis Reed
> Assignee: Paul Ferraro
> Priority: Critical
>
> SFSB tracks expiration with "new Date().getTime()" and "System.currentTimeMillis()".
> But the expiration threads are scheduled (inside JDK classes) with System.nanoTime().
> If the expiration task runs before the bean is considered expired, the expiration check fails and the bean is never expired.
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
7 years, 3 months
[JBoss JIRA] (WFLY-11956) @PostConstruct on @ApplicationScoped bean called too late in case @Valid is annotated on a business method
by Christian Zambrano (Jira)
[ https://issues.jboss.org/browse/WFLY-11956?page=com.atlassian.jira.plugin... ]
Christian Zambrano edited comment on WFLY-11956 at 4/11/19 3:37 PM:
--------------------------------------------------------------------
Hi,
I am the person that reported the issue. When I opened the case with Redhat support, I did indicate that changing the name solved the issue but that is not a viable workaround because we have hundreds of rest endpoints methods that start with get.
Here are all the experiments I went through and the results:
Here are all the experiments I went through to try to understand this behavior:
1. Made the bean @ApplicationScope => Exhibits the behavior explained above
2. Made the bean @Stateless => Exhibits the behavior explained above
3. Made the bean @Singleton(from the ejb package) => Exhibits the behavior explained above
4. Made the bean @Singleton @Startup => Method is only called once and after the postconstruct as expected but the return value is not validated
5. Renamed the method to not start with 'get' => Method is only called once and after the postconstruct as expected
was (Author: christian.zambrano):
Hi,
I am the person that reported the issue. When I opened the case with Redhat support, I did indicate that changing the name solved the issue but that is not a viable workaround because we have hundreds of rest endpoints methods that start with get.
Here are all the experiements I went through and the results:
Here are all the experiments I went through to try to understand this behavior:
1. Made the bean @ApplicationScope => Exhibits the behavior explained above
2. Made the bean @Stateless => Exhibits the behavior explained above
3. Made the bean @Singleton(from the ejb package) => Exhibits the behavior explained above
4. Made the bean @Singleton @Startup => Method is only called once and after the postconstruct as expected but the return value is not validated
5. Renamed the method to not start with 'get' => Method is only called once and after the postconstruct as expected
> @PostConstruct on @ApplicationScoped bean called too late in case @Valid is annotated on a business method
> ----------------------------------------------------------------------------------------------------------
>
> Key: WFLY-11956
> URL: https://issues.jboss.org/browse/WFLY-11956
> Project: WildFly
> Issue Type: Bug
> Components: Bean Validation, REST
> Affects Versions: 16.0.0.Final
> Reporter: Joerg Baesner
> Assignee: Ronald Sigal
> Priority: Major
> Attachments: logging.txt, playground.zip
>
>
> Having a bean class with {{@ApplicationScoped}}, which has a {{@PostConstruct}} and is implementing the following _Interface_:
> {code}
> @Path("/validated")
> public interface ValidatedJaxRsInterface {
>
> @GET
> @Valid
> @Produces(MediaType.APPLICATION_JSON)
> GreetingModel getHelloGreeting();
> }
> {code}
> will result in calling the {{getHelloGreeting}} method of the implementation class twice *_before_* the {{@PostConstruct}} is getting executed.
> This can be reproduced with the attached reproducer application...
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
7 years, 3 months
[JBoss JIRA] (WFLY-11956) @PostConstruct on @ApplicationScoped bean called too late in case @Valid is annotated on a business method
by Christian Zambrano (Jira)
[ https://issues.jboss.org/browse/WFLY-11956?page=com.atlassian.jira.plugin... ]
Christian Zambrano edited comment on WFLY-11956 at 4/11/19 3:37 PM:
--------------------------------------------------------------------
Hi,
I am the person that reported the issue. When I opened the case with Redhat support, I did indicate that changing the name solved the issue but that is not a viable workaround because we have hundreds of rest endpoints methods that start with get.
Here are all the experiements I went through and the results:
Here are all the experiments I went through to try to understand this behavior:
1. Made the bean @ApplicationScope => Exhibits the behavior explained above
2. Made the bean @Stateless => Exhibits the behavior explained above
3. Made the bean @Singleton(from the ejb package) => Exhibits the behavior explained above
4. Made the bean @Singleton @Startup => Method is only called once and after the postconstruct as expected but the return value is not validated
5. Renamed the method to not start with 'get' => Method is only called once and after the postconstruct as expected
was (Author: christian.zambrano):
Hi,
I am the person that reported the issue. When I opened the case with Redhat support, I did indicate that changing the name solved the issue but that is not a viable workaround because we have hundreds of rest endpoints that start with get.
Here are all the experiements I went through and the results:
Here are all the experiments I went through to try to understand this behavior:
1. Made the bean @ApplicationScope => Exhibits the behavior explained above
2. Made the bean @Stateless => Exhibits the behavior explained above
3. Made the bean @Singleton(from the ejb package) => Exhibits the behavior explained above
4. Made the bean @Singleton @Startup => Method is only called once and after the postconstruct as expected but the return value is not validated
5. Renamed the method to not start with 'get' => Method is only called once and after the postconstruct as expected
> @PostConstruct on @ApplicationScoped bean called too late in case @Valid is annotated on a business method
> ----------------------------------------------------------------------------------------------------------
>
> Key: WFLY-11956
> URL: https://issues.jboss.org/browse/WFLY-11956
> Project: WildFly
> Issue Type: Bug
> Components: Bean Validation, REST
> Affects Versions: 16.0.0.Final
> Reporter: Joerg Baesner
> Assignee: Ronald Sigal
> Priority: Major
> Attachments: logging.txt, playground.zip
>
>
> Having a bean class with {{@ApplicationScoped}}, which has a {{@PostConstruct}} and is implementing the following _Interface_:
> {code}
> @Path("/validated")
> public interface ValidatedJaxRsInterface {
>
> @GET
> @Valid
> @Produces(MediaType.APPLICATION_JSON)
> GreetingModel getHelloGreeting();
> }
> {code}
> will result in calling the {{getHelloGreeting}} method of the implementation class twice *_before_* the {{@PostConstruct}} is getting executed.
> This can be reproduced with the attached reproducer application...
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
7 years, 3 months