Which of the following statements defines a "pointcut"? (select one)
A. A module that encapsulates advices
B. A point in the execution of a program such as a method call or field assignment
C. An expression that selects one or more join points
D. None of the above
正解:C
質問 2:
Which of the following statements is NOT a characteristic of Spring Transaction Management? (Select one)
A. Both declarative and programmatic transaction management is supported
B. It simplifies migration to distributed transactions
C. It abstracts the differences between local and JTA transactions
D. The use of JTA transactions is a requirement
正解:D
質問 3:
public class ClientServiceImpl implements ClientService {
@Transactional(propagation=Propagation.REQUIRED)
public void update1() {
update2();
}
@Transactional(propagation=Propagation.REQUIRES_NEW)
public void update2() { // ... }
}
You are using transactions with Spring AOP. What is happening when the update1 method is called? (Select one)
A. There is only one transaction because the call to update2() is internal (it does not go through the proxy)
B. There is only one transaction because REQUIRES_NEW runs into the active transaction if one already exists
C. There are 2 transactions because REQUIRES_NEW always runs in a new transaction
正解:A
質問 4:
Which of the following statements about the BeanFactoryPostProcessor are true? (select one or several answers)
A. Allows for the transformation of Spring bean definitions before the beans are instantiated
B. The <context:property-placeholder /> tag causes a BeanFactoryPostProcessor to be created
C. Allows for the transformation of Spring beans after the beans have been instantiated
D. Detects annotations such as @PostConstruct and @PreDestroy and then invokes appropriate behavior
正解:A,B
質問 5:
Select which of the following configuration tasks would be implemented using Spring's XML "context" namespace (select one or several answers)
A. Enabling component-scanning
B. Enabling the use of the @Required, @PreDestroy and @PostConstruct annotations
C. Enabling the use of the @Around annotation
D. Enabling the use of the @Transactional annotation
正解:A,B
質問 6:
To register for a bean destruction callback, one can (Select one)
A. Set the bean instance in a "prototype" scope
B. Decorate the destroy method with @PreDestroy and add a <context:annotation-config /> xml declaration
C. Set the lazy-init attribute within the <bean> tag
D. Decorate the destroy method with @PreDestroy
正解:B
質問 7:
Which of the following statements about Spring and unit testing is true? (Select one)
A. Spring provides an internal mock framework so there is no need for a third-party mock framework such as Mockito or EasyMock
B. Both a and b
C. Neither a or b
D. Spring provides an abstraction to existing Mock frameworks
正解:C
質問 8:
What is true regarding bean definition inheritance?
A. Parent bean definitions should always be abstract
B. Parent bean definitions may be abstract
C. It is not useful to declare an id for a parent bean definition
D. The class attribute can be declared in a parent bean definition
正解:B,D
Tanikawa -
試験に受かりました。覚えてきた問題が試験にも同じのが出てて良かったです。合格しました。とても感謝しています