The Cost Of An "Empty" Transaction--Screencast

Is it worth to disable transaction (with e.g. @TransactionAttribute(TransactionAttributeType.NEVER)) on an EJB method for optimization purposes? Such micro-optimizations increase the complexity, but what is the actual benefit?

In this following screencast a Servlet was deployed with and without involving a UserTransaction and the performance difference was measured with JMeter.

Thanks for watching!

See also other screencasts at: http://tv.adam-bien.com or subscribe to http://www.youtube.com/user/bienadam.

See you at Java EE Workshops at MUC Airport!

Comments:

Hi Adam
Thanks for the video.

I have a question on JVM optimization for the transactions in this scenario.

You say that the second time the test ran it is a little bit faster and it might be that the JVM is optimized. Can you explain more? Because you changed code (added transaction) and redeployed?

Will it be a different scenario if you cleaned out the app from glassfish and redeploy?

Posted by Rentius on August 13, 2013 at 12:20 PM CEST #

Post a Comment:
  • HTML Syntax: NOT allowed
...the last 150 posts
...the last 10 comments
License