What is the difference between java beans and EJB?

Options
- Java beans are reusable components that can be used for customized user objects while EJB are reusable components that are developed to comply with enterprise specification adhering to setter and getter methods and two public constructors.
- Java beans are reusable components that can be used for customized user objects while EJB are reusable components that are developed to comply with enterprise specification adhering to setter and getter methods and one public constructor.
- Java beans are reusable components that can be used for customized user objects while EJB are reusable components that are developed to comply with enterprise specification adhering to setter and getter methods and many public constructors.
- Java beans are reusable components that can be used for customized user objects while EJB are reusable components that are developed to comply with enterprise specification adhering to setter and getter methods with no public constructor.


CORRECT ANSWER : Java beans are reusable components that can be used for customized user objects while EJB are reusable components that are developed to comply with enterprise specification adhering to setter and getter methods and one public constructor.

Discussion Board
JavaBeans and EJB

JavaBeans is set of conventions that takes up the resusable component that can be used for customized user objects. It uses the low-level approach to develop reusable software components. It is used to build different kind of Java applications like applets, stand-alone apps, etc.

Java bean has the following features:

1. Public default constructor
2. Readable property methods prepended with "get";
3. Writable propertty methods prepended with "set"; and is Serializable.

Whereas,

Enterprise Java Beans is a standard for J2EE components as it follows the high level approach to building distributed systems.


Rohit Sharma 07-30-2014 02:24 PM

Write your comments


Enter the code shown above:

(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)


Advertisement