You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by "Richard Zowalla (Jira)" <ji...@apache.org> on 2023/05/17 19:09:00 UTC
[jira] [Resolved] (TOMEE-2134) @PostConstruct called twice on @javax.inject.Singleton
[ https://issues.apache.org/jira/browse/TOMEE-2134?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Richard Zowalla resolved TOMEE-2134.
------------------------------------
Resolution: Auto Closed
Hi there!
We wanted to reach out and let you know that we're currently working on cleaning up open issues in Jira that specifically impact unsupported versions, including 1.7.x, 7.0.x, and 7.1.x.
If you had previously reported this issue on one of these unsupported versions, we kindly ask you to check if the problem still persists and can be reproduced on a supported version such as 8.0.x or 9.0.x. If you find that it is indeed reproducible on a supported version, you're more than welcome to re-open this issue.
Thanks!
> @PostConstruct called twice on @javax.inject.Singleton
> ------------------------------------------------------
>
> Key: TOMEE-2134
> URL: https://issues.apache.org/jira/browse/TOMEE-2134
> Project: TomEE
> Issue Type: Bug
> Components: TomEE Core Server
> Affects Versions: 7.0.3
> Environment: Linux, JDK 1.8
> Reporter: Paul Carter-Brown
> Priority: Major
>
> Hi,
> Please see GitHub test project at https://github.com/bcluap/double-postconstruct in which a simple singleton is being initialized twice (post construct is called twice). Deploy the ear to TomEE (i'm using 7.0.3) and look at the logs.
> I picked up this issue in a large project with an ear containing many wars packaged as "skinny". The injected bean is in one of the shared libraries.
> If the pom in the ear project is changed to <skinnyWars>false</skinnyWars> and lines 44-48 are removed then the issue goes away and the init is only called once.
> I have verified that there is only once instance of the class as the hashcode remains the same on both init calls.
> Any ideas?
--
This message was sent by Atlassian Jira
(v8.20.10#820010)