You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@deltaspike.apache.org by "Christian Kaltepoth (Created) (JIRA)" <ji...@apache.org> on 2012/01/22 19:42:39 UTC
[jira] [Created] (DELTASPIKE-56) Add
BeanManagerProvider.getRequiredBeanManager() method
Add BeanManagerProvider.getRequiredBeanManager() method
-------------------------------------------------------
Key: DELTASPIKE-56
URL: https://issues.apache.org/jira/browse/DELTASPIKE-56
Project: DeltaSpike
Issue Type: Improvement
Components: Core
Reporter: Christian Kaltepoth
Assignee: Gerhard Petracek
Priority: Minor
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: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (DELTASPIKE-56) Add
BeanManagerProvider.getRequiredBeanManager() method
Posted by "Gerhard Petracek (Resolved) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DELTASPIKE-56?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Gerhard Petracek resolved DELTASPIKE-56.
----------------------------------------
Resolution: Won't Fix
Fix Version/s: 0.2-incubating
we agreed on a different approach (see http://s.apache.org/9MC) -> there will be a new jira issue for it
> Add BeanManagerProvider.getRequiredBeanManager() method
> -------------------------------------------------------
>
> Key: DELTASPIKE-56
> URL: https://issues.apache.org/jira/browse/DELTASPIKE-56
> 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: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (DELTASPIKE-56) Add
BeanManagerProvider.getRequiredBeanManager() method
Posted by "Mark Struberg (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DELTASPIKE-56?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13190739#comment-13190739 ]
Mark Struberg commented on DELTASPIKE-56:
-----------------------------------------
Hi Christian!
Thanks for raising that.
In fact, I would prefer to make this the default behaviour of getBeanManager to throw an IllegalStateException if it resolves to null.
> Add BeanManagerProvider.getRequiredBeanManager() method
> -------------------------------------------------------
>
> Key: DELTASPIKE-56
> URL: https://issues.apache.org/jira/browse/DELTASPIKE-56
> Project: DeltaSpike
> Issue Type: Improvement
> Components: Core
> Reporter: Christian Kaltepoth
> Assignee: Gerhard Petracek
> Priority: Minor
> 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: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (DELTASPIKE-56) Add
BeanManagerProvider.getRequiredBeanManager() method
Posted by "Gerhard Petracek (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DELTASPIKE-56?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13190799#comment-13190799 ]
Gerhard Petracek commented on DELTASPIKE-56:
--------------------------------------------
+1 >!< for moving this discussion to the mailing list.
> Add BeanManagerProvider.getRequiredBeanManager() method
> -------------------------------------------------------
>
> Key: DELTASPIKE-56
> URL: https://issues.apache.org/jira/browse/DELTASPIKE-56
> Project: DeltaSpike
> Issue Type: Improvement
> Components: Core
> Reporter: Christian Kaltepoth
> Assignee: Gerhard Petracek
> Priority: Minor
> 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: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Closed] (DELTASPIKE-56) Add
BeanManagerProvider.getRequiredBeanManager() method
Posted by "Gerhard Petracek (Closed) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DELTASPIKE-56?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Gerhard Petracek closed DELTASPIKE-56.
--------------------------------------
> Add BeanManagerProvider.getRequiredBeanManager() method
> -------------------------------------------------------
>
> Key: DELTASPIKE-56
> URL: https://issues.apache.org/jira/browse/DELTASPIKE-56
> 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: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (DELTASPIKE-56) Add
BeanManagerProvider.getRequiredBeanManager() method
Posted by "Christian Kaltepoth (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DELTASPIKE-56?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Christian Kaltepoth updated DELTASPIKE-56:
------------------------------------------
Attachment: DELTASPIKE-56.patch
> Add BeanManagerProvider.getRequiredBeanManager() method
> -------------------------------------------------------
>
> Key: DELTASPIKE-56
> URL: https://issues.apache.org/jira/browse/DELTASPIKE-56
> Project: DeltaSpike
> Issue Type: Improvement
> Components: Core
> Reporter: Christian Kaltepoth
> Assignee: Gerhard Petracek
> Priority: Minor
> 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: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (DELTASPIKE-56) Add
BeanManagerProvider.getRequiredBeanManager() method
Posted by "Christian Kaltepoth (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DELTASPIKE-56?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13190741#comment-13190741 ]
Christian Kaltepoth commented on DELTASPIKE-56:
-----------------------------------------------
Hi Mark,
I would also prefer to change the default behavior. I think throwing an exception makes more sense. Perhaps it would be a good idea to discuss this on the mailing list.
Christian
> Add BeanManagerProvider.getRequiredBeanManager() method
> -------------------------------------------------------
>
> Key: DELTASPIKE-56
> URL: https://issues.apache.org/jira/browse/DELTASPIKE-56
> Project: DeltaSpike
> Issue Type: Improvement
> Components: Core
> Reporter: Christian Kaltepoth
> Assignee: Gerhard Petracek
> Priority: Minor
> 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: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Issue Comment Edited] (DELTASPIKE-56) Add
BeanManagerProvider.getRequiredBeanManager() method
Posted by "Gerhard Petracek (Issue Comment Edited) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DELTASPIKE-56?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13201389#comment-13201389 ]
Gerhard Petracek edited comment on DELTASPIKE-56 at 2/6/12 4:52 PM:
--------------------------------------------------------------------
we agreed on a different approach (see http://s.apache.org/9MC ) -> there will be a new jira issue for it
was (Author: gpetracek):
we agreed on a different approach (see http://s.apache.org/9MC) -> there will be a new jira issue for it
> Add BeanManagerProvider.getRequiredBeanManager() method
> -------------------------------------------------------
>
> Key: DELTASPIKE-56
> URL: https://issues.apache.org/jira/browse/DELTASPIKE-56
> 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: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira