5 Replies Latest reply on Mar 18, 2013 12:49 PM by nickarls

    Regarding creating a custom module

    vismay2011

      Hi,

      I have created a custom module  with module name="web.xyz".

       

      I want to reference this module in one of my SAR file..  I mean my  MBean classes are in one of the jar file present in "web.xyz" module.

      how do I make these classes vissible to SAR file ?  I have added following dependency in jboss-deployment-structure.xml but still I do get ClassNotFoundException.

       

      <jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.1">

          <deployment>

              <dependencies>

                                          <module name="org.jboss.common-core"  />

           <module name="web.xyz" />

                                              

                            </dependencies>

                           

          </deployment>

      </jboss-deployment-structure>

       

      Please help me how can I achive this?  I can package those classes into SAR file itself but I am thinking is there anyway to achive this by using modules.

      do I have to add some attribut like  export="true"  anywhere?

       

       

      -regards

      V

        • 1. Re: Regarding creating a custom module
          nickarls

          How is the module defined (folder hierarchy + module.xml)?

          • 2. Re: Regarding creating a custom module
            vismay2011

            Hi Nick,

            Below is my folder structure

             

            C:\jboss-7.1.2.Final\modules\system\layers\base\piweb\lib\main

             

            module.xml looks like below

             

            C:\jboss-7.1.2.Final\modules\system\layers\base\piweb\lib\main\module.xml

             

            <?xml version="1.0" encoding="UTF-8"?>

            <module xmlns="urn:jboss:module:1.1" name="piweb.lib" >

                                <resources>

             

                                          <resource-root path="mbeans.jar" />

             

                                          </resources>

                                <dependencies>

                                          <module name="javaee.api"/>

               </dependencies>

             

            </module>

             

             

            SAR package

             

                 /META-INF/jboss-deployment-structure.xml

             

            <jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.1">

                <deployment>

                    <dependencies>

                                                <module name="org.jboss.common-core"  />

                                                     <module name="piweb.lib" />

                          </dependencies>

                      </deployment>

            </jboss-deployment-structure>

             

             

             

             

             

             


            • 3. Re: Regarding creating a custom module
              emmartins

              Which AS7 version are you using? If it is 7.1.2.Final then the module should go into C:\jboss-7.1.2.Final\modules\piweb\lib\main\module.xml


              • 4. Re: Regarding creating a custom module
                vismay2011

                Its jboss-7.1.2.Final (nightly build ..).. But I can see many modules have been defined under jboss-7.1.2.Final\modules\system\layers\base   what is the difference?