• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Why we use EJB

 
Kavisha Paranamana
Greenhorn
Posts: 25
  • 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Why we use EJB ? Can't we develop applications without EJB ?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64196
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Of course you can. I've never used EJBs for anything.
 
Jayr Motta
Ranch Hand
Posts: 110
Google App Engine Google Web Toolkit Java
  • 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Kavisha,

EJB makes easy tasks that most part of enterprise applications requires nowadays. There are obviously a lot of other solutions that can replace or also co-exist with EJB like Spring.

The thing is, EJB is about simplicity. You'll write just a little or none XML, you'll have a lot of cool defaults like transaction management implicit, avoid concurrent programming, security management, message-oriented middleware and so on.

I like to state that EJB nowadays are for those that are looking for something really simple while Spring is used by those looking for a lot of flexibility and versatility, but will pay a slightly higher price on complexity.

Most of the great vendors like IBM, Oracle, Caucho, Red Hat, Jetty, and a lot other great vendors implement the EJB specification on their application server. And even Spring on its documentation makes a lot of references to the concepts created on the specification, sometimes even using the same concepts (transaction management is an example). You'll be able to expose your business objects through web services or through sockets, to cluster them in order to achieve higher scalability, fail tolerance and availability.

The EJB 3.2 specification is already on the JCP and the rumors said that it will be adapted to be used on cloud environments, also Hibernate released OGM that probably could be used as the next generation of JPA.

That's it, keep in mind that you should always be simpler as possible and yet have the mind opened. Right now I'm working with Spring 3 but I'm a big fan of the EJB specification and expert groups!
 
Jaikiran Pai
Marshal
Pie
Posts: 10444
227
IntelliJ IDE Ubuntu
  • 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jayr Motta wrote: also Hibernate released OGM that probably could be used as the next generation of JPA.


Actually it's not really next generation JPA. Hibernate OGM is a JPA implementation for non-relational datastores.
 
Jayr Motta
Ranch Hand
Posts: 110
Google App Engine Google Web Toolkit Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jaikiran,

I agree with you. But EJB 3.2 specification, will focus on cloud until where I know. And relational doesn't fits too well as non-relation does. There are already a lot of implementation in this nature like Objectify and also JPA over non-relational databases but with limitations given it's relational nature.

I think the next step will be create some kind of hook on the JPA specification to this kind of "world" and to those that read the OGM birth post have seen that a lot of things from the "original" Hibernate will be reused, if it's possible, the expert group will certainly find a way to create a hook or even a new specification to it (for god sake, one more? :P).

But I can be wrong and I'm certainly just speculating, but that's what I truly believe. What you think about it?
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic