OCEJWCD 6 Mock Exam – 1

ocejwcd-thumbnail

1 . A web.xml for a web application contains the following: What should formlogin.html contain? Choose the one below: A base 64 encoded username and password A header that prompts the browser to pop up the username/password dialog A form that POSTs to j_security_check url Any html page that does not require the user to […]

OCPJBCD Mock Exam – 4

1 . Which of the following statements are true about the Entity class? Entity class must not have no-arg constructor Entity class must be declared as top level class Interface cannot be Entity Enum can be declared as Entity 2 . Which of the following are correct? Choose the one below: 1 2 3 4 […]

OCPJBCD Mock Exam – 3

1 . A stateless session bean must commit a transaction before a business method? True False 2 . A message-driven bean must commit a transaction before a business method? True False 3 . A stateful session bean must commit a transaction before a business method? True False 4 . By default, What is the value […]

OCPJBCD Mock Exam – 2

1 . Can we use the annotation @PrePassivate for more than one method in a bean? Yes No 2 . What should be the return type of the method using @PrePassivate? Object void String boolean 3 . Which of the following are correct statements about @PrePassivate? Method’s return value must not be void Method cannot […]

OCPJBCD Mock Exam -1

1 . Application Exception myException can automatically mark transaction for roll back? ApplicationException is applied to the myException class <exception-class>myException</exception-class> is used inside <application-exception> element in deployment descriptor Constructor of myException class calls EJBContext.setRollbackOnly() ApplicationException is applied to myException class, and rollback subelement of application-exception is specified as true 2 . If message driven bean […]

OCMJEA Mock Exam – 11

ocmjea-thumbnail

252 . A session bean called SomeBean has a method called someMethod(), which calls someOtherMethod (same bean) followed by someOtherBeanMethod() of SomeOtherBean. If SomeMethod() starts a BMT transaction, which of the following are true? Choose the one below: SomeOtherMethod also has to be use BMT since it’s part of the same bean SomeOtherMethod can use […]

OCMJEA Mock Exam – 10

ocmjea-thumbnail

227 . You can traverse through the elements of many Java Collection objects because they provide a way to access their elements sequentially. What design pattern is used here? Visitor Observer Builder Iterator Proxy Decorator 228 . Compact Computers is a small computer assembly company. Any customer currently has the following choices for a PC: […]

OCMJEA Mock Exam – 9

ocmjea-thumbnail

202 . The Remote Interface of an Enterprise Bean extends from? java.ejb.EJBRemote javax.ejb.RemoteInterface javax.ejb.EJBObject javax.rmi.RemoteReference 203 . Which of the following are not applicable to the Primary Key Class? It must implement the java.io.Serializable interface It must provide a default constructor It must override hashCode() and equals() Cannot be undefined if the PK is a […]

OCMJEA Mock Exam – 8

ocmjea-thumbnail

177 . You are designing a 3-tier architecture for a new application your company intends to deploy as part of it’s marketing strategy. This application will allow users to book rental cars over the web and is estimated to save the company millions over the next few years. Due to the sheer number of users, […]

OCMJEA Mock Exam – 7

ocmjea-thumbnail

152 . You have just started a new job working for a top finance company and you have been asked to provide a user-friendly interface to an existing mainframe application. You don’t have any access to the mainframes source code. What is the best technique for this? Choose the one below: It can’t be done […]