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

learn more… | top users | synonyms

-4
votes
0answers
48 views

Spring's @Configuration - main() method required? [on hold]

When you're coding for a .jar file, and you're using Spring, you can code an @Configuration class that defines your beans, using the @Bean notation. So far, so good. Do you need a separate class ...
2
votes
1answer
128 views

Usage - Factory Pattern vs Dependency Injection [closed]

Okay, this question is not on which is better. It is more about when to use Dependency Injection vs Factory. I have done a bit of research and it goes like this. DIP: Provides loose coupling, ...
1
vote
2answers
193 views

Why Java does not have a framework like Rails? [closed]

I am a Ruby on Rails developer and I like its simplicity and rapidness. On the other hand we need to use Java for some projects that we develop for our clients. My question is why (pure) Java does ...
2
votes
2answers
82 views

What is a transaction?

When reading Spring tutorials I'm quite often coming across the @Transactional annotation. When I google it, I get documentation that says things like: Comprehensive transaction support is among ...
1
vote
2answers
100 views

What should be the best way to run a long operation in Java Spring?

I am working on a price comparator, one of the module of application crawls through the list of website against the product stored in the database and updates the price in the application database. ...
0
votes
0answers
30 views

How to start helping out with an open source project (Spring Integration) [duplicate]

On a professional level, I am starting to specialize myself into architecture, and enterprise integration. The last year I've been working on a project where I mostly helped out with the software and ...
3
votes
2answers
149 views

Is it still a good practice to log parameters and returns?

Just a context, I am currently making a base code for a Java Spring Boot Application. I am currently setting up the logging of the application and I stumbled upong this url and found it helpful. ...
2
votes
1answer
178 views

Injection, strategies and OO

I'm working on refactoring a project. The business logic looks very much like using the Strategy pattern would be very beneficial, because depending on the values of three properties (let's say age, ...
0
votes
0answers
34 views

Is it possible to define injection rules based on Spring bean scopes?

My application is using Spring as my dependency injection framework. I have been struggling recently with nasty concurrency and security bugs. The bugs were caused by injecting bean with incorrect ...
1
vote
1answer
64 views

Using session managed application environment vs no protection

First of all sorry for the title, I didn't know how to explain it. So here comes the story; We are bunch of coders, front-end and back-end, and we are going to create this new system, based on ...
0
votes
0answers
54 views

Setting up a security level bean on Spring Boot

I have two tables called users and authorities on a Spring Boot project which includes JPA, Spring Security and MySQL database among other things. As all of the operations like adding new users are ...
1
vote
2answers
36 views

Application model management questions

Consider the following type of Java / Spring web application, with an SQL database: there are multiple data entity types (about 100) with relations between them the entities are viewed, edited or ...
0
votes
1answer
261 views

What is the usefulness of transactions in a batch (especially a Spring batch)?

I understand what a transaction is in a web application, where you have some groups of database interactions which have to fail or succeed together so the database is always in coherent state. But ...
0
votes
1answer
91 views

Can I ditch the persistence.xml file on JBoss?

I have a Spring based app where another programmer is using JPA's persistence.xml file to define the setup of hibernate and to define the entities that are being persisted. The app is using Spring's ...
1
vote
0answers
57 views

Where should business logic involving SQL go? [duplicate]

I have this question that's been bugging me all day. I have a function like this: public void voidUsersByUserId(List<Integer> userIds) { Query query = ...
1
vote
2answers
213 views

How to add rigor to my testing?

I work on a small/medium sized Java application. Over time, I've tried to ensure that the tests which I write are "good" tests, and that there's plenty of them. Hence I've been looking into various, ...
0
votes
0answers
288 views

Are prototype beans with constructor parameters an anti-pattern?

Reading on this, Misko Hevery has said “Newables can ask for other Newables in their constructor, but not for Injectables” Now it appears to me that requesting a prototype be instantiated at run-time ...
3
votes
2answers
653 views

Programmatically extending Hibernate table/entity definitions in Spring, how?

I would like to know if there is a way —maybe with AOP— to extend table/entity definitions so that I can add functionality across the board that requires persistence. Let me explain what I want to do ...
1
vote
0answers
32 views

Is there a way to handle shared javascript assets in Spring?

I'm familiar with MVC web frameworks and lately very familiar with Symfony2. I want to start learning Spring, and the first practical problem I would like to try to solve is handling the reuse of ...
1
vote
1answer
79 views

Duplicate method in spring services, how to refactor?

ServiceOne.java private void doStuff(){} ServiceTwo.java private void doStuff() Where to put common code ? Shall I create a new service, but then what interface will it implement ? Or shall I ...
-3
votes
3answers
156 views

What programming languages are most suitable for implementing design patterns? [closed]

What programming language is best for implementing design patterns, (Factory , etc) especially for example if I need to develop a engineer scheduling system in less than a month. Would Java be my ...
0
votes
0answers
26 views

webdav in jsr268 portal application

We have a web application that we have made portal compatible(JSR 268) using spring. One part that has not been ported across is a WebDav servlet. Is it possible to have a portlet handle WebDav? or ...
2
votes
1answer
543 views

Issues about static injection in Spring?

I use spring-boot with spring xml in my project. I wrapper the DAOs in a DataAccessService class to serve as a DB service layer, both the service and the DAOs are injected in spring xml and used by ...
0
votes
1answer
468 views

issues about Spring initialization in different environment

I have some questions about spring's initialization in different environment. 1. In web container context, such as tomcat. I knew that spring can be initialized by declaring ...
8
votes
3answers
2k views

Should service layer catch all dao exceptions and wrap them as service exceptions?

I have three layer Spring web app: dao, service and controllers. A controller never calls directly the dao, it does it through the service layer. Right now, most of the time if there is dao exception ...
0
votes
1answer
494 views

Spring web application deployment infrastructure

I'm interested in hearing out what's out there in terms of tips and tricks on deploying and maintaining a Java web application whilst keeping agile. I'm running solo on a startup project I'd like to ...
1
vote
0answers
100 views

Implementing a universal timer for a game with multiple players in spring mvc

I am trying to create a simple online card game with multiple players. Basically, there's a dealer and multiple players. I have have already implemented most of the game and it's working fine. now I ...
6
votes
1answer
1k views

Java application structure: Horizontal vs vertical split

Having a bit of a debate about the starting project structure (using Maven/Eclipse) for a big Java application. Option 1: entities (i.e. the whole database using Hibernate classes-first) services ...
4
votes
2answers
419 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
1answer
44 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, ...
3
votes
1answer
191 views

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

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 database properties(Url, ...
2
votes
2answers
230 views

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

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 practices sort of way: @RepositoryRestResource(collectionResourceRel="people"...) ...
1
vote
0answers
322 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 ...
1
vote
0answers
884 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
2answers
389 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
144 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 ...
11
votes
3answers
9k 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 - ...
5
votes
3answers
2k 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
231 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
139 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 ...
3
votes
1answer
5k 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
214 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
304 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
427 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 ...
1
vote
1answer
2k 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
691 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
217 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
4k 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
147 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
398 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 ...