What is the meaning of using proxy ( dynamic proxy) in spring framework?

Linh picture Linh · Feb 9, 2010 · Viewed 32.8k times · Source

I don't know the meaning of using proxy in spring. what is efficient?

Answer

Bozho picture Bozho · Feb 9, 2010

Proxies are used by AOP. In short:

Normally you have.

Caller --> Real object

But when, for example, you want automatic transaction management, spring puts a proxy of your real object

Caller --> Proxy --> Real object

where the proxy starts the transaction.

Here is nice article explaining both the essence of proxies and their efficiency (performance) in spring