Search code examples
restjbossearjboss6.x

Deploying .ear file (contains rest services)


I have a few questions about deploying my .ear file (was provided to me, the file itself should not be the problem). I set up jBoss application server jboss-6.0.0.Final and was able to run a simple hello world app to ensure the server was functioning properly.

I was told to place the .ear file in /server/default/deploy so I did. When I ran jboss (through /bin/run.bat) I got no errors related to deploying the ear file.

Question

  1. Is this all the software I need (jBoss)? Do I also need something like Apache or tomcat?
  2. The .ear file contains RESTful service calls that should return xml. Will these be deployed (accessible through a jQuery ajax call after the server (jboss/bin/run.bat) is executed?

Currently when I try to make the calls, the resources do not seem to exist.

Thanks in advance for taking the time to help.


Solution

  • JBoss AS ships with an embedded Tomcat as a servlet container so you really don't need that anymore. Apache Web Server is NOT required for your .EAR to be deployed properly.

    To answer your questions

    1. No other software is needed to deploy the EAR. You simply copy your EAR file to deploy directory (which you have rightfully done so).
    2. If your EAR contains RESTFul services, they will be deployed and you can access them using any client including jQuery or even a simple browsers. The trick is to know the access URL to the RESTFul services.

    If you have difficulty identifying the URL for accessing your RESTFul services please refer [1] for more information.

    Hope this helps.

    Good luck!

    [1] https://docs.jboss.org/author/display/AS7/JAX-RS+Reference+Guide