ĐỀ THI LÝ THUYẾT EJB

1. Which are features every EJB2.0 container must implement or support? (Choose all that apply) 

A GUI bean deployment utility

Synchronous invocation for all bean types.

Transaction support for all bean types.

Remote client views for all bean types.

JNDI namespace


2. Which are guaranteed capabilities of EJB 2.0? (Choose all that apply)

Local home interfaces for message –driven beans

Dirty detection mechanism to reduce memory footprints.

Run as security identity funtionality.

The JDBC 2.0 extension.

Session Bean failover.

3. Which are features in EJB 2.0 ?(Choose all that apply)

Portable finder query syntax.

Container managed persistence.

Local interfaces for session beans.

XML based deployment descriptors.

Synchronous message-driven beans.

4. A statefull session bean can be shared between multiple client

True

False

5. An entity session bean can be shared between multiple client, as long as the entity being shared is the same.

True

False

6. Stateless session beans are created when the client invokes create on the Home

True

False

7. Statefull session beans are created when the client invokes create on the Home

True

False

8. There must be one stateless session bean per client , for as long as the client holds a reference to an EJBObject

True

False

9. There must be one stateless session bean per client , for as long as the client is in the middle of a business method invocation on the bean.

True

False

10. Each Entity Bean must have its EJBObject 

True

False

11. Which capabilities are provided by both remote and local home interfaces for session beans ( Choose all that apply)

Creating a session object

Removing a session object

Getting a session object’s EJBMeteData

Getting a session object’s handle

12. When locating a session bean’s remote home interface, which are steps that must occur to create a valid home interface reference? (Choose all that apply)

The session context must be narrowed, and the narrowed result cast.

The result of the JNDI lookup must be narrowed, and the narrowed result cast.

The initial context must be narrowed, and the narrowed result cast.

The result of the JNDI lookup must be cast to an initial context, and then narrowed re

13. Which statement(s) about session bean are true?(Choose all that apply)

The bean provider must write the method public void remove() in both stateless and stateful session classes.

Local clients can remove session beans by calling a method on the bean’s home.

The remove() method in the component interface can be used on ly by remote clients.

To ask the EJBHome to remove a session bean. The client must provide the bean’s handle.

14. What does the EJB specification architecture define ?
Transactional components.

Distributed object components.

Server-side components.

All of the options.

15. What executes EJB components ?
A web server.

An application server.

An EJB container.

A Database Server

16. Through what interface does an application create, find, and remove enterprise beans ?

java.rmi.Remote

javax.ejb.EJBHome

javax.ejb.EJBObject

javax.ejb.EntityBean

17. What is a deployment descriptor ?

An XML file format used by the container to learn about the attributes of a bean, such as transactional characteristics and access control

A method for transporting enterprise beans back and forth between systems

An XML file used by enterprise bean clients to learn about the attributes of a bean, such as access control and transactional characteristics.

A format for bundling enterprise beans for delivery to customers

18. What distinguishes a bean-managed persistent (BMP) enterprise bean from a container-managed persistent (CMP) enterprise bean ?

A BMP bean must implement the ejbLoad() and ejbStore() methods

A BMP bean can implement persistence to custom datastores such as legacy systems

A BMP bean is responsible for managing its own persistence to a persistent datastore

All of the options

19. When you pass a Remote object to or from a remote method, what is really passed ?

The Remote object reference

A local copy of the remote object.

None of these

The Remote object's stub

20. A Message-driven bean:

Has a client view

Doesn't feature a component interface.

Has a Remote interface

Has a local interface

21. __________cannot be used for messaging between enterprise applications

SMS

Email

JMS

EJB

22. Session beans have a lifetime as long as that of____________

The client

The transaction

The database

The server connection

23. Message-Driven Beans are created and controlled by ____________

EJB Entity beans

EJB Session beans

EJB Container

EJB Server

24. A: The serialization of a graph converts it into a bit stream B: This enables the developer to push the data over a network or to save the stream to storage.

A is true

B is false

Both A and B are false

Both A and B are true

25. Entity beans contain ____________, which is very different from what session beans contain

Container –Managed Persistence

Bean managed persistence

All of the options

None of the options

26. A JVM crash affects:

The entity bean

The session bean

The Message-Driven bean

None of the options

27. Entity beans are called durable objects because

They have container bean persistence

The state of an entity bean is permanently stored in the database

All of the options

None of the options

28. The CMP provides the advantage of:

Database independence as well as portability

Not having to write the logic for storing fields in the database

All of the options

None of the options

29. In ____________ unidirectional relationship, there is a one - way navigation between bean instances and related bean instances

one – to – one

one – to – many

None of the above

All of the above

30. The ___________ element specifies that, within a particular relationship, the lifetime of one entity bean depends on another entity bean

cascade - delete

relationship – role – source

ejb – name

None of the options

31. Represents relationship between two entities that cannot exist without one another:

Realization

Composition Aggregation

Basic Aggregation

Generalization

32. In the ___________you can set the relationship field using the < cmr-field > elements

jboss.xml

jbosscmp-jdbc.xml

ejb-jar.xml

web.xml

33. Returned DataType of ________ method is Primary Key

ejbCreate()

ejbFindByPrimaryKey()

All of the the options

None of the options

34. Topics are used for implementing the ____________ model

Publish/Subscribe

Peer to peer

Point to Point

Client/Server

35. Queues are not used for implementing the ____________model.

Publish/Subscribe

Peer to peer

Point to Point

Client/Server

36. ____________are not used for accessing administered objects configured on an Application Server

JMS

JNDI

JDBC

EJB

37. ____________ interface is used for receiving messages asynchronously.

MessageListener

QueueListener

TopicListener

JMSListener

38. Which of these is not a part of the three parts that make up the three-tier structure in EJB?

The Client

The EJB Server

The Database

The Application - Assembler

39. Entity beans are ____________of the underlying data

Object representations

Direct copies

All of the options

None of the options

40. A message-driven bean can not be accessed by client applications by sending messages to the ____________

JMS destination

EJB container

EJB Server

Message-driven bean itself

41.  Which of these is not a feature of EJB containers?

Transaction support

Security support

Message sending

Persistence management

42. For every ejbCreated() method, there has to be a corresponding_____method

ejbLoad()

ejbRemove()

ejbPostCreate()

create()

43. The unsetEntityContext() method is not used to:

Release the bean-dependent resources

Dissociate the bean from the context object

Free connection instances

Destroy enbtity bean instances

44. Callbacks to the container are not performed using the______________

Enterprise beans

Security Context

EJB Objects

EJB Context Objects

45. Transaction processing in enterprise applications is done with the involvement of the following:

Application Components

Resource Managers

Transaction Manager

All of the above

None of the above

46. This primary key class is valid because

It is not serializable

The public fields are from the home class container fields

All of the above

None of the above

47. The ______________is a middleman that is used to store status information about the bean

Enterprise beans

Security Context

EJB Context Objects

EJB Objects

48. The ______________ method ensures that a caller falls into a particular security role.

isCallerInRole()

getHome()

getCallerPrincipal()

getUserTransaction()

49. What are the tags not to set the security roles in the deployment descriptor?

< security-role-ref >

< security-identity >

< security-role >

< role-name >

50. The ______________ method do not return the security identity of the client.

getHome()

getRololbackOnly()

getCallerPrincipal()

getUserTransaction()
mẫu web bán hàngLiên hệ
Site map
in hóa đơn gtgt - in hóa đơn gtgt - in hóa đơn gtgt