Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

<task:executor/> cannot be used as an inner bean [SPR-6388] #11054

Closed
spring-projects-issues opened this issue Nov 18, 2009 · 4 comments
Closed
Assignees
Labels
type: bug A general bug
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

Dave Syer opened SPR-6388 and commented

task:executor/ cannot be used as an inner bean because its parser treats the id attribute as mandatory. If this can be fixed it would be useful.


Affects: 3.0 RC2

@spring-projects-issues
Copy link
Collaborator Author

Mark Fisher commented

The one thing we need to consider with this is how the thread name prefix would be determined. Normally the default is the bean name + "-pool-". For monitoring and management it's necessary to have a name. I see two options, either keep "id" as a required field but use it as the thread prefix only in the nested case, or else create the name from the owning bean's name + "-pool-".

@spring-projects-issues
Copy link
Collaborator Author

Juergen Hoeller commented

Good point. I guess the easiest solution would be to keep using id for the thread prefix and just to make sure that the element can still be used in a nested fashion. This would be similar to a plain nested <bean> then, which may have an id specified that the instance can receive through BeanNameAware; it just won't be registered as a named bean with the factory.

Juergen

@spring-projects-issues
Copy link
Collaborator Author

Dave Syer commented

That behaviour is probably already supported, right? I was just surprised that I was unable to remove the id when it was an inner bean.

@spring-projects-issues
Copy link
Collaborator Author

Juergen Hoeller commented

Alright, I'll add a test case for the nested scenario and will mention the semantics of the id value in the namespace documentation.

Juergen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug A general bug
Projects
None yet
Development

No branches or pull requests

2 participants