glassfish
  1. glassfish
  2. GLASSFISH-629

Map local JNDI references to server references during GUI Deployment

    Details

    • Type: Improvement Improvement
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 9.1pe
    • Fix Version/s: not determined
    • Component/s: deployment
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

    • Issuezilla Id:
      629

      Description

      This is an enhancement related to using GUI for deployment, mentioned in the
      blog http://epesh.blog-city.com/glassfish_b45_review.htm.
      GUI should be able to implement this with deployment team support. Here is
      suggestion:

      • Deployment team provides an API which takes in the application/module name and
        location, and return the list of JNDI references and its corresponding type.
      • Based on the list returned, GUI will show the user the corresponding server
        references that can be mapped to. User can select one from the list.
      • Upon finish, GUI will pass the mapped list back to deployment for updating.

      This means gui will need 2 API, one to give it the list of local JNDI
      references, and another to take in the mapped list.

      I am assigning this to 'deployment' and will work with them to design the API.
      Once the API is implemented, this issue can be assigned back to GUI for all the
      UI changes.

        Activity

        Hide
        Anissa Lam added a comment -

        Add gui team to the interested list.

        Show
        Anissa Lam added a comment - Add gui team to the interested list.
        Hide
        Hong Zhang added a comment -

        I'd like to understand this better before I look into the code see if it's
        possible (and how much work it is) to provide these two APIs.

        I will use the ejb references as example. Currently we rely on the runtime
        xml files to do the jndi mapping, and what we want to achieve here is to do this
        mapping through gui.
        Say I have an ejb with ejb name "FooBean" and it has a physical jndi name
        called "ejb/FooBean". And a web component is referencing this ejb using the ref
        name "foo". So in today's implementation:
        1. In the sun-ejb-jar.xml we need to have something like this which maps this
        ejb name to the jndi name:
        <ejb>
        <ejb-name>FooBean</ejb-name>
        <jndi-name>ejb/FooBean</jndi-name>
        </ejb>
        2. And in the sun-web.xml, we need to map the ejb ref name "foo" to the same
        jndi name "ejb/FooBean".
        <ejb-ref>
        <ejb-ref-name>foo</ejb-ref-name>
        <jndi-name>ejb/FooBean</jndi-name>
        <ejb-ref>

        So in your proposal below, we no longer need the information in sun-web.xml.
        The first deployment API will return the ejb reference, with the ref name "foo"
        and type "ejb-ref". And the gui will provide the "ejb/FooBean" for the user to
        select. Once user selects the "ejb/FooBean", the gui will return the mapping
        "foo->ejb/FooBean" through the second deployment API. Then deployment code add
        this information to the runtime.

        Is this understanding correct? If so, I have some questions/comments
        a. How does the gui gets all the physical jndi names (or what you called
        server references), which in this case "ejb/FooBean"? Before the deployment
        happens, there is no name binding happen yet. So you will also need to get this
        from deployment code?
        b. This mapping funtionality that gui is providing is just letting user
        select from the existing jndi names, not to enter new ones, right? If that's the
        case, the original archive still needs to include some of the mapping, in this
        case, the information in the sun-ejb-jar.xml.

        I remember deploytool has some functionality like this, but that happens at
        the packaging time. Doing it at deployment time is much harder, it means round
        trips between deployment code and gui code, and also change of the timing of
        doing things. We will need to parse the deployment descriptors prior to actual
        deployment in order to provide such information to gui. And then need to save
        the information passed back from gui for deployment descriptor post processing.

        Show
        Hong Zhang added a comment - I'd like to understand this better before I look into the code see if it's possible (and how much work it is) to provide these two APIs. I will use the ejb references as example. Currently we rely on the runtime xml files to do the jndi mapping, and what we want to achieve here is to do this mapping through gui. Say I have an ejb with ejb name "FooBean" and it has a physical jndi name called "ejb/FooBean". And a web component is referencing this ejb using the ref name "foo". So in today's implementation: 1. In the sun-ejb-jar.xml we need to have something like this which maps this ejb name to the jndi name: <ejb> <ejb-name>FooBean</ejb-name> <jndi-name>ejb/FooBean</jndi-name> </ejb> 2. And in the sun-web.xml, we need to map the ejb ref name "foo" to the same jndi name "ejb/FooBean". <ejb-ref> <ejb-ref-name>foo</ejb-ref-name> <jndi-name>ejb/FooBean</jndi-name> <ejb-ref> So in your proposal below, we no longer need the information in sun-web.xml. The first deployment API will return the ejb reference, with the ref name "foo" and type "ejb-ref". And the gui will provide the "ejb/FooBean" for the user to select. Once user selects the "ejb/FooBean", the gui will return the mapping "foo->ejb/FooBean" through the second deployment API. Then deployment code add this information to the runtime. Is this understanding correct? If so, I have some questions/comments a. How does the gui gets all the physical jndi names (or what you called server references), which in this case "ejb/FooBean"? Before the deployment happens, there is no name binding happen yet. So you will also need to get this from deployment code? b. This mapping funtionality that gui is providing is just letting user select from the existing jndi names, not to enter new ones, right? If that's the case, the original archive still needs to include some of the mapping, in this case, the information in the sun-ejb-jar.xml. I remember deploytool has some functionality like this, but that happens at the packaging time. Doing it at deployment time is much harder, it means round trips between deployment code and gui code, and also change of the timing of doing things. We will need to parse the deployment descriptors prior to actual deployment in order to provide such information to gui. And then need to save the information passed back from gui for deployment descriptor post processing.
        Hide
        Hong Zhang added a comment -

        Will look into this in v3.

        Show
        Hong Zhang added a comment - Will look into this in v3.
        Hide
        Tom Mueller added a comment -

        Bulk update to change fix version to "not determined" for all issues still open but with a fix version for a released version.

        Show
        Tom Mueller added a comment - Bulk update to change fix version to "not determined" for all issues still open but with a fix version for a released version.

          People

          • Assignee:
            Hong Zhang
            Reporter:
            Anissa Lam
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated: