With Enterprise javabeans, you can develop building blocks (EJB Components), that you or someone else can assemble and reassemble into different applications. Instead of reusing java classes, you get to reuse a bigger chunk of functionality. When you deploy a bean into a server, you can configure and customize the bean declaratively through an XML based deployment description to change the way bean behaves at runtime.
EJB lets you focus on business logic and leave the underlying services to the EJB server vendor. EJB servers give you a bunch of services such as,
• Transaction management
• Security
• Concurrency
• Networking
• Resource management
• Persistence
• Messaging
• Deploy time customization
What is the difference between EJB and J2EE?
Both J2EE and EJB are specifications for a server. But EJB is actually a subset of J2EE. In other words, a J2EE server must include an EJB container.
Can EJB components be used without an EJB compliant application server?
No. EJB components can’t live outside of an EJB container. They don’t have a main method, and even if you add one to your bean class, the bean wouldn’t be very useful on its own. Most of the methods in an enterprise bean are called by the container itself and have no meaning outside the server.
If your bean calls a method on a non bean java class, that method is still under the control of the container, so as far as the container is concerned, that non bean method is just a part of the bean’s functionality.
What is the difference between regular java beans and enterprise java beans?
The term ‘javabean’ means a reusable component. Regular non enterprise beans, are reusable components that follow a naming convention that can be used by development tools. Enterprise Javabeans are also reusable components. A regular bean runs in a JVM, just like any other normal Java class. But the component part of an enterprise bean must run under the control of the ELB container.
Thursday, October 9, 2008
Subscribe to:
Comments (Atom)