File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes Struts Without EJB Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » JSP
Reply Bookmark "Struts Without EJB" Watch "Struts Without EJB" New topic
Author

Struts Without EJB

Richard
Greenhorn

Joined: Nov 05, 2002
Posts: 2
It's a better idea to skip EJB from the layered architecture and use JAVA Beans in the business layer to avoid complexities and network traffics when a request is being made from the web framework,ie,the application layer.....does any one think that this is a good idea to go about or do u contradict with me.....if yes...let me know pls
Thanks
Richard known as Richie
[ November 05, 2002: Message edited by: Richard,Indian, Lives in US ]
Kyle Brown
author
Ranch Hand

Joined: Aug 10, 2001
Posts: 3879
Jeez, that's a bold statement. Yes, there are times when EJB's are too much. However, there are other times when EJB's are a GREAT idea. You can't just make blanket statements like this...
Kyle


Kyle Brown, Author of Persistence in the Enterprise and Enterprise Java Programming with IBM Websphere, 2nd Edition
See my homepage at http://www.kyle-brown.com/ for other WebSphere information.
Matthew X. Brown
Ranch Hand

Joined: Nov 08, 2000
Posts: 165
Another aspect to consider is- what is the direction of the EJB architecture? This should have some influence on what your plans are for building applications.
For example- consider this:
With the EJB 2.0- there is the use of Local interfaces for EJB's-(normally there is just a home and remote interface using RMI/IIOP) which gives you the ability to avoid the network traffic- and allows you to call the beans from within the same vm. I've used the local interfaces with EJB's in JBoss and Jrun, with good results.
Matthew X. Brown
Ranch Hand

Joined: Nov 08, 2000
Posts: 165
And- BTW- I was using Struts as well.....
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 14475
    
    7

There are approximately 5 features that EJBs possess that ordinary JavaBeans don't. Since all 5 are build on readily-available Java components, you could forget about EJBs entirely, but that means extra coding and debugging - usually not a good idea.
As a general rule, if you need less than 2 of the advanced services EJBs offer, you may find it better to simply use regular JavaBeans or other non-EJB mechanisms, but at 3 and up, the balance swings the other way.
As for myself, I have a tool that allows me to blast out EJBs and support code at high speed, so I start with EJBs with an option to rip them out if they exceed allowable overhead. Since EJBs are modular components, it's easier to convert them downwards than it might be to go the other way.
This question gets asked quite a lot, BTW, so I recommend searching the EJB forum for other views.
[ November 06, 2002: Message edited by: Tim Holloway ]

Customer surveys are for companies who didn't pay proper attention to begin with.
Richard
Greenhorn

Joined: Nov 05, 2002
Posts: 2
Ok,guys,i appreciate that some of you disagree with me by justifying ur statements well.I also have some factors where you can avoid EJBs with struts,they are dependent on the Transaction rules on which applications can be built.If we need those transaction rules then we need to use EJBs but otherwise skip them and go ahed with JAVA BEANS.
What do you guys say about this???
Thanks
Richie
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Struts Without EJB
 
Similar Threads
client server architecture ,EJB architecture and distributed architecture
Which design pattern to use ?
BMP Vs CMP
how to decouple sql in servlet
EJB THin layer