10

I am developing a secure web application that does financial transactions and using spring in it. Which will be more suitable to use for security, JAX-RS services or spring rest services? I thought of going with spring as we are already using it in application and if it provides the features then why to go for JAX-RS, but as I said its a highly secured web application where people will buy things and make financial transactions so I have to see which is more suitable to use.

I followed the following blogs still a little confused…

Can anybody suggest which will be more useful to use ??

2 Answers 2

5

It's not an either-or choice. I use Spring and JAX-RS (specifically, Apache CXF, which implements the JAX-RS specification) together in the same secured application.

The key to understanding this is to note that Spring isn't one homogenous lump. It's actually many pieces. The parts I'm using are (approximately) the Spring IoC core, Spring AOP and Spring Security. The IoC core is the part that is Spring; it manages the lifecycle and configuration of your beans. I use AOP for transaction management (since that's far easier than coding all that myself in each method that needs a transaction). The management of the dispatch of the REST calls to my code is handled by Apache CXF (which sits very nicely inside Spring IoC provided you use the right context loader) and that does work well with Spring Security.


As a side note, you are aware that financial transaction handling is tricky? Not because the code is that much harder, but because the consequences of getting it wrong are worse and there are plenty of people willing to try to make things go wrong for personal gain.

-1

I worked with both Jersey Rest and spring rest also Jersey Rest with spring also ,Both of then are Very rich frameworks with nice implementation ,I would suggest its better to go with Spring rest if you are using other Spring services such as ORM ,Spring security an DI etc , Both are spring libraries so i feel little bit essay for managing code and dependencies

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.