Relative Content

Tag Archive for spring

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 constraint are listed below. As you can see, I am injecting up loginDao inside the constraint. Is this an anti-pattern ?

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 constraint are listed below. As you can see, I am injecting up loginDao inside the constraint. Is this an anti-pattern ?

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 want to implement a universal timer for a single game. For example, when the dealer starts a new game the timer starts and the players will be notified that the game started, and then there will be a countdown which will be seen by the players and the dealer.

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 want to implement a universal timer for a single game. For example, when the dealer starts a new game the timer starts and the players will be notified that the game started, and then there will be a countdown which will be seen by the players and the dealer.

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 want to implement a universal timer for a single game. For example, when the dealer starts a new game the timer starts and the players will be notified that the game started, and then there will be a countdown which will be seen by the players and the dealer.

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 want to implement a universal timer for a single game. For example, when the dealer starts a new game the timer starts and the players will be notified that the game started, and then there will be a countdown which will be seen by the players and the dealer.

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 maintain.

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 maintain.

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 maintain.

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 (runtime) that is not handled, it’ll be caught by a JSP showing an error message to the end user.
Should service layer catch all dao exceptions and wrap them as service exceptions?