2 Replies Latest reply on Jan 9, 2013 4:58 AM by ryven

    Load resources from dependency

    ryven

      Hi

       

      If i have a deployment (deployment1) that declares a dependency on another deployment (deployment2), is there a way (programmatically or otherwise) that i can include the resources/files of deployment2 in deployment1? Would it be possible to do this in such a way that the resources are available to deployment1's classloader (alongside it's original files) in the normal way? (i.e. .getResource/getResourceAsStream), effectively 'merging' the two file sets.

        • 1. Re: Load resources from dependency
          cfang

          Should be doable if you properly declare the dependency with jboss-deployment-strucutre, or in deployment1's manifest, but I haven't tried that.  I would avoid this need in the first place, though.  There should be better ways to scope and organize resources, for example, install the shared resources as a common module, or publish the resources as jndi resources.

          • 2. Re: Load resources from dependency
            ryven

            I've declared a dependency between two deployments, but don't seem to be able to get ahold of the resources from one to the other without explicilty calling each deployment's respective classloader. Perhaps i'm missing something simple?

             

            The resources are somewhat dynamic, in so far as they need to be added/removed at deployment from the 'pool' of available resources. I'm not sure if a shared common module would lend itself to that.