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

using only session beans

 
Sunny Bhandari
Ranch Hand
Posts: 448
Eclipse IDE Firefox Browser Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Recently I was asked the following question:

Does it make sense to use session beans without using Entity/JPA in an enterprise application?

Any ideas..
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34973
379
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sure. Maybe you are calling other remote ejbs and want to have a local session facade.
 
Sunny Bhandari
Ranch Hand
Posts: 448
Eclipse IDE Firefox Browser Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
okay, I think the answer should not be definite.

It all depends upon application requirements. An application may like to create a work flow or call remote beans by using only session EJB in an enterprise application.

Is that answer good enough for interviews?
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think the interviewer was probably prompting you to enumerate the various container provided services you can use with EJBs. If you went through those you would have quite a detailed answer.
 
Sunny Bhandari
Ranch Hand
Posts: 448
Eclipse IDE Firefox Browser Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I had that in mind but didn't say that because then he would counter me with question that I can have all those services with Spring also then why take the burden of application server.
 
Jaikiran Pai
Marshal
Pie
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sunny Bhandari wrote:I had that in mind but didn't say that because then he would counter me with question that I can have all those services with Spring also then why take the burden of application server.


That's a perfectly valid question too. The main difference between these technologies is that EJBs are a "standard" which means various vendors follow this standard while providing the services. Effectively, your application that works on a specific vendor's implementation will not require changes to be run on some other vendor's implementation. Ofcourse if you use some vendor specific implementation then that would definitely need porting.

On the other hand, Spring isn't really a standard. But again, if your application doesn't care of vendor lock-in then Spring is a good option too.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic