Computer Certification

  1. Home
  2. Computing & Technology
  3. Computer Certification
SCBCD Practice Test
20 Free SCBCD Practice Questions from Whizlabs.com
 

Question 19

Question Statement:

Given the following method of the Administrator enterprise bean:
(Assume that all references have been properly initialized)

public String getAdminPassword() {
  if (ejbContext.isCallerInRole(“admin”)) {
    return adminPassword;
  } else {
    return null;
  }
}

And the following deployment descriptor:
<ejb-jar>
 <enterprise-beans>
  <entity>
   <ejb-name>AdministratorEJB</ejb-name>
   <ejb-class>com.company.AdministratorEJB</ejb-class>
       ...
   <security-role-ref>
     <role-name><!-- Line 1 --></role-name>
     <role-link><!-- Line 2 --></role-link>
   </security-role-ref>
  </entity>
 </enterprise-beans>
 <assembly-descriptor>
   <security-role>
     <role-name>Administrator</role-name>
   </security-role>
 </assembly-descriptor>
  ...
<ejb-jar>

Select all the correct statements out of the following statements.

a. The comment labeled “Line 1” should contain “admin” (without the quotes).

b. The comment labeled “Line 2” should contain “admin” (without the quotes).

c. The comment labeled “Line 1” should contain “Administrator” (without the quotes).

d. The comment labeled “Line 2” should contain “Administrator” (without the quotes).


Next page > Question 20

Explore Computer Certification

About.com Special Features

Computer Certification

  1. Home
  2. Computing & Technology
  3. Computer Certification

©2009 About.com, a part of The New York Times Company.

All rights reserved.