Can this Java singleton get rebuilt repeatedly in WebSphere 6?

后端 未结 10 950
清酒与你
清酒与你 2021-02-13 13:26

I\'m trying to track down an issue in our system and the following code worries me. The following occurs in our doPost() method in the primary servlet (names have been changed

10条回答
  •  鱼传尺愫
    2021-02-13 13:41

    No it won't get built over and over again. It's static, so it'll only be constructed once, right when the class is touched for the first time by the Classloader.

    Only exception - if you happen to have multiple Classloaders.

    (from GeekAndPoke):

    alt text

提交回复
热议问题