Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

using EJB in web services

 
Lila Houmani
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 224
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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,
 
Kishore Dandu
Ranch Hand
Posts: 1934
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Pradeep Ram
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic