Related differences

Ques 16. What is the typical Bean life cycle in Spring Bean Factory Container?

Bean life cycle in Spring Bean Factory Container is as follows:

► The spring container finds the bean�s definition from the XML file and instantiates the bean.
► Using the dependency injection, spring populates all of the properties as specified in the bean definition
► If the bean implements the BeanNameAware interface, the factory calls setBeanName() passing the bean�s ID.
► If the bean implements the BeanFactoryAware interface, the factory calls setBeanFactory(), passing an instance of itself.
► If there are any BeanPostProcessors associated with the bean, their post- ProcessBeforeInitialization() methods will be called.
► If an init-method is specified for the bean, it will be called.
► Finally, if there are any BeanPostProcessors associated with the bean, their postProcessAfterInitialization() methods will be called.

Is it helpful? Add Comment View Comments
 

Ques 17. How do you setup LDAP Authentication using Spring Security?

Spring provides out of the box support to connect Windows Active directory for LDAP authentication and with few configuration in Spring config file you can have this feature enable.

Is it helpful? Add Comment View Comments
 

Ques 18. What do you mean by Bean wiring?

The act of creating associations between application components (beans) within the Spring container is reffered to as Bean wiring.

Is it helpful? Add Comment View Comments
 

Ques 19. How do you control concurrent Active session using Spring Security?

You can easily control How many active session a user can have with a Java application by using Spring Security.

In fact is all declarative and no code is require to enable concurrent session disable functionality. You will need to include following xml snippet in your Spring Security Configuration file mostly named as applicaContext-security.xml. Here is sample spring security Example of limiting user session in Java web application:

<session-management invalid-session-url="/logout.html">
<concurrency-control max-sessions="1" error-if-maximum-exceeded="true" />
</session-management>

As you see you can specify how many concurrent session per user is allowed, most secure system like online banking portals allow just one authenticate session per user. You can even specify a URL where user will be taken if they submit an invalid session identifier can be used to detect session timeout. Session-management element is used to capture session related stuff. Max-session specify how many concurrent authenticated session is allowed and if error-if-maximum-exceeded set to true it will flag error if user tries to login into another session.

Is it helpful? Add Comment View Comments
 

Ques 20. What is DelegatingVariableResolver?

Spring provides a custom JavaServer Faces VariableResolver implementation that extends the standard Java Server Faces managed beans mechanism which lets you use JSF and Spring together. This variable resolver is called as DelegatingVariableResolver.

Is it helpful? Add Comment View Comments
 

Most helpful rated by users: