O GoConqr está de visual novo! Conte para nós o que você achou.

Quiz

JGM - 5 - Test 2

Jorge Garrido 46 perguntas

Fazer o quiz

Perguntas do quiz (46)

  1. 1Which of these can be used in Java-based or annotation-based Spring configuration? Select all that apply.
    1. A@Bean
    2. B@Configuration
    3. C@Scope
    4. D@Config
  2. 2Which of these is being described below? A bean instance in this scope lives within the lifetime of a single
    HTTP Session
    1. Aglobal session
    2. Brequest
    3. Csession
    4. Dapplication
  3. 3Which of these is true regarding Spring AOP CGLIB proxying?
    1. Afinal' methods cannot be advised.
    2. BIn addition to the springcore jar, the CGLIB jar is needed to be added on the classpath
    3. Cproxy-target-class="cglib" forces the use of CGLIB.
    4. DNone of the above.
  4. 4Which of these are called after all the bean's properties have been set (in other words, after dependency
    injection is done)? Select all that apply.
    1. AMethods annotated with @PostConstruct
    2. BafterPropertiesSet() as defined by the InitializingBean interface
    3. CA custom init method (i.e. specified in XML using the the 'init-method' attribute)
    4. Dthe class' constructor method
  5. 5Which of these attributes or annotations, enables the choice of registering a bean (or a set of beans) or not,
    based on this attribute or annotation's value? Select all that apply.
    1. A'profile' attribute of the XML 'beans' element
    2. B@Profile
    3. C@BeanProfile
    4. D@BeansProfile
  6. 6Which statements are true regarding AOP advices? Select all that apply.
    1. AThe proceed() on the ProceedingJoinPoint, in an @Around advice method, must be called up to 1 time
      only.
    2. B@AfterFinally advise is executed whether the advised method exits normally or not (throws
      exception).
    3. CThe first parameter of the @Around advice method must be of type ProceedingJoinPoint.
    4. DUsing @AfterThrowing with its property 'throwing', further filters the pointcut matching into those
      methods that throw the exception type associated with the 'throwing' property.
  7. 7Which of these statements are true regarding the DataAccessException exception class hierarchy? Select all
    that apply.
    1. AIts use helps convert proprietary checked exceptions, to a set of runtime exceptions.
    2. BIts use allows one to switch between persistence technologies fairly easily and it also allows one to
      code without worrying about catching exceptions that are specific to each technology.
    3. CDataAccessException instances thrown, wrap the original exception.
    4. DThe DataAccessException class is in the java.lang package.
  8. 8Fill in the blanks.
    In Spring Security, upon successful ______, the ______ (which is most of the time a ______ object from the
    UserDetailsService) is used to build the Authentication object that is stored in the SecurityContextHolder.
    Select the one that applies best.
    1. Aauthentication, authorization service, Principal
    2. Bauthorization, authorization service, UserDetails
    3. Cauthorization, authentication manager, Principal
    4. Dauthentication, principal, UserDetails
  9. 9which of these can be added after the code below to assist in the definition? Select all that apply.
    DriverManagerDataSource myDataSource = new DriverManagerDataSource();
    1. AmyDataSource.setDriverClass(.....);
    2. BmyDataSource.setConnectionUrl(.....);
    3. CmyDataSource.setUserId(.....);
    4. DmyDataSource.setPassword(.....);
  10. 10Which ones are true about the code below? Select all that apply.
    <beans>
    <import resources="myServices.xml"/>
    <import resources="myResources/messageSourceA.xml"/>
    <import resources="/myResources/messageSourceB.xml"/>
    </beans>
    1. ASpring will look for a file myServices.xml. The enclosing 'beans' element is not needed inside
      myServices.xml.
    2. BThe line with 'messageSourceB.xml' is malformed. There must not be a slash before 'myResources'.
    3. CThe attribute to be used is 'resource', not 'resources'.
    4. DIt is possible to reference files in parent directories using a relative path like "../".

Informações

Descrição
Quiz sobre JGM - 5 - Test 2, criado por Jorge Garrido em 19-03-2018.
Idioma
Español
Visualizações
1
Etiquetas
first certificate of cambridge
Avaliação
Ainda sem avaliações
Avalie este quiz
Avalie este quiz

Fale Conosco

Sobre o que é sua mensagem?

O que você acha do novo visual?

Você gostou?