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

U

Ulf Meinhardt

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
 
L

Lew

Ulf said:
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.
 
L

Lew

Thomas said:
Lew, 25.01.2008 15:26:
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.
 
T

Thomas Kellerer

Lew, 25.01.2008 16:09:
A point addressed in the part you didn't quote:

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
 
E

EricF

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



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
 
A

Arne Vajhøj

Ulf said:
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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,813
Latest member
lawrwtwinkle111

Latest Threads

Top