Home » Tag Archives: Spring (page 42)

Tag Archives: Spring

JMX and Spring – Part 3

spring-interview-questions-answers

This article is the last one of this series. Take a look at Part 1 and Part 2. In this last article of the series I’ll show how to use the native JMX support within the JDK to implement a notification mechanism which alerts a listener when the HEAP memory is above a certain threshold. As discussed in my previous ...

Read More »

JMX and Spring – Part 2

spring-interview-questions-answers

This post continues from Part 1 of the tutorial. Hi, in my previous article I explained how to setup a JMX server through Spring and how to protect access to it through authentication and authorisation. In this article I will show how to implement a simple MBean which allows users to change the level of a Log4j logger at runtime ...

Read More »

Spring Custom Namespaces

spring-interview-questions-answers

Spring Custom Namespaces provides a good way to simplify the xml files used to describe the bean definitions of a Spring Application Context. It is a fairly old concept, first introduced with Spring 2.0, but deserves being reviewed once in a while. Consider a case of having to configure a part of the beans for a Spring MVC application without ...

Read More »

Spring Security Part 1 – Simple Login application with database

spring-security-logo

What is Spring Security? Spring security is a framework that provides security solution, handling authentication and authorization at both the web request level and the method level. Spring security handle security in two ways. One is secure web request and other one is restrict access at the URL level. Spring security uses servlet filters. In this post I’m going to ...

Read More »

REST + Spring Security session problem

spring-security-logo

REST, sessions .. wait. There are no sessions in REST application, right? Well, thats true. If we can avoid sessions we should do that. REST is stateless. The main concern about statelessness is authentication. In usual web applications we were used to store user data in session after authentication. How to solve that if we don’t want to use sessions? ...

Read More »

Spring MVC Integration Tests

spring-interview-questions-answers

An approach to Integration Testing the controllers in Spring MVC is to use the Integration Test support provided by Spring. With Junit4 this support consists of a custom Junit Runner called the SpringJunit4ClassRunner, and a custom annotation to load up the relevant Spring configuration. A sample Integration test would be along these lines: @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(locations={"classpath:/META-INF/spring/webmvc-config.xml", "contextcontrollertest.xml"}) public class ContextControllerTest { ...

Read More »

Spring & JSF integration: Exception Handling

jsf-logo

Most JSF developers will be familiar the “An Error Occurred” page that gets displayed when an unexpected exception is thrown somewhere their code. This page is really useful when developing but is not something you usually want for a production application. You generally have a couple of options when it comes to replacing this page with stock JSF; you can ...

Read More »

Spring 3.1 profiles and Tomcat configuration

spring-interview-questions-answers

Spring 3.1 introduced very useful feature called profiles. Thanks to that its easy to build one package that can be deployed in all environments (development, test, production and so on). By defining system property spring.profiles.active Spring allows us to create different beans depending on active profile name using XML configuration or @Profile annotation. As we all know system properties can ...

Read More »

Concurrency – Executors and Spring Integration

spring-interview-questions-answers

Thread Pool/Executors Based Implementation A better approach than the raw thread version, is a Thread pool based one, where an appropriate thread pool size is defined based on the system where the task is running – Number of CPU’s/(1-Blocking Coefficient of Task). Venkat Subramaniams book has more details: First I defined a custom task to generate the Report Part, given ...

Read More »

Using Redis with Spring

spring-data-logo

As NoSQL solutions are getting more and more popular for many kind of problems, more often the modern projects consider to use some (or several) of NoSQLs instead (or side-by-side) of traditional RDBMS. I have already covered my experience with MongoDB in this, this and this posts. In this post I would like to switch gears a bit towards Redis, ...

Read More »
Do you want to know how to develop your skillset and become a ...

Subscribe to our newsletter to start Rocking right now!

To get you started we give you our best selling eBooks for FREE!
Get ready to Rock!
To download the books, please verify your email address by following the instructions found on the email we just sent you.

THANK YOU!

Close