This forum is now a read-only archive. All commenting, posting, registration services have been turned off. Those needing community support and/or wanting to ask questions should refer to the Tag/Forum map, and to http://spring.io/questions for a curated list of stackoverflow tags that Pivotal engineers, and the community, monitor.

Need Advice to improve my application performance

Nov 6th, 2006, 05:02 PM

Hello All,

I am involved in a J2EE project where we are using spring for first time.

We basically have three layers. Presentation (Struts Action and JSP), business layer (POJO), DAO layer (POJO which uses JdbcTemplate to perform database operations). We are using stored procedures extensively.

All these components are wired through applicationContext.xml. I would like your opinion on some of points

1. All beans (struts actions, business POJO, dao POJO) are right now singletons. Will this be an issue in the multiuser environment?
2. Will it impact overall performance of the application?
3. To monitor performance, we added an interceptor class, which logs start, end time for each executing method. Will this impact performance?
4. What options are available in spring to improve application performance.

I am involved in a J2EE project where we are using spring for first time.

We basically have three layers. Presentation (Struts Action and JSP), business layer (POJO), DAO layer (POJO which uses JdbcTemplate to perform database operations). We are using stored procedures extensively.

All these components are wired through applicationContext.xml. I would like your opinion on some of points

1. All beans (struts actions, business POJO, dao POJO) are right now singletons. Will this be an issue in the multiuser environment?
2. Will it impact overall performance of the application?
3. To monitor performance, we added an interceptor class, which logs start, end time for each executing method. Will this impact performance?
4. What options are available in spring to improve application performance.

Your reply will be appreciated.

- Shriram

1. These are Spring singletons, its not a issue. Just ensure they are stateless or you have to think about threading issues.

2. I've never found Spring to be the cause of our performance issues.

3. Logging will have some performance impact, but again we've never found it be an issue. Just ensure you are sensible about the logging.