27+

Mohamed Ben Hassine

Hello , I am a Software Technical Leader  / Lover / Speaker / Blogger / Trainer with over 9 years of experience in designing and developing financial and telecommunication large scale enterprise applications using Web / Java/JEE technologies. Open to multi-culture customers and workplaces, I help companies and individuals build scalable Web Applications using last proved web technologies and enterprise software architectures.

4 Comments

Developer · 25 December 2018 at 18 h 27 min

It helped me so much thanks , waiting for remaining questions 😉

Mohamed · 27 December 2018 at 13 h 03 min

Please don’t hesitate to drop a comment 🙂 It will be helpful for us to improve the quiz , Thanks

Anen · 12 February 2019 at 12 h 43 min

Hi,
Seeing the answer of the question (29) under test category :

Select one or more correct statements about developing integration test with Spring support.
1. A new Spring context is created for each test class
2. To get a reference on the bean you want to test, you have to call the getBean() method of the Spring context
3. The Spring context configuration file has to be provided to the @ContextConfiguration annotation
4. Spring context configuration could be inherited from the super class

I think u have to inverse the 3 and 4 response explanations.

Seeing the answer of the question 13. under Container category :

Select one or more correct statements about the Proxy class created by Spring Framework :
1. Spring can create either JDK or CGLIb proxy
2. All defined Spring beans are wrapped in a Proxy Class provided by Spring Framework

Why all defined Spring beans are wrapped in a Proxy Class? All objects/beans need to be proxied?

Thank u

    Mohamed Ben Hassine · 13 February 2019 at 13 h 44 min

    Hello Anen ,

    Thanks a lot for your feedback and correction :

    For question 29 I inverted the explanation of 3 and 4 options as you invoked

    For Question 13 : All objects/beans need to be proxied? NO NO ; Just advised beans where we apply Transaction , security or caching aspects for example when we add @Transactional to a service :

    @Service
    @Transactional
    public class BasicBeanImpl implements BasicBean {

    Spring will create a proxy object to be served instead of our Bean ( in the console when we see)

    com.tungeek.boot.basic.BasicBeanImpl$$EnhancerBySpringCGLIB$$9969d430

    Otherwise , Spring will return our bean implementation :
    com.tungeek.boot.basic.BasicBeanImpl

    It was a mistake in the question : All “defined ” Spring beans ==> (edited )All “advised” Spring beans

    All advised Spring bean are wrapped in a Proxy Class provided by Spring Framework ( Transactions, Caching and AOP )

    Thanks and happy learning

Leave a Reply

Your email address will not be published. Required fields are marked *