• Post Reply Bookmark Topic Watch Topic
  • New Topic

Struts Without EJB

 
Richard
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3892
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Matthew X. Brown
Ranch Hand
Posts: 165
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 165
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And- BTW- I was using Struts as well.....
 
Tim Holloway
Bartender
Posts: 18412
58
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
Richard
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!