javaeetutorial
  1. javaeetutorial
  2. JAVAEETUTORIAL-153

Incomplete/incorrect ANT example and explanation.

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Won't Fix
    • Affects Version/s: 6.0.8
    • Fix Version/s: None
    • Component/s: doc
    • Labels:
      None

      Description

      In the EJB Tutorial "cart" project, we find the following passage:

      ------------------

      3. Type the following command:
      ant deploy
      The cart.ear file is deployed to the GlassFish Server.

      4. Type the following command:
      ant run
      This task retrieves the application client JAR, cartClient.jar, and runs the application client. The client JAR, cartClient.jar, contains the application client class, the helper class BookException, and the Cart business interface.

      This task is equivalent to running the following command:

      appclient -client cartClient.jar
      When you run the client, the application client container injects any component references declared in the application client class, in this case the reference to the Cart enterprise bean.

      ------------------

      There are two errors in the above text, afaik:
      1. The text states that: "[the 'ant run'] task is equivalent to running [...] appclient -client cartClient.jar". This is not true. Running
      'appclient -client cartClient.jar'
      does not "retrieve the application client JAR, cartClient.jar,", hence the output will be "Error: Unable to access jarfile appClient.jar"
      2. Even if the user knew to run 'ant client-jar' before the appclient task, the appclient task would need to be
      'appclient -client client-jar\appClient.jar'
      if the user doesn't cd into the client-jar directory beforehand.

      My suggestion would be the following. Modify the text to read:
      "This task is equivalent to running the following command:
      ant client-jar
      appclient -client client-jar\cartClient.jar"

      This will help the user understand what's going on in the background, which was the main point missing for me in this tutorial in the first place. After following through on the cart exercise, my main question was: "How does the client-app know where to find the remote EJB on the glassfish server Unable to render embedded object: File (" Providing the 'ant client-jar' task and maybe explaining what's happening in the background (asadmin ...) would be a great help for anyone interested in how the remote EJB binding works in this example) not found. Hence my improvement suggestion to add this to the next revision of the tutorial.

        Activity

        swiss-chris created issue -
        Ian Evans made changes -
        Field Original Value New Value
        Assignee Ian Evans [ ievans ]
        Hide
        Ian Evans added a comment -

        The text could be clearer about exactly which steps ant run performs.

        This issue affect the Java EE 6 Tutorial. At this point, we don't have any planned updates for the EE 6 Tutorial, and we have moved to Maven for Java EE 7.

        If we have another EE 6 release, this issue should be fixed in the documentation source.

        Show
        Ian Evans added a comment - The text could be clearer about exactly which steps ant run performs. This issue affect the Java EE 6 Tutorial. At this point, we don't have any planned updates for the EE 6 Tutorial, and we have moved to Maven for Java EE 7. If we have another EE 6 release, this issue should be fixed in the documentation source.
        Ian Evans made changes -
        Affects Version/s 6.0.8 [ 15605 ]
        Hide
        Ian Evans added a comment -

        With no planned releases of the Java EE 6 Tutorial planned, and the Java EE 7 Tutorial released (which uses Maven), I'm closing this out.

        Show
        Ian Evans added a comment - With no planned releases of the Java EE 6 Tutorial planned, and the Java EE 7 Tutorial released (which uses Maven), I'm closing this out.
        Ian Evans made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Won't Fix [ 2 ]

          People

          • Assignee:
            Ian Evans
            Reporter:
            swiss-chris
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 5 minutes
              5m
              Remaining:
              Remaining Estimate - 5 minutes
              5m
              Logged:
              Time Spent - Not Specified
              Not Specified