Hello alltogether, when i start developing an application based on an application server e.g. tomcat, when do i decide to use EJBs and when can i use Java Beans? How much more effort will it be to develop EJBs in compare to Java Beans. I think of following architecture: M: JSPs V: JavaBeans / Servlets C: Java Beans / EJBs When to choose what? Thanks for Help Ci
Well, I think you wanted the Web Developer Exam forum for this question. But you use a JavaBean for simple stuff, that doesn't need the overhead of an Application server. But you use an EJB, when you really want to use the benefits of an App Server, like Transactions, JDBC, Security, and just well optimized Server for that stuff. Mark
Like Mark mentionned, Javabeans and EJBs are a whole different ballgame. You will rarely use EJBs if you DO NOT need a huge system which needs transaction support, bean pooling, increased security etc. Javabeans are only serialized objects which have accessor methods (getters and setters). If you are thinking in small terms (ex: website which does not need loads of concurrent users), go with an MVC model with JSP, servlets and JDBC. If you need an enterprise application with thousands of users, security, transaction management, etc..), use EJBs (however use them wisely, read Core J2EE design patterns for the best practices), get a good application server (weblogic and websphere are both excellent, cannot forget JBoss either), and give yourself time because there is a large enough learning curve for EJB (version 2.0 now includes message driven beans, larger deployment descriptors, etc). Hope this gives you a little more insight
<b>Greg Georges</b><br /><i>Sun Certified Java Programmer for the Java2 platform (SCJP)</i><br /><i>Sun Certified Java Developer for the Java2 platform (SCJD)</i>
Bring out your dead! Or a tiny ad:
Devious Experiments for a Truly Passive Greenhouse!