glassfish
  1. glassfish
  2. GLASSFISH-19452

Add support for looking up JNDI resources from java:comp when performing endpoint activation

    Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 4.0_b67_ms7
    • Fix Version/s: 4.0_b77
    • Component/s: ejb_container
    • Labels:
      None

      Description

      This is a request to enhance GlassFish to allow JNDI resources (JMS connection factory and destination objects) to be looked up from java:comp when performing endpoint activation.

      This currently causes an exception to be thrown.

      This functionality is required CONNECTOR_SPEC-4

        Issue Links

          Activity

          Hide
          Jagadish added a comment -

          This is related to making the naming context available during end point
          activation.
          Looking at all the upstream issues :
          http://java.net/jira/browse/JMS_SPEC-55
          http://java.net/jira/browse/JMS_SPEC-54
          http://java.net/jira/browse/EJB_SPEC-43
          http://java.net/jira/browse/EJB_SPEC-42
          http://java.net/jira/browse/MQ-250

          the expectation is that the connectionFactoryJndiName and
          destinationLookup activation-config property values are made available
          via JNDI lookup during end point activation.

          Connector Spec so far has not defined anything about naming context
          availability and is being clarified in the current iteration of the
          specification (Connector 1.7) that naming context can be made available
          during end point activation.

          Connector specification / implementation does not define/do anything
          specific w.r.t the "connectionFactoryJndiName", "destinationLookup"
          activation-config property as these are protocols between MDB Container
          and JMS RA.

          Currently, there is no JNDI naming context setup when MDB Container
          calls connector container to do end point activation.

          Requesting EJB team (Srini) to evaluate making the naming context available before
          calling connector container to setup the end point.
          [Ref : org.glassfish.ejb.mdb.MessageBeanContainer, line 225 that sets up
          the end point by calling "messageBeanClient_.setup(this)" ]

          I would also assume that resources indicated by the "connectionFactoryJndiName" and
          "destinationLookup" activation-config property values would be set as
          part of this, if those resources are defined via the MDB application (eg: @JMSConnectionFactoryDefinition, @JMSDestinationDefinition).

          To clarify this further :

          JMS RA will be doing the lookup of the resources where the
          resource-names are defined in the "activation-spec" configuration
          properties by name "connectionFactoryJndiName" and "destinationLookup".
          So, those resources should be made available in JNDI for JMS RA to
          lookup.

          These resources may be from :
          a) vendor specific resources (eg: create-jms-resource --restype
          Destination jms/foo)
          b) A @JMSDestinationDefinition annotation defined in a component (eg: an
          EJB) of the application that also has the MDB being deployed.

          Show
          Jagadish added a comment - This is related to making the naming context available during end point activation. Looking at all the upstream issues : http://java.net/jira/browse/JMS_SPEC-55 http://java.net/jira/browse/JMS_SPEC-54 http://java.net/jira/browse/EJB_SPEC-43 http://java.net/jira/browse/EJB_SPEC-42 http://java.net/jira/browse/MQ-250 the expectation is that the connectionFactoryJndiName and destinationLookup activation-config property values are made available via JNDI lookup during end point activation. Connector Spec so far has not defined anything about naming context availability and is being clarified in the current iteration of the specification (Connector 1.7) that naming context can be made available during end point activation. Connector specification / implementation does not define/do anything specific w.r.t the "connectionFactoryJndiName", "destinationLookup" activation-config property as these are protocols between MDB Container and JMS RA. Currently, there is no JNDI naming context setup when MDB Container calls connector container to do end point activation. Requesting EJB team (Srini) to evaluate making the naming context available before calling connector container to setup the end point. [Ref : org.glassfish.ejb.mdb.MessageBeanContainer, line 225 that sets up the end point by calling "messageBeanClient_.setup(this)" ] I would also assume that resources indicated by the "connectionFactoryJndiName" and "destinationLookup" activation-config property values would be set as part of this, if those resources are defined via the MDB application (eg: @JMSConnectionFactoryDefinition, @JMSDestinationDefinition). To clarify this further : JMS RA will be doing the lookup of the resources where the resource-names are defined in the "activation-spec" configuration properties by name "connectionFactoryJndiName" and "destinationLookup". So, those resources should be made available in JNDI for JMS RA to lookup. These resources may be from : a) vendor specific resources (eg: create-jms-resource --restype Destination jms/foo) b) A @JMSDestinationDefinition annotation defined in a component (eg: an EJB) of the application that also has the MDB being deployed.
          Hide
          Jagadish added a comment -

          Similar to the availability of naming (component) context during "endpointActivation", it is also required during "endpointDeactivation". While supporting this feature, please consider endpointDeactivation use-case also.

          This was suggested and added sometime last week by the Connectors EG .
          This is reflected in the latest specification submitted to JCP :
          http://java.net/projects/connector-spec/downloads/download/connector-1_7-spec-final-with-change-bars.pdf

          Reference :
          Page 289 :
          "The application server must make the application component environment
          namespace of the endpoint (that is being activated), available to the resource adapter
          during the call to the endpointActivation and endpointDeactivation
          methods. The resource adapter may use this JNDI context to access other resources."

          Show
          Jagadish added a comment - Similar to the availability of naming (component) context during "endpointActivation", it is also required during "endpointDeactivation". While supporting this feature, please consider endpointDeactivation use-case also. This was suggested and added sometime last week by the Connectors EG . This is reflected in the latest specification submitted to JCP : http://java.net/projects/connector-spec/downloads/download/connector-1_7-spec-final-with-change-bars.pdf Reference : Page 289 : "The application server must make the application component environment namespace of the endpoint (that is being activated), available to the resource adapter during the call to the endpointActivation and endpointDeactivation methods. The resource adapter may use this JNDI context to access other resources."
          Hide
          amy.yang added a comment -

          implementation was checked in by r58995

          Show
          amy.yang added a comment - implementation was checked in by r58995
          Hide
          amy.yang added a comment -

          Closing

          Show
          amy.yang added a comment - Closing

            People

            • Assignee:
              amy.yang
              Reporter:
              Nigel Deakin
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: