Thank you very much. This is very informative. I will read the article you mention below.
-----Original Message----- From: toby cabot [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 27, 2004 9:54 AM To: [EMAIL PROTECTED] Subject: Re: [openejb-user] NetBeans\Tomcat integration with openEJB On Tue, Apr 27, 2004 at 09:00:09AM -0400, Margolis, Scott wrote: > That's where I get confused. Don't worry, it's confusing. Sun has defined many specifications for different functions, and many of those are grouped under an umbrella spec called "Java 2 Enterprise Edition" or j2ee. Two of those specs are Servlets and Enterprise Java Beans (EJB). Servlets are a way for you to write code that gets called when http events happen, and the application server that implements the spec is called a "servlet container". Tomcat is a servlet container, let's say it's roughly analogous to IIS. EJB's are a way for you to encapsulate business logic that you can call over a network using an RPC mechanism. Think DCOM or CORBA. There are different types of enterprise Javabeans for different purposes, these include entity beans (that bind to e.g. a row in a database), stateful and stateless session beans, and message-driven beans. An application server that implments the EJB spec is called an "EJB Container". OpenEJB is such a container. Where it gets confusing is when you combine the two. Different projects implement this in different ways. OpenEJB is designed to be embedded easily, so some people run OpenEJB inside Tomcat. Others embed Tomcat inside their EJB server, and still others build a server framework and embed both Tomcat and and EJB container where they talk to one another as peers. A common approach to building applications is to use servlets for the front end, and have them call EJB's for the back end. Servlets implement the web look-n-feel and EJB's implement the business logic. There's a pretty good tutorial at http://java.sun.com/j2ee/1.4/docs/tutorial/doc/index.html with explanations and example code. It's worth a couple of days, unless your PHB is in your face about some deadline or other. Actually, in the spirit of sharpening your tools before using them, it's probably worth it even then. Regards, Toby
