EJB MT solutions of Niit Ques. 25 to 50

EJB MT solutions of Niit Ques. 25 to 50












SNo: 26
Ques: Which of the following option does not hold true when a client method is invoked with an accompanying transaction context
Options:
  1, Run the enterprise bean method without a transaction.
  2, Run the enterprise bean method in a new transaction.
  3, Cannot Run the enterprise bean in a new transaction.
  4, Run the enterprise bean method in the caller's transaction context
Answer: 3
Marks: 2

=============================================================

SNo: 27
Ques: Which of the following options defines the authorization process
Options:
  1, It is defined as the process that ensures the confidentiality and integrity of the information transported across the network.
  2, It is defined as the process that facilitates the secure deployment of an application in diverse environments.
  3, It is defined as the process of verifying what the user's identity is and ensuring that they are who they say they are.
  4, It is defined as the process of allocating permissions to authenticated users.
Answer: 4
Marks: 2

=============================================================

SNo: 28
Ques: Which of the following options is true regarding role identity
Options:
  1, A role represents a user in the native security domain.
  2, A role is an entity that can be authenticated by an authentication protocol in a security service that is deployed in an enterprise.
  3, A role is a group of principals sharing a unique set of permissions.
  4, A role has predefined credential requirements associated with itself.
Answer: 4
Marks: 2

=============================================================

SNo: 29
Ques: Which of the following options can be used to  make access control decisions in the code using API calls
Options:
  1, Java Authentication and Authorization Service
  2, Programmatic access control
  3, Declarative access control
  4, EJB container
Answer: 2
Marks: 2

=============================================================

SNo: 30
Ques: Which of the following statements is true regarding Java Authentication and Authorization Service (JAAS)
Options:
  1, JAAS cannot extend the access control architecture of the Java platform to support user-based authorization.
  2, JAAS enables services to authenticate and enforce access controls upon users.
  3, JAAS does not implement a Java technology version of the standard Pluggable Authentication Module (PAM) framework.
  4, JAAS specifies the implementation of a transaction manager.
Answer: 2
Marks: 2

=============================================================

SNo: 31
Ques: Which of the following options will enable you to inform the container not to persist a field or property of the entity class
Options:
  1, LOB annotation
  2, Transient annotation
  3, Table annotation
  4, Basic annotation
Answer: 2
Marks: 2

=============================================================

SNo: 32
Ques: Which of the following options provides good support for polymorphic relationships between entities and for queries that range over the class hierarchy
Options:
  1, Single table per class hierarchy strategy
  2, Table per class strategy
  3, Embeddable class
  4, Embedded class
Answer: 1
Marks: 2

=============================================================

SNo: 33
Ques: Which of the following options is correct about FROM clause
Options:
  1, The FROM clause specifies the search domain in the persistence tier.
  2, The FROM clause specifies the search domain in the User tier.
  3, The FROM clause is specified using only one path expression.
  4, The FROM clause enables the aggregation of values according to the properties of an entity class.
Answer: 1
Marks: 2

=============================================================

SNo: 34
Ques: Which of the following options associates a variable with a persistence entity or a persisted field of a persistence entity
Options:
  1, Path expression
  2, The SELECT statement
  3, The BULK UPDATE statement
  4, JOINS
Answer: 1
Marks: 2

=============================================================

SNo: 35
Ques: Which of the following options will enable you to assign a value to the named parameter, say Employee
Options:
  1, createQuery method
  2, createNativeQuery method
  3, setParameter method
  4, NamedQuery annotation
Answer: 3
Marks: 2

=============================================================

SNo: 36
Ques: Which of the following clause will you use to specify which persistence entities should be queried by the SELECT query
Options:
  1, FROM clause
  2, WHERE clause
  3, GROUP BY clause
  4, HAVING clause
Answer: 1
Marks: 2

=============================================================

SNo: 37
Ques: What will be the sequence of execution of the clauses in a query that contains the following three clauses:
1. GROUP BY clause
2. WHERE clause
3. HAVING clause
Options:
  1, WHERE-->GROUP BY-->HAVING
  2, GROUP BY-->HAVING-->WHERE
  3, WHERE-->GROUP BY
HAVING clause is not included when there is a WHERE clause in the SELECT query
  4, GROUP BY-->WHERE-->HAVING
Answer: 1
Marks: 2

=============================================================

SNo: 38
Ques: Which of the following options is true about asynchronous consumer clients
Options:
  1, Asynchronous consumer clients register with the message destination.
  2, Asynchronous consumer clients cannot register with the message destination.
  3, Asynchronous message consumer clients collect messages from the destination.
  4, If the destination is empty, the asynchronous client is blocked until a message arrives.
Answer: 1
Marks: 2

=============================================================

SNo: 39
Ques: Which message type will you use to define the set of name-value pairs
Options:
  1, TextMessage
  2, MapMessage
  3, BytesMessage
  4, ObjectMessage
Answer: 2
Marks: 2

=============================================================

SNo: 40
Ques: Which of the following options is true about point-to-point messaging architecture
Options:
  1, It is based on the concept of message topic.
  2, In this type of architecture, receiver gets all the messages that were sent to the queue, including those sent before the creation of the receiver.
  3, There is a timing dependency in point-to-point architecture.
  4, In this type of architecture, receiver gets all the messages that were sent to the queue, excluding those sent before the creation of the receiver.
Answer: 2
Marks: 2

=============================================================

SNo: 41
Ques: Which of the following objects provides a single-threaded context for producing and consuming messages
Options:
  1, QueueReceiver object
  2, Session object
  3, MessageListener object
  4, Connection object
Answer: 2
Marks: 2

=============================================================

SNo: 42
Ques: Which of the following objects enables the JMS API to register a MessageListener object with the queue destination
Options:
  1, Session object
  2, Connection object
  3, QueueReceiver object
  4, QueueConnectionFactory
Answer: 3
Marks: 2

=============================================================

SNo: 43
Ques: Which of the following life-cycle events occurs when the container restores the state of the instance to primary storage, from the previously cached secondary storage
Options:
  1, PreRemove
  2, PostActivate
  3, PreDestroy
  4, PostRemove
Answer: 2
Marks: 2

=============================================================

SNo: 44
Ques: Which of the following life-cycle events occurs when the container decides to remove the stateful session bean instance from primary storage and cache it in secondary storage
Options:
  1, PostActivate
  2, PostRemove
  3, PrePassivate
  4, PreRemove
Answer: 3
Marks: 2

=============================================================

SNo: 45
Ques: Which of the following options is true regarding the life-cycle callback interceptor methods
Options:
  1, The life-cycle callback interceptor methods can throw only remote exceptions.
  2, A life-cycle interceptor method can be annotated to handle only one life-cycle event.
  3, The life-cycle callback interceptor method can be final.
  4, The life-cycle callback interceptor method cannot be static or final.
Answer: 4
Marks: 2

=============================================================

SNo: 46
Ques: Which of the following life-cycle event is invoked before a query result is returned or accessed
Options:
  1, PrePersist callback
  2, PostPersist callback
  3, PostLoad callback
  4, PostUpdate callback
Answer: 3
Marks: 2

=============================================================

SNo: 47
Ques: Identify the correct rule regarding the callback methods.
Options:
  1, A callback method cannot access entries in the entity class environment.
  2, The same callback method cannot be designated to handle multiple callback events.
  3, Callback methods cannot throw runtime exceptions.
  4, Callback methods must not throw checked exceptions, but can throw unchecked exceptions.
Answer: 4
Marks: 2

=============================================================

SNo: 48
Ques: Which of the following CMT transaction attributes is applicable for methods that must execute in a transaction but not necessarily a new transaction
Options:
  1, SUPPORTS
  2, REQUIRES_NEW
  3, NOT_SUPPORTED
  4, REQUIRED
Answer: 4
Marks: 2

=============================================================

SNo: 49
Ques: Which of the following CMT transaction attributes defines that a method will execute in the same transaction if it is called with the calling thread currently in a transaction
Options:
  1, REQUIRED
  2, REQUIRES_NEW
  3, SUPPORTS
  4, NOT_SUPPORTED
Answer: 3
Marks: 2

=============================================================

SNo: 50
Ques: Which of the following interfaces provides the session bean with the feedback  about the transaction demarcation events
Options:
  1, SessionSynchronization
  2, javax.transaction.UserTransaction
  3, javax.ejb.TimedObject
  4, TimerService
Answer: 1
Marks: 2

Post a Comment

Previous Post Next Post