DWR fails to identify lazy init beans

Description

None

Activity

Show:
Jose Noheda
May 27, 2008, 9:25 AM

Sample project showing the issue

Pablo Krause
May 28, 2008, 7:04 PM

A breif explanation of the behaviour and sample code:

There are 2 beans defined in Spring: Hello and Goodby.
Goodby is declared as lazy-init="true".
Each bean prints a message when they are instantiated.
When the application starts, and the Spring context gets loaded, only Hello bean gets instantiated as can be seen by the message ">>> Hello bean instantiated. <<<" that gets printed.
So far so good, but when I invoke the Hello bean through dwr, the Goodby bean gets instantiated (which shouldn't, as it is lazy) as can be seen by the message being printed ">>> Goodby bean instantiated. <<<".
This happens as soon as I point my browser to the web app since the index.html uses Hello.js. This also happens if you point your browser to http://localhost:8080/DWRSpringLazyInit/dwr/test/Hello or http://localhost:8080/DWRSpringLazyInit/dwr/.

Assignee

Jose Noheda

Reporter

Jose Noheda

Labels

None

Documentation Required

None

Components

Fix versions

Affects versions

Priority

Major
Configure