Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Can JSP and Servlets do everything doing by EJB

 
Harshani Wickramarathna
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Hi,

Please let me know whether we can use JSP and Servlets to do everything we have done using EJB?
 
Lorand Komaromi
Ranch Hand
Posts: 276
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, you could implement all the services provided by EJB3 yourself with servlet+jsp and POJOS, but depending on which features you need, this could mean a lot of additional work...
 
Harshani Wickramarathna
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you very much...
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If it's just the EJB API you wish to avoid, then there are alternatives like Hibernate (which has its own API).
 
Lorand Komaromi
Ranch Hand
Posts: 276
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ulf Dittmer wrote:If it's just the EJB API you wish to avoid, then there are alternatives like Hibernate (which has its own API).


Did you mean JPA?
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, I meant Hibernate's own API.
 
Lorand Komaromi
Ranch Hand
Posts: 276
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ulf Dittmer wrote:No, I meant Hibernate's own API.


As a replacement for EJB or JPA..?
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Neither. Hibernate is a JPA implementation, and has its own non-standard ORM API. As far as an EJB replacement goes, it could be used to replace Entity beans only.
 
Joe Harry
Ranch Hand
Posts: 10124
3
Eclipse IDE Mac PPC Ubuntu
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ulf Dittmer wrote:No, I meant Hibernate's own API.


Hibernate is just an ORM framework and a reference implementation of the JPA standard. I can imagine Spring + Hibernate as a replacement for EJB and not just Hibernate.
 
Leonardo Carreira
Ranch Hand
Posts: 494
Eclipse IDE Java Postgres Database
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes, Spring offers the "lighter" of EJB version..
Spring also provides API to wraps up Hibernate through HibernateTemplate..
it could ran in Tomcat Servlet container..
but, i think EJB3.1 is good news also for EJB developer..
it could ran in lighter EJB Container, such as Glassfish V3..
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic