Top 150+ Solved Enterprise Computing With JAVA MCQ Questions Answer

From 136 to 150 of 173

Q. The EJB Transaction Attribute that ensures the method call that always takes place in a transaction, either client started or container started’ are

a. TX_SUPPORTS

b. TX_MANDATORY

c. TX_REQUIRED and TX_REQUIRES_NEW

d. Either A or B

  • c. TX_REQUIRED and TX_REQUIRES_NEW

Q. Abbreviate the term JMS?

a. Java Message Service

b. Java Monitor Service

c. Java Message Session

d. Java Monitor Session

  • a. Java Message Service

Q. Which case of a session bean obtains the UserTransaction object via the EJBContext using the getUserTransaction() method in EJB transaction management?

a. Bean-managed transactions

b. Container-managed transactions

c. Both A & B

d. None of the above

  • a. Bean-managed transactions

Q. Which services are provided to EJB components by the EJB container?

a. Transaction support

b. Persistence support

c. Naming support

d. All mentioned above

  • d. All mentioned above

Q. Which EJB container must provide an implementation of Java Naming and Directory Interface (JNDI) API to provide naming services for EJB clients and components?

a. Transaction support

b. Persistence support

c. Naming support

d. All mentioned above

  • c. Naming support

Q. Which session bean maintain their state between client invocations but are not required to maintain their state across server crashes or shutdowns?

a. Stateful Session Bean

b. Stateless Session Bean

c. Singleton Session Bean

d. None of the above

  • c. Singleton Session Bean

Q. Which is not a valid scope for Java bean in JSP?

a. Page

b. Session

c. Request

d. Global.

  • d. Global.

Q. Which statement characterizes stateless session beans?

a. They allow the PostConstruct, PreDestroy, and PrePassivate life-cycle callbacks.

b. They require home interfaces.

c. When a client looks up a stateful session bean in the JNDI, the same bean is returned every time.

d. They are asynchronous message consumers.

  • a. They allow the PostConstruct, PreDestroy, and PrePassivate life-cycle callbacks.

Q. Which statement about entities is correct?

a. Entities must be annotated with the @Entity annotation.

b. Entities can be final classes.

c. Entities can have a single no-arg constructor with protected visibility.

d. Instance variables of an entity can have private, protected, public, or package visibility.

  • c. Entities can have a single no-arg constructor with protected visibility.
Subscribe Now

Get All Updates & News