Grails

BeanBuilder does not resolve Spring reference in a Child bean

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.1
  • Fix Version/s: 1.2.1
  • Component/s: None
  • Labels:
    None
  • Environment:
    Windows XP
    Eclipse
  • Testcase included:
    yes

Description

Attached is an example of when a script, running a bean builder, does not wire the spring configuration correctly.

The concrete bean has references to a parent bean that has some properties set to an external bean reference. This reference in the child is NULL.

It may, in some way, be related to http://jira.codehaus.org/browse/GRAILS-490 where I first reported this.

This breaks DRY, as I keep having to include the external bean reference in all child beans.

Activity

Hide
Matthew Corby-Eaglen added a comment -

interestingly if I move the declaration of the reference to myABean into a groovy class, (class GroovyC in my example) the reference is carried over to all children.

Show
Matthew Corby-Eaglen added a comment - interestingly if I move the declaration of the reference to myABean into a groovy class, (class GroovyC in my example) the reference is carried over to all children.
Hide
Matthew Corby-Eaglen added a comment -

Any comment on why this happens?

It still happens in 1.2.1 btw

Show
Matthew Corby-Eaglen added a comment - Any comment on why this happens? It still happens in 1.2.1 btw
Hide
Matthew Corby-Eaglen added a comment -

Hmm I just ran my testcase in 1.2.1 and it seems ok

My main application must have another issue, one of my bean references is coming out null..

Show
Matthew Corby-Eaglen added a comment - Hmm I just ran my testcase in 1.2.1 and it seems ok My main application must have another issue, one of my bean references is coming out null..
Hide
Matthew Corby-Eaglen added a comment -

this seems to work in 1.2.1, resolving

Show
Matthew Corby-Eaglen added a comment - this seems to work in 1.2.1, resolving

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: