aries-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Timothy Ward (JIRA)" <>
Subject [jira] [Resolved] (ARIES-657) Enhanced support for custom scopes
Date Tue, 21 Jun 2011 08:33:47 GMT


Timothy Ward resolved ARIES-657.

    Resolution: Fixed
      Assignee: Timothy Ward

> Enhanced support for custom scopes
> ----------------------------------
>                 Key: ARIES-657
>                 URL:
>             Project: Aries
>          Issue Type: Improvement
>          Components: Blueprint
>            Reporter: Brian DePradine
>            Assignee: Timothy Ward
>         Attachments: new_patch.txt
> I am currently working on a project that requires the use of a custom scope as follows:
> <blueprint xmlns=""
>            xmlns:test="">
>     <bean id="fooService" class="fooServiceImpl" scope="test:foo"/>
> </blueprint>
> In order to support my custom scope, I provide a NamespaceHandler whose job it is to
register a BeanProcessor that implements the caching required by my custom scope. This then
allows the cached instances to be retried using BlueprintContainer.getComponentInstance().
When I tried to get this working, however, I discovered a few issues.
> 1) Aries treats all scopes as strings, and as a result the scope from the example above
is "test:foo". This is incorrect, as custom scopes are always qualified names, and so the
correct value for the scope is "{}foo".
> 2) All beans that do not have a scope of "prototype" are automatically cached by the
blueprint container. This means that my bean processor is only ever called the first time
that the bean is requested. My bean processor is unable to do its job unless it is called
everytime that a request for the bean is made.
> 3) Eager activation doesn't make sense for a custom scope, as it should only apply to
'singleton' scopes.
> Patch to follow.

This message is automatically generated by JIRA.
For more information on JIRA, see:


View raw message