Question 6 :
What are the services provided by container?
Container services are totally depends upon the "vendor implementation". But more or less most of the vendors suppots the basic services like,
LifeCycle Management - It is Automatic.
Session Management - it is used by Developer coded callback methodsâ€¦
Transaction Management - it is used by configuring deployment descriptor (DD) .
Security management - it is used by configuring deployment descriptor (DD) .
The other services, if any will be in advanced versions, and depends on Vendor specific.
Question 7 :
What is deployment descriptor?
Deployment descriptor is a XML file. which is used to locate the web applicatio n by container.it includes the details of respective bean.
Question 8 :
How many EJB Objects are created for a Bean?
For a Session bean - one EJB object for one bean instance.
For entity bean - it depends , if 2 users are accessing one row at time then one EJB object is used for both the beans other wise for each bean one EJB object.
Question 9 :
What is re-entrant. Is session beans reentrant. Is entity beans reentrant?
If we define the entity bean as being reentrant, multiple clients can connect to the Entity bean & execute methods within the entity bean concurrently. Container takes care of synchronization. If we define the entity bean as non-reentrant and many clients connect to it concurrently to execute a method, exception is thrown .
Question 10 :
What is the difference between EAR, JAR and WAR file?
J2EE defines three types of archives:
1. Java Archives (JAR) A JAR file encapsulates one or more Java classes, a manifest, and a descriptor. JAR files are the lowest level of archive. JAR files are used in J2EE for packaging EJBs and client-side Java Applications.
2. Web Archives (WAR) WAR files are similar to JAR files, except that they are specifically for web applications made from Servlets, JSPs, and supporting classes.
3. Enterprise Archives (EAR) "An EAR file contains all of the components that make up a particular J2EE application.