aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes using only session beans Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "using only session beans" Watch "using only session beans" New topic
Author

using only session beans

Sunny Bhandari
Ranch Hand

Joined: Dec 06, 2010
Posts: 448

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..


Java Experience
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 30957
    
158

Sure. Maybe you are calling other remote ejbs and want to have a local session facade.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Sunny Bhandari
Ranch Hand

Joined: Dec 06, 2010
Posts: 448

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

Joined: Apr 14, 2004
Posts: 10336

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.


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Sunny Bhandari
Ranch Hand

Joined: Dec 06, 2010
Posts: 448

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

Joined: Jul 20, 2005
Posts: 10266
    
168

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.


[My Blog] [JavaRanch Journal]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: using only session beans