"adrian(a)jboss.org" wrote :
| A quick hack for you (though not the correct fix)
| would be to change your ScopeInfo initialization code to something like:
|
I've already applied something similar:
-
http://fisheye.jboss.org/browse/JBossAS/projects/jboss-deployers/trunk/de...
| <> 113 - scopeInfo.setScope(unit.getScope());
| 114 - scopeInfo.setMutableScope(unit.getMutableScope());
| 117 + if (scopeInfo != null)
| 118 + {
| 119 + mergeScopes(scopeInfo.getScope(), unit.getScope());
| 120 + mergeScopes(scopeInfo.getMutableScope(), unit.getMutableScope());
| 121 + }
| 115 122 try
| 116 123 {
| 117 124 controller.install(context);
|
|
| !
|
|
|
| â¦
|
| 122 129 }
| 123 130 }
| 124 131
| <> 132 + /**
| 133 + * Merge scope keys.
| 134 + *
| 135 + * @param contextKey the context key
| 136 + * @param unitKey the unit key
| 137 + */
| 138 + protected static void mergeScopes(ScopeKey contextKey, ScopeKey unitKey)
| 139 + {
| 140 + if (contextKey == null)
| 141 + return;
| 142 + if (unitKey == null)
| 143 + return;
| 144 +
| 145 + Collection<Scope> unitScopes = unitKey.getScopes();
| 146 + if (unitScopes == null || unitScopes.isEmpty())
| 147 + return;
| 148 +
| 149 + for (Scope scope : unitScopes)
| 150 + contextKey.addScope(scope);
| 151 + }
|
But like I posted on the jboss-dev:
"alesj wrote :
| The JBossAS5_trunk now boots fine with all MC snapshots.
| My demos also work. :-)
|
| But I haven't closed JBDEPLOY-69 yet.
| Any other corner case we can think of?
|
I'll add a test for annotated beans in deployers first.
And Kabir should/could also add some test exposing his work.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4169556#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...