Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8023310

Thread contention in the method Beans.IsDesignTime()

    XMLWordPrintable

Details

    • 7
    • b110

    Backports

      Description

        A recent change to Beans.IsDesignTime() in JDK7 result in threads being blocked on java.beans.ThreadGroupContext.getContext().

        "[ACTIVE] ExecuteThread: '222' for queue: 'weblogic.kernel.Default
        (self-tuning)'" daemon prio=10 tid=0x00002aaac9ad5000 nid=0x52d9 waiting for
        monitor entry [0x000000006cd09000]
           java.lang.Thread.State: BLOCKED (on object monitor)
                at
        java.beans.ThreadGroupContext.getContext(ThreadGroupContext.java:55)
                - waiting to lock <0x0000000745c75ab8> (a java.beans.WeakIdentityMap)
                at java.beans.Beans.isDesignTime(Beans.java:393)
                at
        oracle.adfinternal.controller.application.AdfcPageFlowScopeProvider.getPageFlo
        wScope(AdfcPageFlowScopeProvider.java:68)
                at
        org.apache.myfaces.trinidadinternal.context.RequestContextImpl.getPageFlowScop
        e(RequestContextImpl.java:124)
                at
        org.apache.myfaces.trinidadinternal.el.TrinidadELResolver.getValue(TrinidadELR
        esolver.java:71)
                at
        com.sun.faces.el.DemuxCompositeELResolver._getValue(DemuxCompositeELResolver.j
        ava:176)
                at
        com.sun.faces.el.DemuxCompositeELResolver.getValue(DemuxCompositeELResolver.ja
        va:203)
        ...

        This is because the design-time state instead of being application global is now a thread group local variable which is synchronized and result in an increase of thread contention.

        The isDesignTime method is called all over the place in ADF run time to distinguish between a call from the page designer in JDeveloper and the weblogic app server. The way this method is implemented in JDK7 is not going to work for ADF and I imagine it might be a problem for other product too.

        JDeveloper contact: charles.gayraud@oracle.com

        Attachments

          Issue Links

            Activity

              People

                malenkov Sergey Malenkov (Inactive)
                kbronkho Keimpe Bronkhorst (Inactive)
                Votes:
                0 Vote for this issue
                Watchers:
                11 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: