IBM Support

PI48389: @PreDestory method invoked twice when @RequestScoped annotated o n resource class and no @Context field in the class

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • Problem: Trying to use annotation (cgi) on a resource.
    Method
    getting called twice. According to specification that should
    not happen. Conflict between cgi and jax OS resource.
    

Local fix

  • N/A
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED:  All users of IBM WebSphere Application      *
    *                  Server Liberty Profile - JAX-RS 2.0 Web     *
    *                  Services                                    *
    ****************************************************************
    * PROBLEM DESCRIPTION: The @PreDestory method is invoked twice *
    *                      when there is @RequestScoped annotated  *
    *                      on a resource class and no @Context     *
    *                      field in the class                      *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    The web service engine did not recognized the resource class as
    a CDI bean, causing the @PreDestory method to get invoked by
    both CDI and web service.
    

Problem conclusion

  • Updated the replace instance logic for request scoped resources
    to make sure it is recognized as a CDI bean. Then the web
    service engine will not invoke its PreDestory method.
    
    The fix for this APAR is currently targeted for inclusion in fix
    pack 8.5.5.9.  Please refer to the Recommended Updates page for
    delivery information:
    http://www.ibm.com/support/docview.wss?rs=180&uid=swg27004980
    

Temporary fix

  • Adding a @Context field to the resource class will work around
    this problem.
    

Comments

APAR Information

  • APAR number

    PI48389

  • Reported component name

    WAS LIBERTY COR

  • Reported component ID

    5725L2900

  • Reported release

    855

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2015-09-09

  • Closed date

    2015-11-18

  • Last modified date

    2015-11-18

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

Fix information

  • Fixed component name

    WAS LIBERTY COR

  • Fixed component ID

    5725L2900

Applicable component levels

  • R855 PSY

       UP

[{"Business Unit":{"code":"BU053","label":"Cloud \u0026 Data Platform"},"Product":{"code":"SSD28V","label":"WebSphere Application Server Liberty Core"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"855","Line of Business":{"code":"LOB36","label":"IBM Automation"}}]

Document Information

Modified date:
15 October 2021