Question - 1
Elementary Java Beans
Enterprise Java Beans
Exclusive Java Beans
Exclusive Java Bits
Show Answer
Solutions
Answer- B
Question - 2
Which of the following annotation is used to specify or inject a dependency as ejb instance into another ejb?
javax.ejb.Stateful
javax.ejb.EJB
javax.ejb.MessageDrivenBean
None of the above
Show Answer
Solutions
Answer- B
Question - 3
Which of the following is true about session bean?
This type of bean represents persistent data storage
This is a type of enterprise bean which is invoked by EJB container when it receives a message from queue or topic
This type of bean stores data of a particular user for a single session
None of the above
Show Answer
Solutions
Answer- C
Question - 4
Which of the following is correct about a transaction in EJB?
A transaction is a single unit of work items.
A transaction follows the ACID properties.
Both A & B
None of the above
Show Answer
Solutions
Answer- C
Question - 5
EJB system’s performance tuning is the responsibility of?
EJB Deployer
Application Assembler
Bean Provider
Tool Vendor
Show Answer
Solutions
Answer- A
Question - 6
Which statements about a session bean class are true?
It is a final class
Overloaded constructors are supported
The ejbCreate() method must not be a final method
Their business methods can be private
Show Answer
Solutions
Answer- C
Question - 7
Which is the method available in SessionContext interface?
setSessionCotext()
getRollbackOnly()
afterBegin()
getRollbackOnly()
Show Answer
Solutions
Answer- A
Question - 8
Which of the following is not a life-cycle method for a Stateful Session Bean?
Pre Construction
Post Construction
Pre Destruction
Post Destruction
Show Answer
Solutions
Answer- A
Question - 9
Which component does the Entity bean represent the persistent data stored in the database?
Client-side component
Server-side component
server and client side component
None of these
Show Answer
Solutions
Answer- B
Question - 10
EJB is like COM, Abbreviate the term COM?
Component Object Model
Component Oriented Model
Common Object Methods
Common Oriented Methods
Show Answer
Solutions
Answer- A
Question - 11
What represents a persistent global data from the database?
Entity Bean
Session Bean
Message Driven Bean
None of the above
Show Answer
Solutions
Answer- A
Question - 12
Which case of a session bean obtains the UserTransaction object via the EJBContext using the getUserTransaction() method in EJB transaction management?
Bean-managed transactions
Container-managed transactions
Both A & B
None of the above
Show Answer
Solutions
Answer- A
Question - 13
Which server-side component is required to be deployed on the server?
EJB
RMI
Both A & B
None of the above
Show Answer
Solutions
Answer- A
Question - 14
Which middleware services are provided by EJB?
Security
Transaction Management
Both A & B
None of the above
Show Answer
Solutions
Answer- C
Question - 15
How many types of session beans are available in EJB?
Answer- C
Question - 16
Which type of instances retain no data or conversational state for a specific client?
Session Bean
Message Driven Bean
Entity Bean
Show Answer
Solutions
Answer- B
Question - 17
From the following APIs, which API does NOT guarantees to be supported by EJB 2.0 containers?
JXTA
JAXP
JDBC
None of the above
Show Answer
Solutions
Answer- A
Question - 18
Which of the following is true about EJBQL EJB?
EJBQL stand for EJB Query Language.
ejb query language is quite handy to write custom queries without worrying about underlying database details.
It is quite similar to HQL, hibernate query language.
All the above
Show Answer
Solutions
Answer- D
Question - 19
Which session bean does the conversational state between multiple method calls is not maintained by the container?
Stateless Session Bean
Singleton Session Bean
Restful Session Bean
None of the above
Show Answer
Solutions
Answer- A
Question - 20
Which of the following is correct about @PostPersist annotation for a entity bean?
Method is invoked after an entity is created in database.
Method is invoked when an entity is created in database.
Method is invoked when an entity is deleted from the database.
Method is invoked after an entity is deleted from the database.
Show Answer
Solutions
Answer- A
Practice more set questions