This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Web Services and the fly likes Service-Endpoint Servlets, or directly EJB ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Service-Endpoint Servlets, or directly EJB ?" Watch "Service-Endpoint Servlets, or directly EJB ?" New topic
Author

Service-Endpoint Servlets, or directly EJB ?

Jay Sam
Greenhorn

Joined: Feb 27, 2005
Posts: 27
Hi,

our mission is to design a classic web/servletcontainer + ejbserver + database application.

In order to provide maximum future flexiblity for support of multiple client types, maximum interoperability, I chose to represent all services provided on the EJB container as web services. The "normal" way to do this, is by publishing th web services backed by the ejb�s at servlet-container level.

Now: imagine we want to change web server in the future, and the server doesnt support servlets. It is a
php-based framework, whiclh can only access web services to integrate J2EE
applications. So, now, we have 2 choices: the first solution is to have a
free web server with servet container, and to publish web services with
the servlets. The other choice we have is not to use the free
servlet-enabled web server, but to use web services which are directly
provided by the ejb-container from the start ! What would you say is a better choice ? I think directly using web services from the ejb-container is a better choice from the start. What would you say ? The only I thing I am not sure about is whether Sun has clerly made it a requirement for ejb-containers to support webservices. Have they ? If yes, web services directly provided from the ejb container are the right choice for the most flexible framework !! And in this case, I think XML is the right choice right away, for communication between webserver/servletcontainer and ejb-container.
What would you say ? Would you use XML ? XML is so flexible, we can do the
whole use cases with one XML type of document. If the requirements change,
in the future, we will most likely only have to modify this document, if
at all - because it is very flexible from the start.
I know it is not part of the requirements to think that far, but :
- using this XML approach is simplifying so many things, and even sequence
diagrams, that I want to use it.

Best regards,

Jay
Balaji Loganathan
author and deputy
Bartender

Joined: Jul 13, 2001
Posts: 3150
If my understanding on your requirement is correct, then you want to lose your ejb-container at any point right ?? I mean even if you move from one server to another server or so ?? If so why you are so concerned about not having servlets ??
Remember you dont need servlet to access a ejb container, a simple java application can also consume ejb.
You wrote:
And in this case, I think XML is the right choice right away, for communication between webserver/servletcontainer and ejb-container.

By XML do you mean SOAP here ??
Guess I am


Spritle Software Blogs
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Service-Endpoint Servlets, or directly EJB ?
 
Similar Threads
Best implementation
WHY EJB??
Which other alternatives to portal exists on market?
Service-Endpoint Servlet, or directly EJB ?
XML as communication format between SERVLET tier & EJB tier - Pros and Cons ?