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
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 – 7
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 …
OCMJEA Mock Exam – 6
127 . In EJB 2.0 what is the Component interface? The interface that Message-Driven Beans must implement There is no component interface in EJB 2.0 The new name for the Home interface The new name for the Remote interface 128 . You are working on a new application that will help your company co-ordinate sales …
OCMJEA Mock Exam – 5
102 . What do Isolatable and Durable mean with reference to ACID? Isolatable means only 1 transaction can execute at a time Isolatable means the transaction is the same as other transactions in structure Isolatable means a transaction must execute without the interference from other processes or transactions Isolatable means the transaction was started and …
OCMJEA Mock Exam – 4
77 . You need to replace ASP scripts. What J2EE technology do you use? JMS, JSP and Servlets JSP and Servlets JTA, JSP and Servlets Applets 78 . As part of your new application you need to connect to a database. You don’t have any access to the database server so you can’t change the …
OCMJEA Mock Exam – 2
27 . ‘A’ has a dependency with ‘B’ is best expressed by? Choose the one below: Option a Option b Option c Option d Option e Options b and d Options d and e 28 . Refer to the following diagram? From the following diagram it can be deduced that: Choose the one below: Changes …