Thursday, October 25, 2007

EJB interview questions Part6


13. How many entity beans used and how many tables can u use in EJB project ?

EJB architecture is scalable and could scale to any number of tables. However each entity bean represents a business object and is typically represented by a table in the persistent storage mechanism. As number of ejb's increase their complexity increases as well. This "could" cause performance issue and hence the schema of these business objects
should be rechecked.

14. What is scalable, portability in J2EE?

i. Scalable in the sense could handle number of clients at the same time.

ii. Portable - platform independent, app server independent, data store independent.

15. What are the services provided by the container?

i. Manages execution and life cycle of EJBs.

ii. May provide transaction services.

iii.Shields clients from lower level network management.

iv. May provide persistent storage.

16. Software architecture of EJB/ Explain life cycle of beans. ?

i. Stateful session bean

Does Not exists
| |
create | |
| |
setSessionContext | | remove
| |
ejbCreate | | ejbRemove
| |
Ready --------ejbPassivate-------------> Passive
<-------ejbActivate -------------

ii. Stateless session bean

Does Not exists
| |
setSessionContext | | remove
| |
ejbCreate | | ejbRemove
| |
Ready

iii. Entity beans (Bean managed and Container managed)


Does Not exists
| |
setEntityContext | | unsetEntityContext
| |
| |
- Pooled < -
create - | | -
- ejbAct. | -
ejbCreate - | | - ejbRemove
- |ejbPass. -
ejbPostCreate - | | - remove
->Ready -

iii. Entity beans (Bean managed and Container managed)


Does Not exists
| |
setEntityContext | | unsetEntityContext
| |
| |
- Pooled < -
create - | | -
- ejbAct. | -
ejbCreate - | | - ejbRemove
- |ejbPass. -
ejbPostCreate - | | - remove
->Ready -

0 comments:

Advertisement

 

Copyright 2008 All Rights Reserved Revolution Two Church theme by Brian Gardner Converted into Blogger Template by Bloganol dot com