Return-Path: X-Original-To: apmail-incubator-deltaspike-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-deltaspike-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id BB0E19600 for ; Tue, 12 Jun 2012 07:57:45 +0000 (UTC) Received: (qmail 72508 invoked by uid 500); 12 Jun 2012 07:57:45 -0000 Delivered-To: apmail-incubator-deltaspike-dev-archive@incubator.apache.org Received: (qmail 72375 invoked by uid 500); 12 Jun 2012 07:57:44 -0000 Mailing-List: contact deltaspike-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: deltaspike-dev@incubator.apache.org Delivered-To: mailing list deltaspike-dev@incubator.apache.org Received: (qmail 72339 invoked by uid 99); 12 Jun 2012 07:57:43 -0000 Received: from issues-vm.apache.org (HELO issues-vm) (140.211.11.160) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Jun 2012 07:57:43 +0000 Received: from isssues-vm.apache.org (localhost [127.0.0.1]) by issues-vm (Postfix) with ESMTP id C0F2D1402B5 for ; Tue, 12 Jun 2012 07:57:42 +0000 (UTC) Date: Tue, 12 Jun 2012 07:57:42 +0000 (UTC) From: "Mark Struberg (JIRA)" To: deltaspike-dev@incubator.apache.org Message-ID: <102506047.6352.1339487862794.JavaMail.jiratomcat@issues-vm> In-Reply-To: <1024037226.4051.1339445862594.JavaMail.jiratomcat@issues-vm> Subject: [jira] [Commented] (DELTASPIKE-191) get rid of BeanManagerProvider#setTestMode() MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/DELTASPIKE-191?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13293423#comment-13293423 ] Mark Struberg commented on DELTASPIKE-191: ------------------------------------------ Yes, we need to make users aware. Actually any @Inject besides injecting the BeanManager itself during CDI container bootstrap is not supported by the CDI spec and will cause non-portable behaviour. In some cases/containers you will even get an Exception if you try to @Inject something else during boot or if you call BeanManager#getReference() in that time. I'll add a flag 'booted' and throw an IllegalStateException if a user tries to invoke BeanManagerProvider.getInstance().getBeanManager() before @Observes AferDeploymentValidation. > get rid of BeanManagerProvider#setTestMode() > -------------------------------------------- > > Key: DELTASPIKE-191 > URL: https://issues.apache.org/jira/browse/DELTASPIKE-191 > Project: DeltaSpike > Issue Type: Bug > Components: Core > Affects Versions: 0.2-incubating > Reporter: Mark Struberg > Assignee: Mark Struberg > Fix For: 0.3-incubating > > > this is an absolute antipattern and we must remove it asap! > We also need to review all the RootBeanManagerProvider pattern. This seems like huge tons of code just to provide a workaround for a broken container. -- 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