Are Webservices EARs resp. WARs compatible between different servers (Tomcat, JBoss, WebSphere,...)

Discussion in 'Java' started by Ulf Meinhardt, Jan 25, 2008.

  1. Assume I create a webservice as

    a) Servlet
    or
    b) Session Bean

    I compiled this webservice with standard J2EE.

    Is the resulting EAR resp. WAR compatible with all application servers like

    TomCat, JBoss, Websphere,...

    or do all the application servers (above) required special classes/extensions embedded in the webservice?

    Ulf
    Ulf Meinhardt, Jan 25, 2008
    #1
    1. Advertising

  2. Ulf Meinhardt

    Lew Guest

    Re: Are Webservices EARs resp. WARs compatible between differentservers (Tomcat, JBoss, WebSphere,...) ?

    Ulf Meinhardt wrote:
    > Assume I create a webservice as
    >
    > a) Servlet
    > or
    > b) Session Bean


    Session bean is a particular implementation detail, and not an essential
    aspect of creating a web service.

    > I compiled this webservice with standard J2EE.
    >
    > Is the resulting EAR resp. WAR compatible with all application servers like
    >
    > TomCat, JBoss, Websphere,...


    Yes.

    > or do all the application servers (above) required special classes/extensions
    > embedded in the webservice?


    They most likely do.

    All Java EE containers will comply with the standard. That means they all can
    deploy a properly-constructed WAR (or EAR if they are enterprise-level). It
    is the deployer's responsibility to make sure all libraries needed by the
    application are in the classpath.

    While WARs and EARs are compatible across all relevant platforms, the
    applications they contain will still require some work, sometimes major, to
    make them run in each different environment. The effort is increased if the
    project relies on a container-specific library.

    The old adage applies: In theory, theory and practice are the same, but in
    practice they differ.

    --
    Lew
    Lew, Jan 25, 2008
    #2
    1. Advertising

  3. Re: Are Webservices EARs resp. WARs compatible between differentservers (Tomcat, JBoss, WebSphere,...) ?

    Lew, 25.01.2008 15:26:
    >> Is the resulting EAR resp. WAR compatible with all application servers
    >> like
    >>
    >> TomCat, JBoss, Websphere,...

    >
    > Yes.
    >

    I didn't know that Tomcat supports EAR packages. AFAIK only war (web
    applications) are supported.

    Thomas
    Thomas Kellerer, Jan 25, 2008
    #3
  4. Ulf Meinhardt

    Lew Guest

    Re: Are Webservices EARs resp. WARs compatible between differentservers (Tomcat, JBoss, WebSphere,...) ?

    Thomas Kellerer wrote:
    > Lew, 25.01.2008 15:26:
    >>> Is the resulting EAR resp. WAR compatible with all application
    >>> servers like
    >>>
    >>> TomCat, JBoss, Websphere,...

    >>
    >> Yes.
    >>

    > I didn't know that Tomcat supports EAR packages. AFAIK only war (web
    > applications) are supported.


    A point addressed in the part you didn't quote:
    > (or EAR if they are enterprise-level)


    Also, presumably the OP's "resp." is an abbreviation for "respectively", i.e.,
    they clearly understand the WAR-to-Tomcat, EAR-to-WebSphere thing already.
    The central issue was one of cross-platform compatibility within that
    constraint, of course.

    Be chill, man, we got the point covered.

    --
    Lew
    Lew, Jan 25, 2008
    #4
  5. Re: Are Webservices EARs resp. WARs compatible between differentservers (Tomcat, JBoss, WebSphere,...) ?

    Lew, 25.01.2008 16:09:
    > Thomas Kellerer wrote:
    >> Lew, 25.01.2008 15:26:
    >>>> Is the resulting EAR resp. WAR compatible with all application
    >>>> servers like
    >>>>
    >>>> TomCat, JBoss, Websphere,...
    >>>
    >>> Yes.
    >>>

    >> I didn't know that Tomcat supports EAR packages. AFAIK only war (web
    >> applications) are supported.

    >
    > A point addressed in the part you didn't quote:
    >> (or EAR if they are enterprise-level)

    >
    > Also, presumably the OP's "resp." is an abbreviation for "respectively",
    > i.e., they clearly understand the WAR-to-Tomcat, EAR-to-WebSphere thing
    > already. The central issue was one of cross-platform compatibility
    > within that constraint, of course.
    >
    > Be chill, man, we got the point covered.
    >

    No problem, I just thought I missed something.

    As a coincident I had that discussion this morning and claimed that
    Tomcat will not deploy EAR files and I hoped this had proven me wrong ;)

    Cheers
    Thomas
    Thomas Kellerer, Jan 25, 2008
    #5
  6. Ulf Meinhardt

    EricF Guest

    Re: Are Webservices EARs resp. WARs compatible between differentservers (Tomcat, JBoss, WebSphere,...) ?

    In article <>, Lew <> wrote:
    >Ulf Meinhardt wrote:
    >> Assume I create a webservice as
    >>
    >> a) Servlet
    >> or
    >> b) Session Bean

    >
    >Session bean is a particular implementation detail, and not an essential
    >aspect of creating a web service.
    >
    >> I compiled this webservice with standard J2EE.
    >>
    >> Is the resulting EAR resp. WAR compatible with all application servers like
    >>
    >> TomCat, JBoss, Websphere,...

    >
    >Yes.
    >
    >> or do all the application servers (above) required special classes/extensions

    >
    >> embedded in the webservice?

    >
    >They most likely do.
    >
    >All Java EE containers will comply with the standard. That means they all can
    >deploy a properly-constructed WAR (or EAR if they are enterprise-level). It
    >is the deployer's responsibility to make sure all libraries needed by the
    >application are in the classpath.
    >
    >While WARs and EARs are compatible across all relevant platforms, the
    >applications they contain will still require some work, sometimes major, to
    >make them run in each different environment. The effort is increased if the
    >project relies on a container-specific library.
    >
    >The old adage applies: In theory, theory and practice are the same, but in
    >practice they differ.
    >

    The problems with EARS on different platforms - app servers - is the
    deployment descriptors. JBoss and Weblogic both support the standard
    descriptors and extend with their vendor specific descriptors. EJB3
    annotations should help.

    Eric
    EricF, Jan 26, 2008
    #6
  7. Ulf Meinhardt

    Arne Vajhøj Guest

    Re: Are Webservices EARs resp. WARs compatible between differentservers (Tomcat, JBoss, WebSphere,...) ?

    Ulf Meinhardt wrote:
    > Assume I create a webservice as
    >
    > a) Servlet
    > or
    > b) Session Bean
    >
    > I compiled this webservice with standard J2EE.
    >
    > Is the resulting EAR resp. WAR compatible with all application servers like
    >
    > TomCat, JBoss, Websphere,...
    >
    > or do all the application servers (above) required special classes/extensions embedded in the webservice?


    Deploying a web service in a war (inside an ear or standalone
    does not matter) with all the necessary pieces (like Axis) should
    work in any servlet container implementing the servlet specification
    used (I believe Axis works fine with 2.3 and that should mean
    practically all today).

    Exposing EJB's as web services was added in EJB 2.1 specs, so if you
    jave a 2.1 or higher compliant EJB container it should work.

    Arne
    Arne Vajhøj, Jan 26, 2008
    #7
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. PD
    Replies:
    0
    Views:
    362
  2. jon
    Replies:
    0
    Views:
    311
  3. Manish Buttan

    logging soap req./resp. while invoking webservices

    Manish Buttan, Apr 26, 2004, in forum: ASP .Net Web Services
    Replies:
    9
    Views:
    159
    [MSFT]
    May 6, 2004
  4. Replies:
    12
    Views:
    259
  5. pantagruel
    Replies:
    0
    Views:
    224
    pantagruel
    Feb 17, 2006
Loading...

Share This Page