Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 4.0
    • Fix Version/s: 4.0
    • Component/s: naming
    • Labels:
      None

      Description

      Currently all naming proxies are loaded eagerly. After discussing the issue with Mahesh, I have come up with a patch that enabled lazy loading of naming proxies. Please see the patch attached here. In particular, it does the following:

      • Added a new annotation called NamingObjectForPrefixes. It is annotated as Contract and has an index attribute.
      • NamedNamingObjectProxies use this annotation to describe the naming prefixes handled by them.
      • Changed every existing NamedNamingObjectProxy to be annotated with this new one.
      • Changed NamingManager implementation to select the proxy by looking at the prefix metadata.
      • This allows lazy instantiation of proxies.
      • Changed JTA to register a NamingProxy for UserTransaction in startup service. It registers a proxy that
        replaces itself by actual object. This avoids circular dependency between naming and transaction.

      Pl take a look at the attached naming-patch.txt and let me know your feedback.

        Activity

        Hide
        Sanjeeb Sahoo added a comment -
        • Added a new annotation called NamespacePrefixes. It is annotated as Contract and has an index attribute.
        • NamedNamingObjectProxies use this annotation to describe the naming prefixes handled by them.
        • Changed NamingManager implementation to select the proxy by looking at the prefix metadata.
        • This allows lazy instantiation of proxies.
        • Changed every existing NamedNamingObjectProxy to be annotated with this new one.
        • Changed JTA to register a NamingProxy for UserTransaction in startup service. It registers a proxy that
          replaces itself by actual object. This avoids circular dependency between naming and transaction.

        Revisions:
        ----------
        51145

        Modified Paths:
        ---------------
        trunk/main/appserver/orb/orb-connector/src/main/java/org/glassfish/enterprise/iiop/api/ORBNamingProxy.java
        trunk/main/nucleus/common/glassfish-naming/src/main/java/com/sun/enterprise/naming/impl/NamedNamingObjectManager.java
        trunk/main/appserver/ejb/ejb-container/src/main/java/com/sun/ejb/containers/EJBContextNamingProxy.java
        trunk/main/appserver/transaction/jta/src/main/java/com/sun/enterprise/transaction/TransactionNamingProxy.java
        trunk/main/nucleus/core/kernel/src/main/java/org/glassfish/kernel/bean_validator/BeanValidatorNamingProxy.java
        trunk/main/appserver/common/container-common/src/main/java/com/sun/enterprise/container/common/impl/JavaModuleNamingProxy.java
        trunk/main/appserver/web/weld-integration/src/main/java/org/glassfish/weld/BeanManagerNamingProxy.java
        trunk/main/appserver/ejb/ejb-container/src/main/java/com/sun/ejb/containers/TimerServiceNamingProxy.java
        trunk/main/appserver/ejb/ejb-container/src/main/java/com/sun/ejb/containers/InternalInterceptorBindingNamingProxy.java
        trunk/main/appserver/orb/orb-connector/src/main/java/org/glassfish/enterprise/iiop/api/HandleDelegateNamingProxy.java
        trunk/main/appserver/transaction/internal-api/src/main/java/com/sun/enterprise/transaction/startup/TransactionLifecycleService.java

        Added Paths:
        ------------
        trunk/main/nucleus/common/glassfish-api/src/main/java/org/glassfish/api/naming/NamespacePrefixes.java

        Show
        Sanjeeb Sahoo added a comment - Added a new annotation called NamespacePrefixes. It is annotated as Contract and has an index attribute. NamedNamingObjectProxies use this annotation to describe the naming prefixes handled by them. Changed NamingManager implementation to select the proxy by looking at the prefix metadata. This allows lazy instantiation of proxies. Changed every existing NamedNamingObjectProxy to be annotated with this new one. Changed JTA to register a NamingProxy for UserTransaction in startup service. It registers a proxy that replaces itself by actual object. This avoids circular dependency between naming and transaction. Revisions: ---------- 51145 Modified Paths: --------------- trunk/main/appserver/orb/orb-connector/src/main/java/org/glassfish/enterprise/iiop/api/ORBNamingProxy.java trunk/main/nucleus/common/glassfish-naming/src/main/java/com/sun/enterprise/naming/impl/NamedNamingObjectManager.java trunk/main/appserver/ejb/ejb-container/src/main/java/com/sun/ejb/containers/EJBContextNamingProxy.java trunk/main/appserver/transaction/jta/src/main/java/com/sun/enterprise/transaction/TransactionNamingProxy.java trunk/main/nucleus/core/kernel/src/main/java/org/glassfish/kernel/bean_validator/BeanValidatorNamingProxy.java trunk/main/appserver/common/container-common/src/main/java/com/sun/enterprise/container/common/impl/JavaModuleNamingProxy.java trunk/main/appserver/web/weld-integration/src/main/java/org/glassfish/weld/BeanManagerNamingProxy.java trunk/main/appserver/ejb/ejb-container/src/main/java/com/sun/ejb/containers/TimerServiceNamingProxy.java trunk/main/appserver/ejb/ejb-container/src/main/java/com/sun/ejb/containers/InternalInterceptorBindingNamingProxy.java trunk/main/appserver/orb/orb-connector/src/main/java/org/glassfish/enterprise/iiop/api/HandleDelegateNamingProxy.java trunk/main/appserver/transaction/internal-api/src/main/java/com/sun/enterprise/transaction/startup/TransactionLifecycleService.java Added Paths: ------------ trunk/main/nucleus/common/glassfish-api/src/main/java/org/glassfish/api/naming/NamespacePrefixes.java

          People

          • Assignee:
            Sanjeeb Sahoo
            Reporter:
            Sanjeeb Sahoo
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: