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 using EJB in web services 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 "using EJB in web services" Watch "using EJB in web services" New topic
Author

using EJB in web services

Lila Houmani
Greenhorn

Joined: Apr 15, 2004
Posts: 3
Hi,

what is the advantages to use EJB to implement an application that would be exposed as a web services, if there is any ? why not using a javabeans only ? there is some case when javabean will not be sufficient ?

thanks,
Lila
Sreenivasa Majji
Ranch Hand

Joined: Jul 12, 2001
Posts: 224
You can use Java Beans in web services, provided that you can write your own security model, transaction manager, resource manager, Persistance Manager .....

All these services will be provided by Application Server (such as WebLogic) if you are using EJBs in web services.

Hope this helps,


Sreenivasa Majji
Kishore Dandu
Ranch Hand

Joined: Jul 10, 2001
Posts: 1934
and some parts of the application server provided EJBs like Entity beans can be a big pain.

You can also look into Spring, Hibernate to achieve your web-service goals in simpler ways.


Kishore
SCJP, blog
Pradeep Ram
Greenhorn

Joined: Sep 29, 2004
Posts: 18
My 2 cents .. One of the primary reasons to use EJBs in webservices is, if you have a service available that is implemented using EJBs (say like a StockQuoteBean), if you need to expose this EJB to outside customers, you can expose the Bean as a WebService.

If you are planning for transactions using webservices like a OrderManagement system or TicketReservation, then you need the container benefits like Transaction/Security, then EJBs are a natural choice.

Or if you prefer the lighter frameworks, Spring will do the job for you.
--pradeeP
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: using EJB in web services
 
Similar Threads
Best solution for Periodical interaction
Is any one working on SOA based projects?
Consuming a web service from an EJB
web services is replacement for EJB
JSF,Spring,EJB,Hibernate, Web Services