users@jax-rpc.java.net

Re: JSR-109 and EJBs

From: Matthias Weidmann <Matthias.Weidmann_at_Sun.COM>
Date: Wed, 04 Feb 2004 23:26:38 +0100

Hi Mete,

Mete Kural wrote:

> An additional question that I have is about JSR-109 and EJBs.
> What are the advantages and disadvantages of using EJBs for a
> new web services project that doesn't need to make use of
> pre-existing EJBs? I am not that knowledgable of EJBs but I've been
> told by several collegues to stay away from them. I understand the

(EJBs come in different flavors with EJB2.1: stateless session beans,
stateful session beans, entity beans, message-driven beans and stateless
session beans acting as web service endpoints. While there are different
opinions in the J2EE community on all of the different EJB types,
generally there is agreement on that stateless session beans and
message-driven beans are valuable tools, and for example stateful
session beans and entity beans depend very much on further application
scenario specifics.)

> argument for using EJB-based web services when there is an already
> existing application architecture based on an EJB architecture. But
> for a totally new web services project, why would I want to use EJBs?

It depends on what your web service is about to do. If it's using
for example distributed transactions you might benefit from declarative
transaction management (CMT) available for stateless session beans
acting as web service endpoints. And/or, if your web service integrates
with legacy systems, you might find the capabilities of the Java
Connector Architecture (especially the mapping of connectors
to message-driven beans for messages coming in from the legacy system)
intriguing, interacting with a stateless session bean acting as a
web service endpoint in one way or the other. I'd say the more complex
(distributed transactions, messaging, legacy systems) the actual web
service operations are, the more advantages the EJB architecture can
offer.

Matthias





---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_jax-rpc.dev.java.net
For additional commands, e-mail: users-help_at_jax-rpc.dev.java.net