Win a copy of liveProject: Protecting User Data with Spring Security and OAuth2 this week in the Spring forum!

Csabba Csurja

Greenhorn
+ Follow
since Jan 12, 2012
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Csabba Csurja

Hello Guys,

this is not exactly spring specific question, but I am kind of spring fun, so I put this question in the air..and hopefully you will give me the right answer!

If there is a requirement from bank for implementation let's say e.g. web banking system whereas the security, reliability are paramount, which technical architecture do you think the most effective/suitable for the given scenario.
1) Spring 3.1 and Tomcat 7.0 can be a reasonable alternative
2) Spring 3.1 + Application Server (Webshpere/Weblogic??)
3) EJB + Application Server

My quesion is, is there any reason why we I should really go for Nr2, because the so called technical background (transaction, security, messaging) is/can be completly handled by the Spring Framework.
Because of the comprehensive technology (transaction, jms, etc) support of the spring I can't see the reason to for application framework. but if yes, which one and why :-)


Nr3. is not very much relevant here, but maybe there could be also some arguments...

thank you guys, I really waiting for your pros/contras!


Cheers,
Csaba
9 years ago
Hi Sam,

there is nothing special, which looks like this:



thanks,
Csaba
9 years ago
Hello Guys,

I have a very simple example for testing the transaction feature in Spring 3.
There is a Requires_new propagation level, and I would expect that this transaction as a whole will be rolled back completely because expiration flag is after second run was changed to false (-> throws UnsupportedOperationException error)
But the john, mike are commited and shaik is not...




snippet from applictationContext.xml


Intentionally, I tried to keep this example as simple as possible, What did I wrong?

Thanks in advance,
Csaba

9 years ago
Thanks Mark!

Can I say, that I was not able to see the wood for the trees ? ;-)
9 years ago
Hi Kori,

1) read some quick overview about dependency injection, singletons, proxy design patterns. you don't have to go very much into the details, but at leas some high-level knowledge...
2) there is a very good tutorial on the mkyong website.
these are short and smart....quite useful
3) download sts eclipse and try to remake these example
4) books (spring in action), forum, etc.


Regards,

Csaba
9 years ago
Hello Guys,

I am curious about your opinion regarding to the proper implementation/usage of DI in Spring MVC:

There are two classes: One Controller which works with a List (for dropdown menu) and there is an another Service class which carries the List elements from DB layer.
How would you inject Service into Contoller in Spring MVC?






My questions:
Is there a way to inject DropDownService.getDropDownItems() elements into DropDownController.dropDownItems List through Dependency Injection in this case? If yes, then how ;-)

Actually, I am looking for the most sophisticated solution, for this reason I am curious about your opinion!

Thanks,
Csaba

9 years ago
Yes, you are completly true.

If you use Annotation Driven Controller in Spring MVC then you code will look very simple and you can handle the request easly.

I am just saying, if you are a not that much experienced, then setting up Struts env. is easier and faster..., becasuse the number of the tunning/configuration possiblities are less!
9 years ago
Hi,

from your posted code I was not able to see what is the statment in MCMBSimplyForFun.java:180 line.
Basically, the getJdbcTemplate.queryForInt doesn't throw NullPointerException.
Are you sure that getJdbcTemplate is not null it self, you can check it, if not then give a try to execute a very simple query which is 100% should run (e.g. without any paramter)

Regards,
Csaba
9 years ago
Hi,

Spring is an Application Framework, is offers component for almost everything: database, messaging, transaction, security, aop, etc. and even mvc (suitable for webapplication)
Struts is only a WebFramework.

If you need to build a basic webapplication or you don't want to put so much effort then go for Struts (easier because it is simplier)
but if you would like to start the V8 engine and preparing for some higher requierements the go for Spring MVC.

you can find great tutorial for both technologies here!

Regards,
Csaba
9 years ago
Hi Prasad,

you can find the required courses on the internet (eductaion_dot_oracle_dot_com)

One of them (Live or Webinar) is mandatory for the application to the SCEA.
The "cheapest" one : JSF and I guess the most useful maybe Java or JEE5 Design Patterns...

Regards,
Csaba