Re: JSR-109 and EJBs

From: Anne Thomas Manes <>
Date: Thu, 05 Feb 2004 07:07:06 -0500

JSR-109 maps JAX-RPC to J2EE, but in the process it defines a few
constraints. One of those constraints is stateless processing.

My recommendation is that you design your services using JAX-RPC unless you
have a strong requirement (e.g., distributed transactions) that require
you to use EJBs. JAX-RPC can run in any servlet engine, which gives you
lots more deployment flexibility. The service API is simpler, also, and
doesn't require JNDI.


At 09:53 PM 2/4/2004, you wrote:
>Hello Cliff,
>Thanks for the insight you've given in your email.
> >The current 109 spec does not provide for stateful session web service
> >EJBs. You'll need to use JAX-RPC for that.
>But isn't 109 based on JAX-RPC anyways? I would think that something 109
>can't do, JAX-RPC could not do either. Have I misunderstood the whole
>thing? I thought that 109 simply leveraged JAX-RPC and built on top of it.
>---------- Original Message ----------------------------------
>From: Cliff Draper <Cliff.Draper_at_Sun.COM>
>Date: Wed, 04 Feb 2004 18:24:03 -0800 (PST)
> >From: Mete Kural <>
> >Date: Wed, 04 Feb 2004 16:25:40 +0000
> >> >It depends on what your web service is about to do.
> >>
> >> The web service that we want to build is for a CRM product. Although
> we want to take this opportunity to completely revamp our back-end CRM
> application and port it into a J2EE environment and not have any baggage
> from the old system. We are already in the process of building a JCA
> Connector for the old back-end system for use in Java-based portal
> servers. But we want the next generation of our CRM product to interface
> the outside world via Web services. Therefore I was investigating
> possible architecture options for a completely new CRM application with a
> web service front.
> >
> >Well from that, it sounds like a J2EE style web service would be
> >perfect for you. Since 109 is only available in J2EE 1.4, I assume
> >you have an app server that runs J2EE 1.4. 109 makes it so that
> >deployment of the web service automatically runs the wscompile for
> >you, of course, you'll have to learn another deployment descriptor
> >file (webservices.xml) unless you have a tool that does it for you.
> >
> >Then with 109, you'll need to decide if you want servlet style or EJB
> >style (stateless session EJB style, that is). The EJB style tends to
> >be more scalable and works well with other EJBs (transactionally,
> >etc.).
> >
> >> One more question that I have is how session management can be achived
> in EJB-based JSR-109-compliant web servies.
> >
> >The current 109 spec does not provide for stateful session web service
> >EJBs. You'll need to use JAX-RPC for that.
> >
> >regards,
> >Cliff Draper Sun Microsystems, Forte Tools
> >My opinions may or may not reflect those of my employer.
> >---------------------------- food for thought ---------------------------
> >"Discovery is seeing what everybody else has seen, and thinking what
> > nobody else has thought." -Albert Szent-Gyorgi
> >
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail:
> >For additional commands, e-mail:
> >
> >
>To unsubscribe, e-mail:
>For additional commands, e-mail:

Anne Thomas Manes
VP & Research Director
Burton Group

To unsubscribe, e-mail:
For additional commands, e-mail: