Uploaded image for project: 'RESTEasy'
  1. RESTEasy
  2. RESTEASY-593

Doco error for embedded container

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 2.3-beta-1
    • 2.2.2.GA
    • None
    • None

    Description

      Speaking of the TJWS launcher code, I was looking at an old version of the User Guide, and the example in the Embedded Container chapter didn't work, so I did this:

      TJWSEmbeddedJaxrsServer tjws = new TJWSEmbeddedJaxrsServer();
      tjws.setPort(8080);
      tjws.start();
      ResteasyDeployment red = tjws.getDeployment();
      Registry r = red.getRegistry();
      r.addPerRequestResource(RestEasy485Resource.class);

      instead of

      TJWSEmbeddedJaxrsServer tjws = new TJWSEmbeddedJaxrsServer();
      tjws.setPort(8081);
      tjws.getDeployment().getActualResourceClasses().add(MyResource.class);
      tjws.start();

      in the 2.2.1 User Guide. They seem to accomplish the same thing, though the version in the User Guide is a bit simpler.

      Attachments

        Activity

          People

            patriot1burke@gmail.com Bill Burke (Inactive)
            patriot1burke@gmail.com Bill Burke (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: