[jboss-user] [JBoss Microcontainer Development POJO Server] - Implementing a non-flat deployment for Weld Integration

Ales Justin do-not-reply at jboss.com
Thu Aug 26 07:54:13 EDT 2010


Ales Justin [http://community.jboss.org/people/alesj] replied to the discussion

"Implementing a non-flat deployment for Weld Integration"

To view the discussion, visit: http://community.jboss.org/message/559150#559150

--------------------------------------------------------------
> > I can look into it what would be the best way to do this.
> > Unless you wanna do it yourself.
> Thanks! You can go ahead. :-)
OK, I have a few things ready, but now I need to know what do you need to make this work.

Currently I have this in place:
public synchronized Set<BeanDeploymentArchive> getLibraries() throws Exception
   {
      if (libs == null || checked.get() == false)
      {
         List<VirtualFile> excludedFiles = null;
 
         Map<Module, Set<URL>> modules = provider.getMatchingModules();
         for (Map.Entry<Module, Set<URL>> entry : modules.entrySet())
         {
            Set<URL> urls = entry.getValue();
            if (excludedUrls != null && excludedFiles == null)
            {
               excludedFiles = new ArrayList<VirtualFile>();
               for (URL eu : excludedUrls)
                  excludedFiles.add(VFS.getChild(eu));
            }
            Set<VirtualFile> files = new HashSet<VirtualFile>();
            for (URL u : urls)
            {
               VirtualFile vf = VFS.getChild(u);
               boolean include = true;
               if (excludedFiles != null)
               {
                  for (VirtualFile ef : excludedFiles)
                  {
                     if (vf.getParentFileList().contains(ef))
                     {
                        include = false;
                        break;
                     }
                  }
               }
               if (include)
                  files.add(vf);
            }
            if (files.isEmpty() == false)
            {
               ClassLoader cl = ClassLoading.getClassLoaderForModule(entry.getKey());
               // is this module already installed; past CL stage -- should be
               if (cl != null)
               {
                  // TODO  <----- your input needed here                   
               }
            }
         }
         checked.set(true);
      }
      return libs;
   }


I can now return a set of matching modules, which have beans.xml as part of its resources.
This is mostly aimed at system deployments, though it can serve all deployments.
(it will be disabled once get past PS' DEPLOYERS phase)

Each module is mapped to beans.xml' owners; e.g. some-cdi-lib.jar.

Will this info be enough for you?
Or at which example / use case / code should I look for more info?

--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/559150#559150]

Start a new discussion in JBoss Microcontainer Development POJO Server at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2116]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20100826/45df5e6f/attachment.html 


More information about the jboss-user mailing list