You are on page 1of 5

1) Local interfaces have declarative:

a) Transactions and security


b) Transactions only
c) Security only
d) Neither, for performance reasons
2) An entity in a unidirectional relationship that is the target of a role with a cmr
field:
a) Must have local home and component interfaces
b) Must have remote home and component interfaces
c) May have either local or remote interfaces but not both
d) May have any combination of local or remote interfaces.

3) The bean class for an entity that uses the EJB 2.0 model of containermanaged persistence:
a) Must implement java.io.Serializable
b) Is only used for better integration with popular IDEs
c) Must be abstract
d) Must not be abstract
4) Ejb 2.0 ejbSelect methods
a) Abstract methods in the bean class that call a query
b) Local home interface equivalent of a finder method
c) Methods in the component interface that call a query
d) Methods that allows bean developer to choose betn local and remote
interface
5) What executes ejb components?
a) Web server b) application server c) ejb container d) database server
6) How ejb communicates with the ejb container to get runtime context
information ?

a) EJBContext
b) Jndi ENC context
c) EJBHome
d) EJBMetaData
7) Interface using which application create, find and remove ejb?
a) Remote
b) EJBHome
c) EJBObject
d) EntityBean
8) What type of enterprise bean is used to embody business objects ?
a) EnterpriseBean
b) Remote
c) SessionBean
d) EntityBean
9) At what point in the life cycle is a container-managed entity bean considered
created ?
a) Before execution of ejbCreate()
b) After execution of ejbCreate()
c) After the CMP beans data has been committed to the underlying
persistent datastore
d) During the execution of its ejbPostCreate() method
10)

Cmp vs bmp

a) Bmp must implement the ejbLoad and ejbStore methods


b) Bmp can implement persistence to custom datastores such as legacy
system
c) A bmp bean is responsible for managing its own persistence to a
persistence database
d) All of the above

11)

What is DD

a) Xml file format used by the container to learnt about the bean
12)
Both session and entity beans can implement local and remote client
view, but entity bean should go for local client in what situation
a) In case of message driven bean
b) When entity bean is a target of a container managed relationship
c) When entity bean is located in different jvm from the client
d) When application uses session bean as a faade to a set of entity
beans
13)

Message driven bean puts business logic in

a) onMessage method
14)

interface extended by all interface for remote services

a) java.rmi.Remote
15)

while defining remote interface which exception

a) RemoteException
16)
Which is no longer true for the RMI implementation that comes with
java2 platform ?
a)skeleton must be present on server
17) how can client prepare itself for callbacks from the rmi server ?
a) either extends UnicastRemoteObject or call
UnicastRemoteObject.exportObject()
18) remote object proxy used by the client
a) stub
19) tool used to generate the stubs and skeleton
a) rmic
20) which of the following would not locate the remote Calculator service
on machine www.syn.com ( with an IP address is 216.217.9.172) where the
standard RMI registry was used ?
a) Naming.lookup(rmi://www.syn.com/Calculator);

b) Naming.lookup(rmi://216.217.9.172/Calculator);
c) Naming.lookup(rmi://www.syn.com:1199/Calculator);
d) Naming.lookup(rmi://www.syn.com:1099/Calculator);
21) Ejb container decides the boundry of

22) while obtaining initial context client has to pass


a) INITIAL_CONTEXT_FACTORY
b) PROVIDER_URL
23) client invokes create() on cmp. What is the correct sequence
a) container creates EJBObject 1
b) EJB home object invokes ejbCreate() on Bean instance

c) Bean instance is associated with EJBObject 2


d) Container creates new bean instance
e) container calls setEntityContext
f) Container creates bean representation in database 4
g) ejbPostCreate is invoked on bean instance. 5
acbfg
24) while testing cmp , developer discovers that change to one of the beans
properties is not being reflected in the database that contains the bean data.
What are the possible causes.
a) ejbStore has bug
b) ejbCreate has bug
c) setter for the property has bug
d) mapping of container managed fields to a database has a bug
e) dd has bug
f) ejbLoad has bug.

You might also like