[JBoss JIRA] Created: (SOLDER-50) Throw a specialized exception when BeanManagerAware cannot resolve BeanManager
by Dan Allen (JIRA)
Throw a specialized exception when BeanManagerAware cannot resolve BeanManager
------------------------------------------------------------------------------
Key: SOLDER-50
URL: https://issues.jboss.org/browse/SOLDER-50
Project: Seam Solder
Issue Type: Feature Request
Components: Core
Reporter: Dan Allen
Assignee: Lincoln Baxter III
Priority: Minor
The BeanManagerAware#getBeanManager() method currently throws an IllegalArgumentException when the BeanManager cannot be found by any provider. Because this exception is so generic, it's dangerous to bundle the lookup with other code because you aren't sure whether the IllegalArgumentException came from the BeanManager lookup or from a subsequent call, as in:
try {
BeanManager beanManager = BeanManagerAccessor.getBeanManager();
beanManager.fireEvent(payload);
}
catch (IllegalArgumentException e) {
// what caused this?
}
Introduce a specialized checked exception for this unique failure. The proposed name is BeanManagerNotAvailable (or BeanManagerNotFound)
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years, 3 months
[JBoss JIRA] Resolved: (SOLDER-17) NarrowingBeanBuilder should support reading from Annotated
by Dan Allen (JIRA)
[ https://issues.jboss.org/browse/SOLDER-17?page=com.atlassian.jira.plugin.... ]
Dan Allen resolved SOLDER-17.
-----------------------------
Assignee: Dan Allen
Fix Version/s: (was: 3.0.0.Beta1)
Resolution: Rejected
As I came to understand NarrowingBeanBuilder better, I found I didn't need this feature. The proper pattern is to obtain the type at the injection point, then use BeanManager to create an annotated type. You then use that return value as the AnnotatedType to read from. For now, I'm rejecting until I encounter a case where I really do need it.
> NarrowingBeanBuilder should support reading from Annotated
> ----------------------------------------------------------
>
> Key: SOLDER-17
> URL: https://issues.jboss.org/browse/SOLDER-17
> Project: Seam Solder
> Issue Type: Feature Request
> Reporter: Dan Allen
> Assignee: Dan Allen
>
> Currently, NarrowingBeanBuilder supports reading only from AnnotatedType. However, if you are trying to create a specialized producer method based on information at an injection point, you need to be able to read from the more general Annotated type.
> In fact, the NarrowingBeanBuilder is currently not using any information from AnnotatedType that isn't provide by Annotated, so it's definition worth making more general.
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years, 3 months