Skip to content

A wrong description of CGLIB proxying in reference document ? [SPR-13103] #17694

@spring-projects-issues

Description

@spring-projects-issues

Kazuki Shimizu opened SPR-13103 and commented

Probably, a description of CGLIB proxying is wrong in the "9.6 Proxying mechanisms".

A wrong description is follows:

The constructor of your proxied object will be called twice. This is a natural consequence of the CGLIB proxy model whereby a subclass is generated for each proxied object. For each proxied instance, two objects are created: the actual proxied object and an instance of the subclass that implements the advice. This behavior is not exhibited when using JDK proxies. Usually, calling the constructor of the proxied type twice, is not an issue, as there are usually only assignments taking place and no real logic is implemented in the constructor.

The constructor of proxied object will be not called twice on the Spring 4(i tried using 4.1.6.RELEASE).


Affects: 4.1.6

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions