EJB - Advanced Java Test

EJB - Advanced Java Test


1) EJB (Enterprise Java Bean) is used to develop which type of applications in java?

A) Scalable
B) Robust
C) Secured
D) All mentioned above
View Answer / Hide Answer

ANSWER: D) All mentioned above




2) Which middleware services are provided by EJB?

A) Security
B) Transaction Management
C) Both A & B
D) None of the above
View Answer / Hide Answer

ANSWER: C) Both A & B




3) In the development of EJB which version is faster because of simplicity and annotations such as @EJB, @Stateless, @Stateful, @ModelDriven, @PreDestroy, @PostConstruct etc.?

A) EJB 3
B) EJB 2
C) EJB 1
D) None of the above
View Answer / Hide Answer

ANSWER: A) EJB 3




4) EJB is like COM provided by Microsoft but, it is different from?

A) Java Bean
B) RMI
C) Web Services
D) All mentioned above
View Answer / Hide Answer

ANSWER: D) All mentioned above




5) EJB is like COM, Abbreviate the term COM?

A) Component Object Model
B) Component Oriented Model
C) Common Object Model
D) Common Oriented Model
View Answer / Hide Answer

ANSWER: A) Component Object Model




6) Which is a server-side component, it is required to be deployed on the server?

A) EJB
B) RMI
C) Both A & B
D) None of the above
View Answer / Hide Answer

ANSWER: A) EJB




7) EJB technology is built on the top of Socket Programming?

A) True
B) False
View Answer / Hide Answer

ANSWER: B) False




8) In EJB, which must be written in java language?

A) Bean component
B) Bean client
C) Both A & B
D) None of the above
View Answer / Hide Answer

ANSWER: C) Both A & B




9) In EJB, middleware services are provided by EJB Container automatically?

A) True
B) False
View Answer / Hide Answer

ANSWER: A) True




10) Following are the disadvantages of,

1) Requires application server.
2) Requires only java client.
3) Complex to understand and develop ejb applications.

A) RMI
B) EJB
C) Both A & B
D) None of the above
View Answer / Hide Answer

ANSWER: B) EJB




11) The life cycle of session bean is not maintained by the application server (EJB Container)?

A) True
B) False
View Answer / Hide Answer

ANSWER: B) False




12) How many types of session beans are available in EJB?

A) 2
B) 3
C) 4
D) 5
View Answer / Hide Answer

ANSWER: B) 3




13) In which session Bean conversational state between multiple method calls is not maintained by the container in case of ?

A) Stateful Session Bean
B) Stateless Session Bean
C) Singleton Session Bean
D) None of the above
View Answer / Hide Answer

ANSWER: B) Stateless Session Bean




14) In 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
View Answer / Hide Answer

ANSWER: C) Singleton Session Bean




15) In which type an instances retain no data or conversational state for a specific client?

A) Message-Driven Bean
B) Session Bean
C) Entity Bean
D) None of the above
View Answer / Hide Answer

ANSWER: A) Message-Driven Bean




16) JMS is also known as a messaging service?

A) True
B) False
View Answer / Hide Answer

ANSWER: A) True




17) Abbreviate the term JSM?

A) Java Message Service
B) Java Monitor Service
C) Java Message Session
D) Java Monitor Session
View Answer / Hide Answer

ANSWER: A) Java Message Service




18) JMS is mainly used to send and receive message from one application to another?

A) True
B) False
View Answer / Hide Answer

ANSWER: A) True




19) In the advantage of JMS which receive the message, client is not required to send request, Message will arrive automatically to the client?

A) Reliable
B) Asynchronous
C) Both A & B
D) None of the above
View Answer / Hide Answer

ANSWER: B) Asynchronous




20) In which model of message domain is delivered to one receiver only, where Queue is used as a message oriented middleware (MOM)?

A) Point-to-Point Model
B) Publisher/Subscriber Model
C) Both A & B
D) None of the above
View Answer / Hide Answer

ANSWER: A) Point-to-Point Model




21) A message driven bean is like statefull session bean that encapsulates the business logic and doesn't maintain state?

A) True
B) False
View Answer / Hide Answer

ANSWER: B) False




22) In which component Entity bean represents the persistent data stored in the database?

A) Server-side component
B) Client-side component
C) server and client side component
D) None of the above
View Answer / Hide Answer

ANSWER: A) Server-side component




23) In EJB these two types of entity beans are bean managed persistence and container managed persistence are used in?

A) EJB 2.x
B) EJB 3.x
C) Both A & B
D) None of the above
View Answer / Hide Answer

ANSWER: A) EJB 2.x




24) In which type of EJB it encapsulates the state that can be persisted in the database,it is deprecated,Now, it is replaced with JPA (Java Persistent API)?

A) Entity Bean
B) Message Driven Bean
C) Session Bean
D) None of the above
View Answer / Hide Answer

ANSWER: A) Entity Bean




25) Entity beans differ from session beans in several ways they are?

A) persistent
B) Allow shared access
C) Have primary keys
D) All mentioned above
View Answer / Hide Answer

ANSWER: D) All mentioned above




26) EJB 3.0 provides option to define database entity relationships/mappings like ?

A) One to One
B) One to Many
C) Many to One
D) Many to Many
E) All mentioned above
View Answer / Hide Answer

ANSWER: E) All mentioned above




27) EJB is a specification for J2EE server, not a product; Java beans may be a graphical component in IDE?

A) True
B) False
View Answer / Hide Answer

ANSWER: A) True




28) EJB QL is a Query Language provided for navigation across a network of enterprise beans and dependent objects defined by means of container managed persistence?

A) True
B) False
View Answer / Hide Answer

ANSWER: A) True




29) Which represents persistent global data from the database?

A) Entity Bean
B) Session Bean
C) Both A & B
D) None of the above
View Answer / Hide Answer

ANSWER: A) Entity Bean




30) In EJB transaction management which case of a session bean obtains the UserTransaction object via the EJBContext using the getUserTransaction() method?

A) Bean-managed transactions
B) Container-managed transactions
C) Both A & B
D) None of the above
View Answer / Hide Answer

ANSWER: A) Bean-managed transactions




31) EJB is a specification for J2EE server, not a product; Java beans may be a graphical component in IDE?

A) True
B) False
View Answer / Hide Answer

ANSWER: A) True




32) To run EJB application, you need an application server (EJB Container) such as Jboss, Glassfish, Weblogic, WebSphere etc. It performs which of the following?

A) Life cycle management
B) security
C) transaction management
D) object pooling
E) All mentioned above
View Answer / Hide Answer

ANSWER: E) All mentioned above




33) The EJB container provide services to EJB components they are?

A) Transaction support
B) Persistence support
C) Naming support
D) All mentioned above
View Answer / Hide Answer

ANSWER: D) All mentioned above




34) In which an 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
View Answer / Hide Answer

ANSWER: C) Naming support




35) In Enterprise Beans to accommodate a growing number of users, you may need to distribute an application’s components across multiple machines?

A) Transactions must ensure data integrity
B) The application must be scalable
C) The application will have a variety of clients
D) All mentioned above
View Answer / Hide Answer

ANSWER: B) The application must be scalable




36) A session bean represents a multiple clients inside the Application Server?

A) True
B) False
View Answer / Hide Answer

ANSWER: B) False


Post your comment