9 Replies Latest reply: Dec 13, 2011 12:16 PM by David Lloyd RSS

HornetQ Native Libs

Andy Taylor Master

whats the current support for native libs with AS7, i.e. do we support them and if so where should i put the HornetQ native libs.

  • 1. Re: HornetQ Native Libs
    Ales Justin Master

    It's supported.

    You should place it in the module's dir - of the module that's gonna load them.

     

    I suggest you do a quick peek at the supporting code,

    to see the exact format you need to follow -- afair, you need to do lib/<process_dir>/your.native.lib

  • 2. Re: HornetQ Native Libs
    Andy Taylor Master

    I tried lib/x86_64/my.so but it doesnt seem to pick it up, can you point me at the code where this is set up

  • 3. Re: HornetQ Native Libs
    David Lloyd Master

    First thing you have to do is add a resource directory called "lib" to your module.xml.

     

    Once you've done that, you have to file your native libs in the proper platform-specific directory.  The directory name format is <osname>-<osarch> where <osname> is one of:

    • linux
    • macosx
    • win
    • os2
    • solaris
    • mpeix
    • hpux
    • aix
    • os390
    • freebsd
    • irix
    • digitalunix
    • osf1
    • openvms

     

    ...and <osarch> is one of:

    • sparcv9
    • sparc
    • x86_64
    • i686
    • ppc64
    • ppc
    • arm
    • parisc
    • alpha
    • mips

     

    Then put your .so/.dll/etc files in the appropriate directories and you should be set.

  • 4. Re: HornetQ Native Libs
    Andy Taylor Master

    First thing you have to do is add a resource directory called "lib" to your module.xml.

    whats the correct format for this, I cant find an example or the schema?

  • 5. Re: HornetQ Native Libs
    Andy Taylor Master

    I have the following config, in the module.xml in modules/org/hornetq/main/ i have the following line added:

     

    <resource-root path="lib"/>

     

    and i have the native lib under:

     

    modules/org/hornetq/main/lib/linux-x86_64/libHornetQAIO64.so

     

    however i still get an unsatisfied link error, is this configuration correct?

  • 6. Re: HornetQ Native Libs
    David Lloyd Master

    I have to see the code to see for sure.

  • 7. Re: HornetQ Native Libs
    David Lloyd Master

    After additional testing I've discovered a Modules bug which may affect your results and I've pushed releases in both the 1.0 and 1.1 series.

  • 8. Re: HornetQ Native Libs
    Andy Taylor Master

    cheers david, i'll take a look tomorrow

  • 9. Re: HornetQ Native Libs
    David Lloyd Master

    Andy Taylor wrote:

     

    I have the following config, in the module.xml in modules/org/hornetq/main/ i have the following line added:

     

    <resource-root path="lib"/>

     

    and i have the native lib under:

     

    modules/org/hornetq/main/lib/linux-x86_64/libHornetQAIO64.so

     

    however i still get an unsatisfied link error, is this configuration correct?

     

    Just want to mention that the resource root is no longer needed as Modules will now automatically look for a lib directory when native libraries are loaded.