deltaspike-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gerhard Petracek (Closed) (JIRA)" <>
Subject [jira] [Closed] (DELTASPIKE-56) Add BeanManagerProvider.getRequiredBeanManager() method
Date Tue, 14 Feb 2012 08:02:02 GMT


Gerhard Petracek closed DELTASPIKE-56.

> Add BeanManagerProvider.getRequiredBeanManager() method
> -------------------------------------------------------
>                 Key: DELTASPIKE-56
>                 URL:
>             Project: DeltaSpike
>          Issue Type: Improvement
>          Components: Core
>            Reporter: Christian Kaltepoth
>            Assignee: Gerhard Petracek
>            Priority: Minor
>             Fix For: 0.2-incubating
>         Attachments: DELTASPIKE-56.patch
> While reviewing the implementation of BeanManagerProvider I saw that getBeanManager()
may return null in some rare circumstances. Unfortunately this forces everyone calling this
method to check the result for null. I think most code calling the method absolutely requires
the BeanManager and cannot proceed without it.
> Therefore it would be nice to have some alternative getBeanManager() method that doesn't
return null if the BeanManager is not available but instead throws a meaningful runtime exception.
That's what Solder does  per default. Calling Solder's BeanManagerLocator.getBeanManager()
without a BeanManager being available will result in a BeanManagerUnavailableException.
> The attached patch adds a method getRequiredBeanManager() to the BeanManagerProvider
implementing this behavior.
> I'm not sure if this minor thing should be discussed on the mailing list. If you think
this should be discussed, please let me know, then I'll start a topic on deltaspike-dev.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


View raw message