JavaBeat
Search JavaBeat

SCBCD TOPICS

scbcd Home

objectives

mock exams

scbcd mock - 1

scbcd mock - 2

scbcd mock - 3

scbcd mock - 4

scbcd mock - 5

scbcd mock - 6

scbcd mock - 7

scbcd mock - 8

scbcd mock - 9

scbcd mock - 10

scbcd mock - 11

scbcd mock - 12

scbcd mock - 13

scbcd mock - 14

JAVABEAT
home
articles
tips
code junction
forums
OUR NETWORK
javabeat

SCBCD Mock Questions - 3

1)Assuming that ctx is a reference to the SessionContext, which of the following statements can be used to check whether the caller has a role of "manager"?

1)ctx.isUserInRole("manager")
2)ctx.isCallerInRole("manager")
3)ctx.getCallerPrincipal("manager")

2)Which of the following statements regarding EJB security are true? [Select all correct answers]

1)A security role or a method can only appear once in a method-permission element.
2)A security role or a method may appear in multiple method-permission elements.
3)The Application Assembler uses the unchecked element instead of a role name in the method-permission element to indicate that a method should not be checked for authorization.
4)If a security role is defined but not used in any method-permission elements that role has permission over all methods of any EJBs within the Enterprise Javabean application.

3)Which one of the following is a responsibility of the EJB Container with regards to EJB security?

1)The EJB Container is required to provide a security domain and one or more principal realms to the enterprise bean's.
2)The EJB Container is required to provide tools for the Bean provider to allow them to debug enterprise bean's once they have been deployed.
3)The EJB Container is required to link security role references to security roles.
4)The EJB Container is responsible for configuring the principal delegation for inter-component calls.

4)The exhibit excerpt is from a container managed persistence entity bean, which one of the following statements is correct?


...
public void ejbActivate() {
   try{
      // get the caller principal
      Principal callerPrincipal = myEntityCtx.getCallerPrincipal();
      // get the distinguished name from the principal
      log(callerPrincipal.getName());
   } catch(Throwable t) {
      //Oooops!!
   }
}
...
1)There will be an entry in the log with the return value from callerPrincipal.getName().
2)There will not be an entry in the log as the code will not execute log(callerPrincipal.getName()).
3)There will be an entry in the log of "null".
4)This code will not compile as the method getCallerPrincipal() on the javax.ejb.EntityContext returns a boolean result not a reference to an instance of java.security.Principal.

5)Based on the exhibit which of the following statements is correct? [Select all correct answers]


...
<method-permission>
   <role-name>Manager</role-name>
   <method>
      <ejb-name>ProductCatalogService</ejb-name>
      <method-intf>Home</method-intf>
      <method-name>create</method-name>
   </method>
</method-permission>
<method-permission>
   <role-name>Secretary</role-name>
   <method>
      <ejb-name>ProductCatalogService</ejb-name>
      <method-intf>Remote</method-intf>
      <method-name>create</method-name>
   </method>
</method-permission>
...
1)A caller with the role of Secretary is guaranteed to have permission to use the method create on the ProductCatalogService's Home interface.
2)A caller with the role of Manager is guaranteed to have permission to use the method create on the ProductCatalogService's Home interface.
3)A caller with the role of Boss is guaranteed to have permission to use the method create on the ProductCatalogService's Home interface and the method create on the ProductCatalogService's Remote interface.
4)A caller with the role of Secretary is guaranteed to have permission to use the method create on the ProductCatalogService's Remote interface.

6)Which of the following are responsibilities of the Application Assembler? [Select all correct answers]

1)The Application Assembler should hard-code security policies in the enterprise bean's business methods
2)The Application Assembler is responsible for defining security roles in the deployment descriptor.
3)The Application Assembler assigns principals (such as individual users) used for managing security in the operational environment to the security roles defined in the security-role elements of the deployment descriptor.
4)The Application Assembler is responsible for defining method permissions.

7)Identify responsibilities for the EJB deployer from the options below? [Select all correct answers]

1)Along with the Application Assembler define the appropriate security policies for the application.
2)Setting up the appropriate security policy for the enterprise bean application.
3)Along with the System Administrator setting up of the principal delegation in a Container-specific way.
4)Describe all the requirements for the caller's principal management of inter-enterprise bean invocations as part of the description.

8)Which of the following are available within EJB security management? [Select all correct answers]

1)Declarative security does not allow you to specify that the Local interface's version of a method is accessible, but that the Remote interface's version of the method is not accessible to anyone.
2)Using declarative security you can specify that you do not want anyone to have access to methods of your bean.
3)Using declarative security it is possible to specify that the caller of a bean will appear to be running as a different role for calls that are made from that bean to other bean.
4)EJB security management means that users of EJBs must change their passwords and usernames on a frequent basis.

9)Type in the tag name (without opening and closing braces) that allows you to assign the role required to have access to an EJB method. ______

10)Please select the following statements that correctly describe EJB support for security management? [Select all correct answers]

1)Authorisation to invoke a bean's method can be defined at a bean's method level.
2)Authorisation to invoke a bean's method can be defined at the bean instance level using tags within the deployment descriptor.
3)Authorisation to invoke a bean's method cannot be controlled. EJB supports only authentication which is controlled through the deployment descriptor.
4)Authorisation to invoke a bean's method can be controlled using either programmatic security or declaratively.

SCBCD Mock Questions 3 - Answers


Sponsors
Webmaster Hosting Forum
Java Jobs
MyVideoLib
India News
Internet Advances
Latest QnA
SCJD Tips
When we start a thread by applying start() method on it ,how does it knows that to execute run()method?
About Wrapper class in Java
How to configure weblogic 7.0 in MyEclipse?
Static Block and Static Initializer in Java

JavaBeat Media (2004-2008), India
javabeat | planetoss | links directory | advertise
Copyright (2004 - 2008), JavaBeat