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

learn more… | top users | synonyms

4
votes
2answers
102 views

Best solution for a large database transaction

I have a COBOL CICS process running on a mainframe legacy system. The process does over 2K DMLs in a highly concurrent DB environment. After each CRUD operation, the result is used to make further ...
-1
votes
0answers
22 views

Does Spring Data MongoDB provide mechanism for query indexes usage verification? [migrated]

Does Spring Data MongoDB provide mechanism for query indexes usage verification? In particular I'm talking about something along the lines of Doctrine ODM Requiring Indexes Sometimes you may want ...
-1
votes
1answer
29 views

Spring Controllers and Services

we are at the middle of a project. It's a REST Service. Now we have controllers to handle the Requestmappings and the forwarding to the Services. A concrete example we have a UserController, ...
0
votes
1answer
66 views

Database Password problem when using GIT to manage project that uses Spring to initiate Datasource

Program Situation I use Spring Framework to code my Web Service, using Dependency injection to inject a DataSource bean into the DAO bean that will be used by the Web Service. I have all the ...
1
vote
2answers
93 views

blurry lines between web application context layer, service layer and data access layer in spring

I Originally asked this question in SO but on advice I have moved the question here... I'll admit I'm a spring newbie, but you can correct me if I'm wrong, this one liner looks kinda fishy in a best ...
1
vote
2answers
487 views

Doubts about several best practices for rest api + service layer

I'm going to be starting a project soon that exposes a restful api for business intelligence. It may not be limited to a restful api, so I plan to delegate requests to a service layer that then ...
0
votes
0answers
128 views

Multiple long polling requests: bad idea?

I am designing a web server that handles multiple things such as a user-to-user chat, a user-to-group chat, friends request, forum etc. The chats have to be real-time chats, the friends requests ...
0
votes
0answers
258 views

Spring bean injection into a hibernate validator constraint

I have a controller method like listed below whose argument is annotated with @Valid to validate PasswordChange object using a Hibernate validator @Constraint. Both PasswordChange and a sample ...
0
votes
1answer
135 views

Pooling (Singleton) Objects Against Connection Pools

Given the following scenario A canned enterprise application that maintains its own connection pool A homegrown client application to the enterprise app. This app is built using Spring framework, ...
0
votes
1answer
90 views

Is Spring Source Tool suite required for J2EE application development? [closed]

I am following a tutorial. The guy keeps on adding different plug-ins such as subclipse, maven, spring source tool suite, etc after setting up jdk, eclipse, tomcat. While installing spring, he was ...
9
votes
3answers
2k views

Which classes should be autowired by Spring (when to use dependency injection)?

I have been using Dependency Injection in Spring for some time now, and I understand how it works and what are some pros and cons of using it. However, when I'm creating a new class I often wonder - ...
4
votes
3answers
497 views

Difference between an architecture and a framework [closed]

A terminology question appeared when I was comparing EJB 3 and Spring. Wikipedia says that Enterprise JavaBeans (EJB) is a managed, server-side component architecture for modular construction ...
0
votes
1answer
133 views

Spring JDBC Template without DAO?

I am rather new to writing applications that interact with databases, and I'm curious about a project I'm working on. I have to write a very simple web app which is going to be displaying metric data ...
1
vote
1answer
91 views

Implementing an interface from a framework vs simple java interface

This concept is unclear with me. I have worked on several frameworks for an instance Spring. To implement a feature we always implement some interfaces provided by the framework. For an instance if ...
0
votes
0answers
207 views

Generic/Dynamic objects in JSF

I'm starting to learn JSF and I was wondering how could I implement the following: I have an instance of Spring that contains several beans for logical and database operations, for example I have a ...
0
votes
0answers
59 views

Handling a sms pull request from spring controlller

I am using spring xml mapping and I have to handle a request that is coming from sms gateway and I want to send the response as SMS. My scenario is like user sends sms from mobile in the format code ...
1
vote
1answer
2k views

Separating front end from back end - Tomcat

I'm currently working with a company that uses Java / Tomcat / Spring for the back end of our web applications. As a front-end developer, I'm feeling more and more strongly that the back end should be ...
1
vote
1answer
163 views

The Nature of Spring [duplicate]

Is it accurate to say that dependency injection manually using java (without spring) is nothing but implementing the strategy pattern (as per this example)? Furthermore, is it correct to say that ...
1
vote
0answers
167 views

How to integrate google search results in a spring mvc app

Here's what am trying to do (and searching for similar hasn't shown any results anywhere): On my website - provide an input box which will search google for results. I want to display those results ...
1
vote
1answer
284 views

How to properly use Hibernate

I am new to Hibernate so my question could be seen as a very straight forward one, also I will try not to be too generic (as I am always told off because of that), although as with all architectural ...
0
votes
1answer
779 views

What is bootstrap listener in the context of Spring framework?

I am studying Spring framework, in web.xml I added following which is a bootstrap listener. Can anyone give me a proper idea of what is a bootstrap listener? <listener> ...
-1
votes
1answer
242 views

Options for implementing aggregate message processing [closed]

I am developing a web service in java that requires to do an asynchronous call to a 3rd party app by aggregating about 100 requests or for a minute (whichever happens earlier). Is there any open ...
0
votes
1answer
123 views

BlazeDS: Server DTO method naming convention

I have the following field in Flex: [Bindable] public var zIndex:uint; And I was trying to create the methods to process the calls in Java and I ran into a problem. 1. public int getZIndex(); // ...
3
votes
1answer
2k views

Multi-module web project with Spring and Maven

Assume we have a few projects, each containing some web resources (e.g., html pages). parent.pom +- web (war) +- web-plugin-1 (jar) +- web-plugin-2 (jar) ... Let's say web is the ...
2
votes
1answer
110 views

Scalable spring core with AMQP?

I use 3 standard Spring MVC war, which share a common core (Services, DAO, and Models). The main problem is when I plan to deploy all the 3 wars on a same server. I have the Core Application Context ...
0
votes
1answer
198 views

Could I have a real-world example of using the Spring scripting module in your Java application?

The Spring framework supports the use of scripting languages (specifically JRuby, Groovy and BeanShell) whereby a script in any of these can call Java code and vice versa. I have read that a possible ...
1
vote
0answers
225 views

Atmosphere + Long Polling : No message distribution?

I'm experiencing a strange behavior with Atmosphere + Long Polling. I'd like to have a broadcaster per user, so I have registered a broadcaster on resource suspension with id : /user/. I use ...
8
votes
4answers
1k 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
2k 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
807 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
219 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
891 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
1k 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
988 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
939 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
841 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
564 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
360 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
6k 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
477 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
401 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 ...
5
votes
3answers
3k 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? ...
0
votes
1answer
598 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 ...
3
votes
4answers
9k 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
4k 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 ...
1
vote
1answer
7k 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
390 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
538 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
347 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
1k 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?