Question Bank For J2EE PDF
Question Bank For J2EE PDF
Question Bank For J2EE PDF
14. Identify the most appropriate definition of 18. Which of the following is true about Entity beans and
getEJBMetaData() Hibernate?
1. This method allows the clients to obtain extra a) X in Entity Bean at a time we can interact
information about the EJB.This method with only one database. Where as in
throws a java.rmi.RemoteException. Hibernate we can able to establish the
2. This method is used to get a handle for the connections to more than one database.
home object. This obtained handle can be Only thing we need to write one more
used later to get the handle to the home configuration file.X x
object. b) Entity Beans does not support OOPS
3. This method is used to remove an EJB concepts where as Hibernate does.
object. It has two forms. The first orm takes a c) Hibernate supports multi level caching,
Handle object a parameter and the other where as Entity Beans doesnt.
takes the primary key as a parameter. 1. Only a
4. This method returns an instance of the 2. Only a and b
entitys primary key class. With this method, 3. All a, b and c
you can set bean attributes. 4. Only c
15. EJB technology uses Java Remote method 19. How does Hibernate distinguish between transient
Invocation (i.e. newly instantiated) and detached objects?
1. For communication between an enterprise Choose correct answer from following?
bean and a client. 1. Hibernate uses the version property, if there
2. For communication between two enterprise is one.
Page 2 of 2
C-DACs Advanced Computing Training School, Pune
2. If not uses the identifier value. No identifier
value means a new object. This does work
only for Hibernate managed surrogate keys.
Does not work for natural keys and assigned
(i.e. not managed by Hibernate) surrogate
keys)
3. Write your own strategy with
Interceptor.isUnsaved().
4. All of the above
Correct Answer: 4
Correct Answer: 1
Page 3 of 3