• Post Reply Bookmark Topic Watch Topic
  • New Topic

EJB vs. JavaBeans  RSS feed

 
Stephen Huey
Ranch Hand
Posts: 618
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok, I can read what Sun has to say in the basic intro to EJB, but can someone spell out some of the differences (or maybe an example or two) of how EJBs differ from regular JavaBeans (in both their "architecture" or the way they look and the ways they're used). Thanks...
 
Pradeep bhatt
Ranch Hand
Posts: 8933
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
http://www.coderanch.com/t/309760/EJB-JEE/java/java-Beans-EJB
Edited portion:
Lasse you are quick. I have to imrpove my searching speed
Did you get the results from cache?
[ August 27, 2003: Message edited by: Pradeep Bhat ]
 
Stephen Huey
Ranch Hand
Posts: 618
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Lasse Koskela:
Have you read the previous posts on this subject?

Now I have!
So, I'm maintaining someone else's code, and they're calling JavaBeans from JSPs, and from one of those other posts you gave me I read that that's not necessarily bad (only calling EJBs directly from JSPs is too tightly coupled, right?). The reason I'm being so anal about this is b/c I'm just wondering if the code that I've inherited was written in the right way (since I'm new to J2EE stuff).
Thanks...
 
Chris Mathews
Ranch Hand
Posts: 2712
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Stephen Huey:
So, I'm maintaining someone else's code, and they're calling JavaBeans from JSPs, and from one of those other posts you gave me I read that that's not necessarily bad (only calling EJBs directly from JSPs is too tightly coupled, right?).

Depending on the size and scope of the application, this may not be a bad design. However, as applications get "big" (obviously big is an arbitrary concept), I prefer to remove business logic from the JSPs and enforce a cleaner separation between the Model, View, and Controller Layers. This is where web frameworks like Struts, WebWork, and Spring Framework come into play. This increases the overall complexity of the application but it leads to much better extensibility, maintainability, and reuse.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!