File tree 2 files changed +42
-1
lines changed
projects/stage-1/middleware-frameworks/my-cdi/src
main/java/org/geektimes/enterprise/inject/standard/beans/manager
test/java/org/geektimes/enterprise/inject
2 files changed +42
-1
lines changed Original file line number Diff line number Diff line change @@ -915,6 +915,46 @@ private void assertAfterBeanDiscovery() {
915
915
* by the container.
916
916
*/
917
917
private void performDeploymentValidation () {
918
+ validateBeanDependencies ();
919
+ validateBeanSpecialization ();
920
+ abortDeploymentIfProblemsDetected ();
921
+ }
922
+
923
+ private void validateBeanDependencies () {
924
+ validateEnabledBeanDependencies ();
925
+ validateInterceptorBeanDependencies ();
926
+ validateDecoratorBeanDependencies ();
927
+ }
928
+
929
+ private void validateEnabledBeanDependencies () {
930
+ validateManagedBeanDependencies ();
931
+ // TODO
932
+ }
933
+
934
+ private void validateManagedBeanDependencies () {
935
+ managedBeans .forEach (this ::validateManagedBeanDependencies );
936
+ }
937
+
938
+ private void validateManagedBeanDependencies (ManagedBean <?> managedBean ) {
939
+ for (InjectionPoint injectionPoint : managedBean .getInjectionPoints ()) {
940
+ Type requiredType = injectionPoint .getType ();
941
+ }
942
+ // TODO
943
+ }
944
+
945
+ private void validateInterceptorBeanDependencies () {
946
+ // TODO
947
+ }
948
+
949
+ private void validateDecoratorBeanDependencies () {
950
+ // TODO
951
+ }
952
+
953
+ private void validateBeanSpecialization () {
954
+ // TODO
955
+ }
956
+
957
+ private void abortDeploymentIfProblemsDetected () {
918
958
// TODO
919
959
}
920
960
Original file line number Diff line number Diff line change 18
18
19
19
import javax .annotation .PostConstruct ;
20
20
import javax .annotation .PreDestroy ;
21
+ import javax .annotation .Priority ;
21
22
import javax .enterprise .context .Dependent ;
22
23
import javax .enterprise .event .Observes ;
23
24
import javax .enterprise .inject .Disposes ;
@@ -60,7 +61,7 @@ public Book book() {
60
61
public void dispose (@ Disposes Book book ) {
61
62
}
62
63
63
- public void onEvent (@ Observes ProcessObserverMethod event ) {
64
+ public void onEvent (@ Observes @ Priority ( 1 ) ProcessObserverMethod event ) {
64
65
System .out .println (event );
65
66
}
66
67
}
You can’t perform that action at this time.
0 commit comments