[jboss-dev-forums] [Design the new POJO MicroContainer] - Re: StructureContext and candidate annotations
alesj
do-not-reply at jboss.com
Wed Aug 6 05:35:29 EDT 2008
We probably need to keep the found information somewhere.
e.g. on StructureContext
| Set<Class<? extends Annotation>> foundAnnotations;
|
So we can then later on set ear module's type:
| // Create subdeployments for the ear modules
| for (EarModule mod : modules)
| {
| String fileName = mod.getFileName();
| if (fileName != null && (fileName = fileName.trim()).length() > 0)
| {
| try
| {
| VirtualFile module = file.getChild(fileName);
| if (module == null)
| {
| throw new RuntimeException(fileName
| + " module listed in application.xml does not exist within .ear "
| + file.getName());
| }
| // Ask the deployers to analyze this
| if (structureContext.determineChildStructure(module) == false)
| {
| throw new RuntimeException(fileName
| + " module listed in application.xml is not a recognized deployment, .ear: "
| + file.getName());
| }
| // SET MODULE's TYPE HERE
| }
| catch (IOException e)
| {
| throw new RuntimeException(fileName
| + " module listed in application.xml does not exist within .ear "
| + file.getName(), e);
| }
| }
| }
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4168949#4168949
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4168949
More information about the jboss-dev-forums
mailing list