Spring is a module based open source framework to build robust Java / Java EE applications.

learn more… | top users | synonyms

8
votes
4answers
2k views

Spring - Confusion over configuration?

Somewhere I read Spring offers convenience over configuration. But Spring folks are bringing in so much changes over the configuration , that I am now really getting confused to use the xml ...
-4
votes
1answer
3k views

Singleton: Is Singleton an Anti-Pattern [duplicate]

Was reading an interesting blog post on Singleton design pattern which is so widely used. If it's stupid or as in some quora posts, its an anti-pattern why is it so widely used even in frameworks. ...
2
votes
2answers
1k views

Which is simpler for REST client call to return JSON - JQuery/JavaScript or Spring RestTemplate? [closed]

I've been trying to hack up an annotated Spring MVC web app but it's proving pretty hard to call a URL of my web app which fires a request to a remote API (UK Police data) and recieves a reply which I ...
4
votes
2answers
284 views

Should I make package private my DAO interfaces?

I have several DAO classes that implement an interface. In the other hand, I have Service classes that use those DAO implementations. So far all the DAO interfaces are public and I was thinking if ...
-1
votes
1answer
1k views

How to do transaction management using Spring without Annotation?

I'm using Hibernate4.2 and Spring3.2 and I m doing transaction management using Spring without annotation (i.e. without @Transactional). How can I use Spring-transaction management without annotation ...
7
votes
1answer
2k views

How to choose between lightweight or heavyweight framework for web application

In my current role as a software developer in a Java/Spring/Hibernate/JSF shop, I am sometimes asked to develop large-scale web apps with many interfacing systems and/or large databases as well as ...
1
vote
1answer
2k views

Handling error message for a Spring MVC login form

This can apply to many error handling scenarios, but I'm curious about how to do it in a login scenario. Given this Spring controller method: @RequestMapping(value = "/account/login", method = ...
2
votes
1answer
1k views

Using akka actors with service spring beans

Do you think that using akka actors in front of transactional service beans, is a good idea ? Actors are waked up by a facade used by a client application, and actor use a message to handle right ...
4
votes
1answer
1k views

How can I scale spring application context?

I'm currently working on a project that need to be dynamically scaled on demand according to the need. My question is about scaling spring context. My web application has a classical multi module ...
2
votes
2answers
850 views

Should my login logic be part of the controller or a service in MVC webapp

I'm using Shiro as my security manager for a Spring MVC web application. The login basically happens in these lines: Subject user = SecurityUtils.getSubject(); user.login(new ...
2
votes
2answers
522 views

Web application (Spring, JSF) forks, how to reuse existing code for subprojects?

my question is going to be somewhat philosophical and "architectural oriented" so bear with me. Right now we have existing Java web application built on top of Spring and JSF(facelets) with maven. ...
2
votes
1answer
10k views

How to start learning Spring framework with all its associated functionalities? [closed]

I am going to delve into the nuances of Spring. I have a little information about this framework. So I am not going in blind. But still I will like to start it as a beginner and then move up the ...
3
votes
2answers
707 views

Need advice on framework design: how to make extending easy

I'm creating a framework/library for a rather specific use-case (data type). It uses diverse spring components, including spring-data. The library has a set of entity classes properly set up and ...
0
votes
1answer
542 views

Execute a Managed bean from a JSF view in WEB-INF folder

We are initiating a Spring + Primefaces project and the first problem we have encountered concerns storing the XHTML pages into the WEB-INF folder. When we use a faces form in a view located inside ...
6
votes
3answers
5k views

When not to use Spring to instantiate a bean?

I am trying to understand what would be the correct usage of Spring. Not syntactically, but in term of its purpose. If one is using Spring, then should Spring code replace all bean instantiation code? ...
1
vote
0answers
911 views

Spring AOP advice order

In Spring AOP, I can add an aspect at the following locations before a method executes (using MethodBeforeAdvice) after a method executes (using AfterReturningAdvice) around a method (both before ...
7
votes
4answers
17k views

Do I need to know servlets and JSP to learn spring or hibernate or any other java web frameworks?

I've been asking a lot of people where to start learning java web development, I already know core java (Threading,Generics,Collections, a little experience with (JDBC)) but I do not know JSPs and ...
5
votes
2answers
7k views

How to manage 2 DAO methods in a single transaction?

In an interview someone asked me : How do we manage 2 transactional/dao methods in a single transaction. Desired capabilities: If anyone of them fails we need to rollback both methods. Both of the ...
3
votes
1answer
12k views

Difference between spring setter and interface injection?

I know how constructor and setter injection works in spring. Normally I use interfaces instead of classes to inject beans using setter and I consider it as interface injection, but in case of ...
2
votes
2answers
682 views

Migrating from jdbc to MyBatis — advice needed

I am working on a Java application (an ERP) that has grown pretty large, and will continue to grow for the next couple of years. We have been using Spring-JDBC for our DAO layer. But the amount of ...
2
votes
1answer
643 views

Why this code create object as interface?

In am reading Spring in Action (3rd edition) and here a snippet from it: ApplicationContext ctx=new ClassPathXmlApplicationContext("springidol.xml"); Performer ...
0
votes
1answer
408 views

What Exactly is a Model Relative to the ModelAndView Class in Spring

What exactly does the "Model" part mean? Is it the same as the domain model? I've read that it's a map, but I'm having a hard time understanding the concept.
4
votes
1answer
2k views

What is a Spring AOP 'advice'?

As the question states. What is an 'advice'? More importantly, what does it even mean (semantics)? What's the etymology of 'advice' in the Spring context?
1
vote
1answer
2k views

Spring MVC vs raw servlets and template engine? [duplicate]

Possible Duplicate: Why not Spring framework? I've read numerous articles about the Spring MVC framework, and I still can't see the benefits of using it. It looks like writing even a ...
5
votes
1answer
806 views

Why were annotations introduced in Spring and Hibernate?

I would like to know why were annotations introduced in Spring and Hibernate? For earlier versions of both the frameworks book authors were saying that if we keep configuration in xml files then it ...
3
votes
3answers
2k views

Transaction Design Pattern for MVC and location of responsibility?

I'm designing a pretty standard Spring MVC application, and I'm trying to figure out where the responsibility for transaction management should lie. I've been reading Java Transaction Design ...
0
votes
1answer
2k views

Best practice for creating views in spring and hibernate web application

Hi I am currently developing a web application in Spring and Hibernate where i have several different tables. The Delivery table for example is mapped many-to-one with the Customer table and the ...
1
vote
3answers
572 views

Just getting started in Spring and my preference is XML config over annotations. Correct or not?

After having read through some of the Spring docs my inclination is towards using a XML config file rather than annotations on the classes themselves. My reasoning is that by doing so you avoid tying ...
2
votes
3answers
9k views

What is the use of Spring's init-method and destroy-method?

While learning Spring framework, I found that Spring framework provides init-method and destroy-methods which can be used to initialize some properties or to do housekeeping stuff. We can do all ...
4
votes
3answers
5k views

Heavy use of static methods in a Java EE web application?

Generally I am asking if this is a norm. The application architecture includes spring and the zk framework. I personally can't help but think this introduces a number of problems. I mean...this is a ...
2
votes
2answers
356 views

Replacing dao layer

I am developing a series of webservices (based on spring and spring mvc). For the first time in my dev career I do plan on replacing the dao layer in the future(I have always seen it mentioned but ...
0
votes
2answers
940 views

Creating webservices using spring-mvc. One project or multiple projects

Using spring mvc to create a restful api, Maven is build tool and tomcat with spring jars is deployment . Plan A: each webservice will be its own separate war file/project ? if required I would ...
7
votes
1answer
15k views

Where to put Spring configuration file?

I want to integrate Spring framework in my project especially into server side. So, I don't want to put it within WEB-INF folder of war file. Should I put an applicationContext.xml it into each ...
9
votes
2answers
11k views

Is Spring + Hibernate prefered instead of EJB 3?

It is my perception that whenever new JEE projects start (where these technologies would be applicable), people prefer to use a combination of Spring + Hibernate instead of EJB 3. It seems junior ...
5
votes
1answer
871 views

Attachment handling for web application with Jackrabbit

I need to manage attachments on my Spring web application and I thought to use an open source repository. My app it's a job approval system using J2EE / SPRING 3 Framework and Postgress DB to allow ...
5
votes
2answers
3k views

Write Unit test for heavily-database application? [duplicate]

I'm currently developing a Spring-based web-application, in which almost every operation create/update/delete something in the database. The logic mostly about checking condition so as to we should ...
4
votes
1answer
600 views

How to move to Java enterprise development after Python and Ruby? [closed]

I used to develop in Django/Python and Rails/Ruby (and before that C/C++ and C#), and I'm now at a job where we do enterprise Java development (Spring, Hibernate, RESTEasy, Maven, etc.) for web ...
0
votes
1answer
207 views

Multiple possible jsp views for a request

I'm looking to offer the user some way of changing how a single page looks based on some pre-defined jsps. i.e. Two or more jsp's contain similar information, and would be backed by a single ...
4
votes
1answer
1k views

Programming in academic environment vs industry environment [duplicate]

Possible Duplicate: Differences between programming in school vs programming in industry? This is a general discussion about programming in the industry environment. The background story is ...
5
votes
3answers
1k views

Tools for managing a complicated project setup with many frameworks and no documentation

We have to extend a huge java project that makes use of frameworks like maven, spring, struts, freemarker and closure templates. We do have access to source code but barely any documentation, and we ...
0
votes
3answers
630 views

Java developing server-client solutions [duplicate]

I am trying to get a job as Java developer. I have been developing web pages with Java for a while, but now trying to go to another path and develop server-client solutions. In this specific company ...
122
votes
7answers
112k views

What does the Spring framework do? Should I use it? Why or why not?

So, I'm starting a brand-new project in Java, and am considering using Spring. Why am I considering Spring? Because lots of people tell me I should use Spring! Seriously, any time I've tried to get ...
3
votes
1answer
2k views

Why is spring so good for Java middleware development?

I'm planning on doing some Java web development in my spare time to learn a new set of programming skills, and just want to survey opinion on why Spring is so good for middleware development? What ...
2
votes
3answers
545 views

infrastructure software/technologies for developing web service [closed]

[Edit: Thanks S.Lott for the hints] I'm developing a web service from scratch. The service could have potential of 10,000 requests a day. Actually, to be honest, requirements aren't that clear at this ...
-1
votes
1answer
266 views

PocoCapsule project status

Does anybody know the status of this C++ Inversion of Control Container? Any alternative?
3
votes
2answers
823 views

web services, J2EE, spring, DB integration project ideas- maybe data mining related?

I am a graduate CS student (Data mining and machine learning) and have a good exposure to core JAVA (>3 years). I have read up a bunch of stuff on Design patterns J2EE Web services( soap and rest) ...
33
votes
6answers
17k views

Why not Spring framework?

Are there any disadvantages in tying my application to Spring framework? I'm not talking about bugs or issues like that, if any. I'm talking about strategic, architectural things that will influence ...