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 ]
Joined: Aug 10, 2001
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
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.
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.
Joined: Nov 05, 2002
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