<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>rag594</title><link>https://raghavrastogi.in/</link><description>Recent content on rag594</description><generator>Hugo -- gohugo.io</generator><language>en-us</language><lastBuildDate>Sat, 13 Sep 2025 00:00:00 +0000</lastBuildDate><atom:link href="https://raghavrastogi.in/index.xml" rel="self" type="application/rss+xml"/><item><title>Dissecting Spring's @Transactional Annotation</title><link>https://raghavrastogi.in/posts/spring-transactional-annotation/</link><pubDate>Sat, 13 Sep 2025 00:00:00 +0000</pubDate><guid>https://raghavrastogi.in/posts/spring-transactional-annotation/</guid><description>&lt;p&gt;In Spring we widely use &lt;strong&gt;@Transactional&lt;/strong&gt; annotation for executing bunch of stuff wrapped up in a DB transaction.
Spring makes it easier for us to leverage AOP(Aspect Oriented programming) and does not pollute our business logic with DB Transaction, security, caching, logging etc. Before diving into the nitty-gritties of &lt;strong&gt;@Transactional&lt;/strong&gt;, lets start with what are proxy objects and how does Spring makes use of it for &lt;strong&gt;@Transactional&lt;/strong&gt;&lt;/p&gt;
&lt;h2 id="what-is-a-proxy-and-how-does-spring-uses-it-under-the-hood"&gt;What is a proxy and how does Spring uses it under the hood?&lt;/h2&gt;
&lt;p&gt;Proxy acts like a substitute for the given object. It acts as a middleman and when any client calls a method on an object,
proxy object appears and acts on behalf of that object and performs any kind of action before/after method invocation.&lt;/p&gt;</description></item></channel></rss>