Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
queue definition and deployment errors and throw after observers have…
… been notified git-svn-id: http://anonsvn.jboss.org/repos/weld/ri/trunk@2855 1c488680-804c-0410-94cd-c6b725194a0e
- Loading branch information
1 parent
12c8254
commit 19a5baa
Showing
3 changed files
with
31 additions
and
12 deletions.
There are no files selected for viewing
16 changes: 11 additions & 5 deletions
16
impl/src/main/java/org/jboss/webbeans/bootstrap/AfterBeanDiscoveryImpl.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,22 @@ | ||
package org.jboss.webbeans.bootstrap; | ||
|
||
import javax.enterprise.inject.spi.AfterBeanDiscovery; | ||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
import org.jboss.webbeans.DefinitionException; | ||
import javax.enterprise.inject.spi.AfterBeanDiscovery; | ||
|
||
public class AfterBeanDiscoveryImpl implements AfterBeanDiscovery | ||
{ | ||
private List<Throwable> definitionErrors = new ArrayList<Throwable>(); | ||
|
||
public void addDefinitionError(Throwable t) | ||
{ | ||
//XXX spec says need to delay abort until all observers | ||
//have been notified | ||
throw new DefinitionException(t); | ||
definitionErrors.add(t); | ||
} | ||
|
||
public List<Throwable> getDefinitionErrors() | ||
{ | ||
return definitionErrors; | ||
} | ||
|
||
} |
15 changes: 10 additions & 5 deletions
15
impl/src/main/java/org/jboss/webbeans/bootstrap/AfterDeploymentValidationImpl.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,21 @@ | ||
package org.jboss.webbeans.bootstrap; | ||
|
||
import javax.enterprise.inject.spi.AfterDeploymentValidation; | ||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
import org.jboss.webbeans.DeploymentException; | ||
import javax.enterprise.inject.spi.AfterDeploymentValidation; | ||
|
||
public class AfterDeploymentValidationImpl implements AfterDeploymentValidation | ||
{ | ||
private List<Throwable> deploymentProblems = new ArrayList<Throwable>(); | ||
|
||
public void addDeploymentProblem(Throwable t) | ||
{ | ||
//XXX spec says need to delay abort until all observers | ||
//have been notified | ||
throw new DeploymentException(t); | ||
deploymentProblems.add(t); | ||
} | ||
|
||
public List<Throwable> getDeploymentProblems() | ||
{ | ||
return deploymentProblems; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters