EJB

EJB Projects

EJB Project 1

EJB Examples

EJB EXAMPLE

EJB Objective Questions And Answers
More interview questions and answers

Is Java Bean and EJB are same? 1.Yes 2.No

2.No

There are two basic kinds of session bean: stateless and stateful? 1. True 2. False

1. True

EJB technology is based on two other technologies. Which is Java RMI-IIOP and JNDI? 1. True 2. False

1. True

EJB is? 1. An enterprise bean is a server-side software component that can be deployed in a distributed multitier environment. 2. An different programming language like C ,C++ etc. A.1,2 B.1 C.2 D.None

B.1

Choose different kinds of enterprise beans in EJB from following 1. Session beans. 2. Entity beans. 3. Message-driven beans. 4. All of the above 5. None

4. All of the above

EJB2.0 components are based on distributed objects? 1. True 2. False

1. True

In EJB client calls a stub, which is a client-side proxy object? 1. True 2. False

1. True

In EJB the stub calls over the network to a skeleton, which is a server-side proxy object. 1. True 2. False

1. True

In EJB the skeleton is responsible for masking network communications from the client and stub knows how to call over the network using sockets. 1.True 2.False

2.False 

In EJB the skeleton masks network communication from the distributed Object and skeleton also understands how to receive calls on a socket. 1. True 2. False

1. True

In EJB the skeleton knows how to massage parameters from their network representations to their Java representations. 1. True 2. False

1. True

Which of following interface must be implemented by all bean classes (session, entity, and messagedriven)? 1 javax.ejb.SessionBean; 2.javax.ejb.EntityBean; 3.javax.ejb.MessageDrivenBean; 4.All of the above 5.None

5.None 
Correct Answers is javax.ejb.EnterpriseBean

Which of following interface must be implemented by All session beans? 1.javax.ejb.SessionBean; 2.javax.ejb.EntityBean; 3.javax.ejb.MessageDrivenBean; 4.All of the above 5. None

1.javax.ejb.SessionBean;

Which of following interface must be implemented by all entity beans? 1 javax.ejb.SessionBean; 2.javax.ejb.EntityBean; 3.javax.ejb.MessageDrivenBean; 4.All of the above 5.None

2.javax.ejb.EntityBean;

Which of following interface must be implemented by all message-driven beans? 1.javax.ejb.SessionBean; 2.javax.ejb.EntityBean; 3.javax.ejb.MessageDrivenBean; 4.All of the above 5.None

3.javax.ejb.MessageDrivenBean; 

Which of following interface can be extended by javax.ejb.EnterpriseBean? 1 javax.ejb.SessionBean; 2. javax.ejb.EntityBean; 3. javax.ejb.MessageDrivenBean; 4. java.io.Serializable 5. None

4. java.io.Serializable

Which of following interface may be extended by javax.ejb.EJBObject? 1 javax.ejb.SessionBean; 2. javax.ejb.EntityBean; 3. javax.ejb.MessageDrivenBean; 4. java.io.Serializable 5. java.rmi.Remote

5.java.rmi.Remote 

Choose true 1.java.rmi.Remote interface is part of Remote Method Invocation over the Internet Inter-ORB Protocol (RMI-IIOP). 2.Any object that implements java.rmi.Remote is a remote object and is callable from a different Java Virtual Machine. 3. java.rmi.Remote interface is part of EJB over the Internet Inter-ORB Protocol (RMI-IIOP). 4.None of Above

1.java.rmi.Remote interface is part of Remote Method Invocation over the Internet Inter-ORB Protocol (RMI-IIOP). 
2.Any object that implements java.rmi.Remote is a remote object and is callable from a different Java Virtual Machine

Can Entity Beans have no create() methods? 1.Yes 2.No

1.Yes

Choose EJB-required methods for SessionBean 1.public void ejbCreate() 2.public void ejbRemove() 3.public void ejbActivate() 4.public void ejbPassivate() 5.public void setSessionContext(javax.ejb.SessionContext ctx) A.1,2,3,4,5 B.1,2,4,5 C.1,3 D. None

A.1,2,3,4,5

Choose correct option: 1.BMP bean refers as bean-managed persistence bean 2.BMP bean manages synchronizing its state with the database as directed by the container. 3.BMP bean uses a JDBC API to read and write its fields to the database. 4.All of the above. 5.None

4.All of the above.

In a Home interface may declare zero or more create() methods? 1.Yes 2.No

1.Yes

The ejbLoad()method and ejbStore() method in CMP entities are invoked when the state of entity bean is being synchronized with the database. 1. True 2. False

1. True