Professional Documents
Culture Documents
4. The client side is more complex than the server side [0.5]
a) True b) False
a) Component c) Chunk
b) Container d) Logic
6. Which of the following statements is false with respect to a distributed [1.5]
application.
a) DCOM c) RMI
b) COM d) CORBA
a) remote c) public
b) distributed d) local
11. Which of the following lines pertaining to local objects are true. [2.0]
13. The J2EE platform does not contain middleware services. [0.5]
a) True b) False
a) 1 – a, 2 – b, 3 – c, 4 – d c) 1 – d, 2 – b, 3 – a, 4 – c
b) 1 – c, 2 – a, 3 – d, 4 – b d) 1 – d, 2 – c, 3 – b, 4 – a
15. Multiple connections from the client are taken care of by the [0.5]
__________________.
17. Socket communication is ideal for exchanging files or small amounts of [0.5]
data.
a) True b) False
18. The RMI defines the difference between _______________ and [1.0]
_______________ objects.
a) public/global c) remote/local
b) distributed/concentrated d) random/definite
20. Method calls by the client, to the remote object leads to an invocation [1.5]
of a method on the _________which in turn passes control to the
_________________ layer.
a) True b) False
a) tag c) connection
b) reference d) loop
23. Arrange the Events given below in the correct sequence. [2.5]
1)The skeleton contacts the remote registry.
2)The object method is called.
3)Invocation of the stub.
4)Result is passed to the client object.
Forwarding the request the reference layer.
a) 2 – 5 – 3 – 4 – 1 c) 3 – 5 – 1 – 2 – 4
b) 1 – 2 – 3 – 4 – 5 d) 4 – 1 – 5 – 2 – 3
a) True b) False
28. Which of the following classes belong to the java.rmi package. [1.0]
a) MarshalledObject c) Naming
b) RegistryHandler d) Skeleton
b) RMISecurityManager e) Naming
c) RegistryHandler
30. Arrange the order in which a remote object will be created and [2.0]
registered.
b) 3 – 2 – 1 – 5 – 4 d) 2 – 4 – 1 – 5 – 3
31. The interfaces and classes of the __________________ package are [1.0]
used to handle and register remote objects by name.
a) True b) False
33. The client object can call all the methods of the remote object. Do you [1.0]
agree with this statement?
a) Agree b) Disagree
a) getData() c) getDataNum()
b) RemoteException d) interface
35. The statements given below define the implementation of the Remote [2.0]
Interface. Which of these is not true.
import java.rmi.;
a) None c) Five
b) Four d) Two
37. Which of the following lines of code will be required to register the class ‘Myex’, where [
the name of the host machine is stored in ‘hostName’ and the name used by the client to
call the remote object is ‘myobj’.
38. The _______________ compiler is used to register the class that [1.0]
implements the remote interface, with the remote registry.
a) rmi c) rmic
b) class d) java
39. When the compiler is executed for the ‘Myex.class’ program, then the [1.5]
following files are generated. (Choose the correct answer/s).
a) Myex.java c) Myex.class
b) Myex_Stub.class d) Myex_Skel.class
40. The command required to start the RMI registry is [1.5]
____________________
41. For listening to incoming requests the RMI registry uses port [1.0]
___________.
a) 1024 c) 1099
b) 65535 d) 1020
42. The client is able to directly code the container. Do you agree with this [0.5]
statement?
a) Agree b) Disagree
a) 1 – a, 2 – b, 3 – c, 4 – d c) 1 – d, 2 – c, 3 – b, 4 – a
b) 1 – b, 2 – d, 3 – a, 4 – c d) 1 – c, 2 – a, 3 – d, 4 – b
46. The EJB ___________ consists of the EJB ____________, which in [1.5]
turn contains the EJB ___________.
a) components/container/server c) container/server/components
b) server/container/components d) components/server/container
a) Client d) Database
Home interface
a) ODBC c) JDBC
b) MS-SQL d) server
49. Interaction with the bean by the client is done using the [1.0]
_____________ interface and the ___________ interface.
a) home/remote c) user/EJB
b) database/server d) random/client
50. The ___________________ acts as a buffer between the bean and [1.0]
the outside world.
a) Component c) Container
51. Which of the following statement is false with respect to the EJB [2.0]
container.
52. The EJB object and EJB home for a bean are managed by the [0.5]
container.
a) True b) False
a) LDAP 1. SUN OS
b) NDS 2. Netscape
c) NIS 3.Novell
a) class/library c) client/server
b) name/object d) file/directory
57. Marshalling is the process that converts arguments and return values [2.5]
into ___________________ that can be sent over the network.
58. Stub file resides on the server. State whether the statement is true or [2.5]
false.
a) True b) False
a) beans/server/container c) server/component/database
interface/middleware/hardwar
e
b) client/object/component d)
60. The container along with all its interfaces resides in the [0.5]
___________________.
a) client c) beans
b) object d) server
c) SQL server
63. Which of the following is not a function of the application server [1.5]
a) True b) False
b) 1 – d, 2 – c, 3 – a, 4 – b d) 1 – c, 2 – a, 3 – b, 4 – d
66. As of now, the terms container and EJB server in EJB can be used [1.5]
inter-changeably. Do you agree with this statement?
a) Agree b) Disagree
67. Adaptation of the access level of beans to fit into a particular system is [1.0]
done by the system administrator.
a) True b) False
68. The management tools used by the EJB server and container are 1.0
controlled by the _________________.
69. Identify the services that the container or the server fails to provide [2.0]
70. The properties that characterize transactions are known as ACID [0.5]
properties.
a) True b) False
a) Start c) Initial
b) Begin d) First
a) True b) False
a) TX_NOT_SUPPORTED d) TX_NOT_REQUIRED
b) TX_SUPPORTS e) TX_REQUIRES_NEW
c) TX_REQUIRED
74. The person deploying the bean specifies the ________________ for [1.5]
that bean for better __________________.
b) Start/durability d) ACL’s/security
a) True b) False
a) True b) False
77. For efficient management of multiple instances, the server performs a [2.0]
variety of tasks. Which of the tasks mentioned below, is not one of
them.
a) Instance passivation c) Message pooling
79. The specifications set by EJB need not match with those of the [0.5]
component interface.
a) True b) False
80. When the client calls a bean, it can in turn call another bean. Do you [1.0]
agree with this statement?
a) Agree b) Disagree
Session Bean
82. A session bean being used by a client can also be used by another [0.5]
client.
a) True b) False
84. Once the client ceases to exist, the session bean is also destroyed. [0.5]
State True or False.
a) Yes c) No
85. Suppose in a garment shop, a request is made for all the colors [1.5]
available in a particular garment along with the all the sizes and their
respective prices, then which session bean will be used to handle such
processes?
a) True b) False
91. Which of the following statement does not represent an entity bean. [1.5]
92. The life of an entity bean is as long as the client session. [0.5]
a) True b) False
93. If a ______________is being used then all the operations need to be [0.5]
written by the developer to a persistent API.
a) Bean-Managed persistent b) Container-Managed
entity bean. persistent entity bean.
a) Transaction c) Task
b) State d) Process
a) Distributed/individual c) Networked/single
b) Separate/distributed d) Whole/networked.
a) True b) False
99. The implementation of a session bean is the same as an entity bean. [1.5]
Do you agree with this statement? Select the correct reason to
support your answer.
100. The bean class has to portray a set of methods specific to beans, [1.5]
when the ________________________ as per the EJB specification
are implemented.
a) Components c) Interfaces
b) Containers d) Objects
102. What takes place when a client invokes a method on a bean? [1.5]
104. Which of the following statements is not true regarding an EJB object. [2.0]
105. The interface, which duplicates the methods exposed by the bean [1.0]
class, is called the _______________.
106. Which of the following functions does the remote interface perform? [1.5]
a) Persistence c) Security
b) javax.ejb.EJBObject d) java.rmi.Remote
108. Which of the following is not a method of the EJB object. [1.5]
a) getEJBHome() c) isidentical()
b) remove() d) getEJBMetData()
a) delete() c) getHandle()
b) remove() d) erase()
110. The client code which invokes methods on the EJB object is in the [1.0]
form of:
c) Applets
111. The client is unaware of the physical location of a remote object in [0.5]
EJB. Do you agree with this statement?
a) Agree b) Disagree
114. Which of the following is not the responsibility of the EJB home object. [1.5]
a) True b) False
117. Can a blank method be added in Home interface as per EJB 1.1 [1.0]
spec?
a) True b) False
118. Deployment properties are stored in a _______________________ [2.0]
file.
a) Java c) HTML
b) Class d) XML
a) Agree b) Disagree
120. Generation of the EJB object, and the home objects, and tuning the [0.5]
bean, are functions that have to be performed by the
___________________.
a) Deployer c) Container
b) Developer d) Client
122. Session beans are able to survive machine crashes. Do you agree [1.0]
with this statement? Give reasons for your answer.
a) Stateless b) Stateful
125. The methods implemented by the session beans are available to the [1.0]
clients.
a) True b) False
126. Which of the following is a callback method that the container makes [1.0]
use of.
a) setSetContext(Session c) ejbActivate()
Context ctx)
b) ejbCreate() d) ejbRemove()
127. The ejbpassivate() method is called before the bean is passivated. [0.5]
a) True b) False
128. Deployment descriptors are ______________ that describe the bean [2.5]
and some of its runtime behavior to the container.
b) interfaces d) beans
129. The ejb-jar.xml file may or may not be present in the directory called [0.5]
META-INF.
a) False b) True
a) True b) False
b) d)
a) javax.ejb.DeploymentDescriptor c) javax.ejb.ControlDescriptor
b) javax.ejb.deployment d) javax.ejb.descriptor
a) setSetContext(Session c) ejbActivate()
Context ctx)
b) ejbCreate() d) ejbRemove()
133. The container may not call the ejbRemove() method. Why? [1.5]
134. Study the code given below. The method simpleint() given below is [2.0]
an example of _____________
Import java.ejb.*;
Public class sess implements SessionBean
{
public int simpelint(int pi,int rate,int tm )
{
return (pi + (pi * rate * tm / 100);
}
.....
}
b) name/object d) client/network
138. The major advantage of bean pooling is that there is maximum [0.5]
utilization of time and resources.
a) True b) False
139. The client creates and destroys the bean. [0.5]
a) True b) False
140. Point out the error in the following code, assuming that a remote [2.5]
interface ‘myeg’ has already been created.
1) import javax.ejb.*;
2) import java.rmi.*;
141. While defining the bean class, are the following statements valid: [2.5]
………………
………………
public void ejbActivate(){}
public void ejbPassivate(){}
public void ejbRemove(){}
………………………..
142. Which of the following methods of stateless session beans never have [2.5]
their callback methods invoked.
a) SetSetContext(Session d) ejbRemove()
Context ctx)
b) ejbCreate() e) ejbPassivate()
c) ejbActivate()
143. The arguments and return type for each method should be [2.0]
serializable.
a) True b) False
144. The process of swapping out a bean and saving the conversational [1.0]
state to a storage device is known as ___________.
a) Activation c) Swapping
b) Passivation d) Pooling
a) no c) many
b) one d) few
146. The activated bean is always the original bean instance that was [0.5]
passivated.
a) True b) False
148. Once the server has been started, the client code can be executed [1.0]
from the same window.
a) True b) False
149. Arrange the activation process in the proper sequence. [2.0]
1) Serialize the bean state.
2) Conversational state is read back into memory.
3) The ejbActivate() method restores the resources of the bean.
Container reconstructs the memory state.
a) 2 – 4 – 1 – 3 c) 3 – 1 – 2 – 4
b) 1 – 2 – 3 – 4 d) 3 – 2 – 4 – 1
System.setProperty("java.naming.factory.initial",
"org.jnp.interfaces.NamingContextFactory");
System.setProperty("java.naming.provider.url",
"192.9.200.9:1099");
…………
public int myvar;
…………..
public void ejbCreate(int myvar) throws CreateException
{
this.myvar = myvar;
…………….
}
1) import javax.ejb.*;
2) import java.rmi.RemoteException;
153. Assume that the files Myeg, Myeghome and Myegbean representing [2.5]
the remote interface, home interface and the bean class
respectively, have been created in the myeg directory. What will
the following command do:
154. Assume that the files Myeg, Myeghome and Myegbean representing [2.5]
the remote interface, home interface and the bean class
respectively, have been created in the myeg directory. What will
the following command do and will this jar file work with the client
code?
155. Assume that the files Myeg, Myeghome and Myegbean representing [2.5]
the remote interface, home interface and the bean class
respectively, have been created in the myeg directory. Will the
following command work with the client code. Give reasons for
your answer.
a) Yes it will work normally with c) No it will not work with the
the client code. client code, as the files in
the META-INF directory are
not included.
a) execute c) run
158. The passivation process is the opposite of the activation process. [0.5]
a) True b) False
a) a single/multiple c) one/many
b) multiple/single d) no/multiple
a) True b) False
162. Data needs to be pushed to the stateful session bean for every [0.5]
method invocation.
a) True b) False
163. The conversation with the client ___________________ be lost, due [1.0]
to caching of client conversation, while using stateful session beans.
164. What are the don’ts while using stateful session beans? [1.5]
a) Always keep the c) Try to use EJB products that
conversation long. persists stateful
conversations.
165. The rules for the conversational state are put forward by [2.0]
______________________.
a) ejbPassivate() c) ejbCreate()
b) ejbActivate() d) ejbremove()
167. Which of the following files is not included in the .jar file. [1.5]
168. To be able to execute the bean, the .jar file needs to be copied to the [1.0]
______________________ directory of the server.
a) bin c) deploy
b) META-INF d) current
169. Stateful session beans tend to be specific to one scenario. Do you [2.0]
agree with this statement?
a) True b) False
170. Stateful session beans are dedicated to _____________ client/s and [2.5]
have a preset __________________ period.
a) few/time c) one/timeout
a) True b) False
a) container/server c) server/component
173. Since the stateless session bean does not contain any [2.5]
_______________________ information, there is
_______________________ between one client and the next.
174. Stateless session beans often perform services that are fairly generic [2.0]
in nature and are reusable. Do you agree with this statement.
a) Yes b) No
176. To be able to deploy entity beans, the EJB container has to be [1.0]
compliant with Enterprise JavaBeans version 1.0.
a) True b) False
177. Which of the following sentences differs in meaning with respect to the [2.0]
other three.
180. The capturing of Java Objects in their current state for permanent [1.0]
storage is known as ______________________.
182. Which of the following statements is not part of the Java object [2.0]
serialization process.
a) Object c) Complex
b) Simple d) Relational
184. The process of querying stored objects using objects serialization is [1.0]
_________ and __________.
a) Cheap/simple c) Expensive/cumbersome
b) Cheap/cumbersome d) Expensive/simple
186. Arrange the sequence in which the object is read back from a [2.0]
relational database.
a) 1 – 2 – 3 c) 2 – 1 – 3
b) 3 – 2 – 1 d) 2 – 3 – 1
a) True b) False
189. Sun’s JavaBlend and Object People’s TOP link are examples of a/an [1.0]
_________ product.
b) Hand-craft d) Object-relational
a) True b) False
191. OQL stands for _____________. [0.5]
192. Which line does not describe the object database management [1.5]
system.
a) True b) False
195. The calculation of the salary of an employee will be handled by the [1.5]
________________________ component.
197. Which of the statements given below does not answer the following [1.5]
question.
Why is data treated as an object?
199. Which of the following statements is false regarding entity beans. [1.5]
a) Entity beans may last for years c) The entity bean instance is
an instance of the entity
bean class.
200. Which of the following files is not included into the entity bean. [1.5]
a) The entity bean class c) The primary key class
201. What does an instance of an entity bean represent as per EJB1.1 [2.0]
Specification
202. Standard call back methods to manage an entity bean are a must. [1.0]
a) True b) False
203. Invoking of an entity bean is done with the help of the ____________, [1.5]
whereas the client does the creation of the entity bean with the help of
the __________.
a) object/objects c) table/rows
b) interface/objects d) unique ID/beans
206. Suppose there are 100 employee details entity beans then there will [0.5]
be 100 unique IDs.
a) True b) False
a) remote c) serializable
208. The deployment descriptors for the session beans and the entity [0.5]
beans are the same.
a) True b) False
209. The reading and the alterations to the database can be done only [1.0]
within the ________________.
b) bean d) JVM
a) Same c) Neutral
a) A single c) Two
b) Multiple d) No
213. Unlike the remote interface and the home interface the primary key is [2.5]
a ___________ and its definition is bound to a _____________
definition.
a) CMP c) Object-relational
management
215. The _ method reads the data from the persistent storage into the in- [0.5]
memory fields of the entity bean.
a) ejbLoad() c) ejbCreate()
216. The developer is able to call the ejbStore() method explicitly. [0.5]
a) True b) False
a) one c) three
b) two d) none
218. The _____________ method is used to transition a bean form the [1.5]
instance pool, while ________ is used to send the bean into the pool
instance.
a) ejbLoad/ejbStore c) ejbActivate/ejbPassivate
a) True b) False
220. Using the SQL construct UPDATE through JDBC to update data in a [2.0]
relational database is an example of ________________.
a) CMP c) Object-relational
management
221. Can a blank method be added in the home interface as per EJB 2.0 [2.5]
spec?
a) True b) False
a) Be created c) Be modified
b) Represent legacy systems d) Do without a primary key
224. The EntityContext is relevant to the bean during the call to the [2.5]
_________________________ method.
a) ejbPostCreate() c) ejbActivate()
b) ejbCreate() d) ejbPassivate()
226. The methods to find an entity bean are listed in the [1.0]
__________________________.
227. Creation and modification of entity beans can be done by directly [0.5]
accessing the database.
a) True b) False
a) setSessionContext(SessionContex c) ejbLoad()
t ctx)
b) unsetEntityContext() d) ejbActivate()
230. The ejbCreate() method is compulsory with entity beans if the [0.5]
underlying database data needs to be created.
a) True b) False
231. Which of the following statements is not true while using the [2.0]
ejbCreate() method with entity beans.
b) Component d) Client
233. Which of the following is not a rule for finder methods: [2.0]
234. Even if the client times out, the ejbRemove() method is called. [0.5]
a) True b) False
236. The context object adds new methods which are: (choose the correct [1.5]
answer/s)
a) setEntityContext() c) getEJBObject()
b) unsetEntityContext() d) getPrimaryKey()
237. The finder methods defined in the _________________ should match [2.5]
the ejbFind methods in the actual __________.
238. The call back methods invoked on BMPs by the container are defined [1.0]
in the ____________________ interface.
a) javax.ejb.EnterpriseBean c) javax.ejb.EntityBean
a) 1 – b, 2 – d, 3 – a, 4 – c c) 1 – d, 2 – c, 3 – b, 4 – a
b) 1 – b, 2 – c, 3 – d, 4 – a d) 1 – a, 2 – b, 3 – c, 4 – d
a) ejbLoad() c) setEntityContext()
b) ejbCreate() d) unsetEntityContext()
241. The ejbLocate() method is used to locate the existing entity bean data [1.0]
instances from within the persistent storage. Do you agree with this
statement?
a) Agree b) Disagree
242. The container creates EJB objects to associate it with bean instances [0.5]
_____________ the data is located and its primary key sent back to it.
b) before
a) ejbPostCreate() c) ejbLoad()
a) ejbPostCreate() c) ejbLoad()
245. For the ejbActivate() method to function properly, socket connections [0.5]
are important.
a) True b) False
246. The ________ method tells the bean when the data has to be loaded, [1.5]
with the _________ method and also destroyed with the
_______________ method.
a) setEntityContext()/ c) ejbPrimaryKey()/
ejbStore()/ejbDestroy() ejbActivate()/ejbPassivate()
b) FindByPrimaryKey()/ d) getPrimaryKey()/
ejbCreate()/ejbPassivate() ejbLoad()/ejbRemove()
a) explicitly c) directly
248. All the resources allocated to the bean needs to be released, which is [0.5]
done using the ejbRemove() method.
a) True b) False
a) ejbCreate() c) ejbRemove()
b) ejbActivate() d) setEntityContext()
a) names/arguments/exception c) logic/names/signatures
s
252. The major difference between the ejbFind methods of the home [2.5]
interface and the bean class is :
254. It is possible to write ejbFind methods, which will return arrays using [2.0]
the current version of EJB.
a) True b) False
a) Two/two c) Multiple/multiple
b) A single/one d) A single/multiple
256. The state of a bean instance should always be up-to-date with the [2.0]
_________.
a) Bean c) Database
b) Container d) Server
a) FinderException c) ExceptionCreate
a) create() c) ejbmake()
b) ejbCreate() d) ejbActivate()
259. The findByPrimaryKey() method throws the _________ exception if no [2.5]
matching records are found in the database.
a) ObjectNotFoundException() c) RecordNotFoundException()
b) Null d) RemoteException()
260. ___________ methods are called by the container to manage the [0.5]
bean.
a) True b) False
a) unsetEntityContext() c) ejbPassivate()
b) ejbActivate() d) ejbStore()
263. The _____ file is the interface used by jBoss to access the database. [0.5]
a) ejb-jar.xml c) jboss.xml
264. Which of the following files lists the details of the classes and type of [1.0]
the bean along with the name of the primary key.
a) ejbjar.xml c) jboss.xml
a) one c) multiple
b) zero d) none
a) getConnection c) DriverManager
b) Connect d) Driver
a) ejbCreate() d) findByPrimaryKey()
c) ejbLoad()
a) True b) False
269. The data access logic is performed by the __________ in a BMP, [1.0]
whereas in CMPs it is performed by the ______.
a) Bean c) Container
271. Which of the following statements is not true with respect to CMPs. [2.0]
272. Which of the statements given below, regarding the primary key with [2.0]
respect to entity beans is true.
b) Asynchronous d)
274. How does the entity bean know that the database has changed? [2.5]
275. In BMPs, the fields in the primary key class have to come from the [1.0]
container-managed fields of the entity bean class.
a) True b) False
276. The definition of a primary key class is normally bound to the [2.0]
________________________ definition.
a) True b) False
278. Study the code for the primary class definition given below and point [2.5]
out the errors in it.
import java.io.Serializable;
4. public MyegPK () {}
………………
………………
}
a) error in line 2 c) error in line 5
Is the toString() method given in the above code fragment a valid one.
a) valid b) invalid
a) 1 – a, 2 – b, 3 – c, 4 – d c) 1 – c, 2 – a, 3 – d, 4 – b
b) 1 – b, 2 – c, 3 – a, 4 – d d) 1 – a, 2 – d, 3 – b, 4 – c
281. Requests for resources needed by the instance are made by using the [1.0]
________ method.
a) ejbActivate() c) setEntityContext()
b) ejbPassivate() d) unsetEntityContext()
282. The _______ method should be used in CMP for checking the client [1.0]
parameters.
a) ejbCreate() c) ejbActivate()
b) ejbPostCreate() d) ejbFind()
283. The variable ‘ct’ is used in a CMP entity bean, to indicate whether a [1.5]
row in the database has been updated or not. Which method can be
used to reset the value of the variable ‘ct’.
a) ejbCreate() c) ejbLoad()
b) ejbPostCreate() d) ejbStore()
284. When the container needs to call a bean from the pool and ready it, [1.0]
the method called is:
a) ejbActivate() c) ejbPassivate()
b) ejbStore() d) ejbLoad()
a) ejbStore() c) ejbCreate()
b) ejbRemove() d) ejbLoad()
a) True b) False
a) ejbLoad()/ejbStore() c) setEntityContext()/
unsetEntityContext()
288. All resources have to be released before the _________ method is [1.0]
called.
a) ejbActivate() c) setEntityContext()
b) ejbPassivate() d) ejbPostCreate()
a) True b) False
a) Remote b) Home
293. The container calls the ____________ method before terminating the [1.5]
life of the entity instance.
a) setEntityContext() c) ejbRemove()
b) unsetEntityContext() d) ejbPassivate()
294. The _______ and _____ methods are associated with the birth of the [1.5]
object.
a) ejbActivate()/ejbPassivate() c) ejbCreate()/ejbPostCreate()
295. The ________ and ____ methods can be invoked by the container [1.5]
any number of times.
a) ejbActivate()/ejbPassivate() c) ejbCreate()/ejbPostCreate()
296. When the transition from the ready state to the pooled state is made, [2.5]
the _______ call is made, whereas the transition back to the ready
state from the pooled state results in the ___________ call.
a) ejbLoad()/ejbStore() c) ejbCreate()/ejbPostCreate()
b) ejbPassivate()/ejbActivate() d) ejbActivate()/ejbPassivate()
297. The code in an individual EJB component can be modified without [1.0]
requiring a change to the interface.
a) True b) False
298. The home interface can have __________________________ create [2.0]
method/s and ___________________________ find method/s.
299. A lot of bugs are found in the CMP bean.java class. [0.5]
a) True b) False
a) private c) void
a) ejbLoad() c) setEntityContext()
b) ejbActivate() d) ejbCreate()
302. For the code of the container to be made available, it has to be [1.0]
__________.
a) compiled c) written
b) decompiled d) generated
303. Study the code fragment given below, which consists of the bean [2.5]
class definition. Is it a valid one, i.e., can the code consist of two
ejbCreate() methods.
import javax.ejb.EntityContext;
………………
public class MyegBean implements EntityBean
{
…………………
a) True b) False
305. In EJB, the important beans need to determine the information about [0.5]
their status during runtime.
a) True b) False
b) d)
306. Which of the following information is not stored in the context object. [1.5]
307. The EJB context object can also be called the ____________ to the [1.0]
container.
a) Interface c) Client
309. Callbacks help the beans to determine their present status. [0.5]
a) True b) False
311. The context object acts as middleman for storing __________ about [1.0]
the bean.
a) Data c) Status information
a) getHome() c) getTransaction()
b) getRollbackOnly() d) getEnvironment()
313. The ________ object is used by the bean to create, find or destroy an [1.0]
EJB object.
a) getHome() c) getCallerinRole()
b) Home() d) setRollbackOnly()
314. Information like the location of a file can be obtained from the [1.0]
__________ object
a) getHome() c) getProperties()
315. The ________________ method returns the security identity of the [1.0]
client.
a) isCallerinRole() c) CallerIdentity()
b) getCallerIdentity() d) setCallerIdentity()
a) isCallerinRole() c) isCallerRole()
b) getCallerIdentity() d) setCallerinRole()
317. A Boolean value is returned by the ________________________ [1.0]
method.
a) setRollbackOnly() c) RollbackOnly()
b) getRollbackOnly() d) setRollback()
a) True b) False
a) SessionContext c) EntityContext
b) EJBContext d) Context
a) Context c) Object
b) Method d) Class
322. To associate an entity bean with a particular context, a call is made to [0.5]
__________.
a) setSessionContext(SessionContex c) setEntityContext(EntityContex
t ctx) t ctx)
b) javax.ejb.SessionBean d) javax.ejb.EntityBean.
323. The method body of a callback method can be left blank in the bean [0.5]
class.
a) True b) False
a) True b) False
a) setEJBObject() c) getEJBReference()
b) getEJBObject() d) setEJBReference()
326. As in Java, it is also possible in EJB to use the ‘this’ keyword for self- [1.0]
reference by a bean.
a) True b) False
327. Which of the following correctly represents the interface for the entity [2.5]
context.
a) setEntityContext() c) getEJBObject()
b) unsetEntityContext() d) removeEJBObject()
329. The two important security aspects in EJB are _________ and [1.0]
__________.
a) username/password c) authentication/authorizatio
n
330. An online shopping mall has given all its customers a unique customer [1.5]
id, which the client needs to enter whenever he/she logs on to that
site. The id is verified and only then is the customer allowed to
proceed further. This is an example of:
a) Authorization c) Validity
b) Authentication d) Identification
332. An online shopping mall has given all its customers a unique customer [1.5]
id, which the client needs to enter whenever he/she logs on to that
site. Based on the customer id, the customer is allowed a certain
amount of discount on particular products. The id is verified and only
then the customer is allowed to proceed further and is taken to the
relevant page for shopping. This is an example of:
a) Authorization c) Validity
b) Authentication d) Identification
333. The two ways of performing authorization are _______ and [1.0]
_________.
a) Authenticative/configuration c) Creative/development
334. Which of the following steps are not performed during declarative [1.5]
authorization.
335. The EJB context needs to be queried during security authorization. [0.5]
a) True b) False
336. The methods available for programmatic authorization are ________ [1.5]
and __________.
a) setRollbackOnly() / c) isCallerInRole(identity
getRollbackOnly() role)/ getCallerIdentity()
337. The isCallerInRole(identity role) checks the security role defined in the [1.0]
__________________.
a) True b) False
343. Which of the following statements is not true with respect to security [2.0]
propagation.
a) runAsMode c) SYSTEM_IDENTITY
b) runAsIdentity d) CLIENT_IDENTITY
a) 1 – a, 2 – b, 3 – c c) 1 – c, 2 – a, 3 – b
b) 1 – c, 2 – b, 3 – a d) 1 – b, 2 – c, 3 – a
346. Assume that there are two containers A and B. Container A calls a [2.0]
method in Container B, then the security context of container A be
passed on to container B
a) True b) False
b) objects d) containers
348. In a system where only certain users can update information, while [2.0]
others can only view this data, is an example of:
350. As per EJB specifications every client application accessing an EJB [2.5]
system should be associated with a
________________________________ object.
a) java.security c) java.Identity
352. When a client logs on to an EJB system, it is associated with a/an [2.5]
______________________ for the duration of that session.
353. The _____ keeps track of every client and its Identity object. [2.5]
354. ___________ are services, which are required for robust server-side [1.0]
development.
a) True b) False
a) Performed/transactions c) Omitted/beans
b) Written/container d) Avoided/EJB
357. Exceptions can be used to solve atomic problems. However, it has its [1.5]
disadvantages. Which of the following statements is not a
disadvantage.
358. Incase of network crash, an exception will be thrown back to the client [1.0]
code, which will help distinguish when the crash occurred. Do you
agree with this statement?
a) Agree b) Disagree
359. With the help of transactions, multiple users can share data as it [2.0]
performs various functions. Which one is not one of them?
362. The ________________ represents storage from where one can read [0.5]
and write.
363. The ____________________ also manages the state of the bean. [0.5]
a) Container c) Consistency
b) Component d) Class
365. Multiple operations when grouped together to appear as one unit of [1.0]
work is called __________.
a) A database c) Atomicity
367. __________ ensures that a transaction leaves the system’s state as [1.0]
consistent once the transaction is completed.
a) Atomicity c) Isolation
b) Consistency d) Durability
368. The major advantage of isolation is that the client feels that [1.5]
______________________.
370. _____ ensures that updates to the managed resources are able to [0.5]
survive failures like network crashes.
a) Atomicity c) Isolation
b) Consistency d) Durability
371. The two major transactional models are __________ and [1.0]
_____________.
a) Flat transactions/nested c) Durable
transactions transactions/consistent
transactions
b) Atomic transactions/Isolated
transactions
372. Which of the following statements do not represent a flat transaction. [1.5]
375. Consider the following scenario. The salary of several employees is [2.5]
being calculated using transactions, where first the number of working
days for an employee is calculated and stored in the database, and
nested within it the additional perks are calculated which is based on
the number of working days. Subsequently, the database is updated
with the perk amount. Suppose the calculation of an employee’s perk
amount fails for some reason, then the database will represent:
a) The original state, i.e., even c) The present state, i.e., the
the number of working days number of working days and
will not be stored. some junk perk amount will
be stored
376. Consider the following scenario. The salary of several employees is [2.5]
being calculated using transactions, where first the number of working
days for an employee is calculated and stored in the database, and
nested within it the additional perks are calculated which is based on
the number of working days. Subsequently, the database is updated
with the perk amount. Suppose a rollback is performed during the
calculation of an employee’s perk then the database will represent:
a) The original state, i.e., even c) The present state, i.e., the
the number of working days number of working days and
will not be stored. some junk perk amount will
be stored
377. Which of the following is supported as per the EJB specification. [1.0]
378. A transaction starts with a __________ and finishes with a _______. [1.0]
a) Begin/end c) Commit/abort
a) Programmatic c) Chained
b) Declarative d) Nested
a) Isolation c) Atomicity
b) Consistency d) Durability
382. _______ isolation levels ensure low levels of performance, whereas [1.0]
_______ isolation levels lead to high performance.
a) Loose/stringent c) lower/great
384. The ____________ mode offers performance at the highest level. [0.5]
a) TRANSACTION_READ c) TRANSACTION_REPEATABLE
_UNCOMMITTED _READ
b) TRANSACTION_READ d) TRANSACTION_SERIALIZABLE
_COMMITTED
a) TRANSACTION_READ c) TRANSACTION_REPEATABLE
_UNCOMMITTED _READ
b) TRANSACTION_READ d) TRANSACTION_SERIALIZABLE
_COMMITTED
386. Reading of uncommitted data from the database represents the [1.0]
___________________________ problem.
388. When a component reads data from a database, and upon reading it a [1.0]
second time, finds that the data has changed, it is called the
______________________ problem.
a) True b) False
a) Book/perishable c) Interface/modifiable
392. In an organization, all new employees start with a grade of E5. The [2.0]
general manager performs a query to view all the employees with this
grade. However, the HRD manager after recruiting two new
employees adds their record into the database. The general manager
on performing the same query again, will now see a different set of
data. This problem can be addressed as the ______________
problem.
393. All actual data updates are performed by the resource managers, [1.0]
which are located and controlled separately in _________.
a) 1 – 2 – 3 – 4 c) 3 – 2 – 4 – 1
b) 4 – 3 – 1 – 2 d) 2 – 1 – 4 – 3
395. The ___________is the most important piece of information sent over [1.0]
the transactional communication.
a) object c) IIOP
a) API c) CORBA
b) JTA d) JTS
397. The OTS is broken into the ____________ and ______________. [1.0]
a) True b) False
399. The OTS has been separated into two APIs that are: [1.0]
a) CORBA/RMI c) JTA/JTS
b) DCOM/MOM d) APIJ/JAPI
a) JTA c) OTS
a) Interface c) Object
b) Class d) Package
a) javax.ejb.SessionSynchronizatio c) javax.ejb.EntityBean
n
405. What are the different Transaction isolation levels set during deployment? [2.5]
(Choose the correct answer/s)
a) TRANSACTION_READ c) TRANSACTION_SERIALIZABLE
_UNCOMMITTED
b) TRANSACTION_REPEATABLE d) TX_REQUIRED
406. In an online shopping site, the client is allowed to select multiple items [2.5]
and then place his/her order. As a developer, how would you allow the
user to cache the items and then write them to the database after the
transaction is complete?