6 Replies Latest reply on May 15, 2009 4:37 PM by erichardesty

    RA deployment with native libraries

    erichardesty

      I am trying to get an application that I currently run on JOnAS also to work with JBoss but I am having trouble getting my RA to deploy correctly. The RA contains .so file that I load in my code and with JOnAS I am able to configure the location that they are deployed so this folder is added to my LD_LIBRARY_PATH. I found old entries about files being deployed to /tmp/native but I don't see this happening on 5.0.1GA.

      Do I need to configure something else to get this to occur? Can't find much information/documentation about RAR deployment in JBoss.

      Eric

        • 1. Re: RA deployment with native libraries
          peterj

          To get the JVM to load a .so file, you need to set the java.library.path sysmet property. You look in run.sh for an example - that script sets java.library.path based on whether or not JBoss Native is installed (though if I recall correctly it does s incorrectly, dropping the existing LD_LIBRARY_PATH setting). Use that as an example to add the location of your .so to java.library.path.

          • 2. Re: RA deployment with native libraries
            erichardesty

            I'm not looking at having the JVM load that libraries. The code I have, which supports updating of the libraries for a newer version, without redeploying the RAR. I copy the physical location of the file to another location so that versioning can be done.

            Can you tell me where the files are laid down physically since they aren't anywhere within my server? If this is not possible in JBoss, that would be useful to know also since I'll just skip past JBoss and more to other application servers.

            • 3. Re: RA deployment with native libraries
              peterj

               

              I'm not looking at having the JVM load that libraries.


              The JVM is responsible for loading *.so files. The Java language provides methods that Java code can use to identify the *.so, but it is the JVM that loads it. The java.library.path is used for System.loadLibrary(), while System.load() the full path to the *.so file.

              The code I have, which supports updating of the libraries for a newer version, without redeploying the RAR. I copy the physical location of the file to another location so that versioning can be done.


              I'm sorry, but I do not understand this at all.

              Can you tell me where the files are laid down physically


              What files?

              • 4. Re: RA deployment with native libraries
                erichardesty

                 


                What files?

                A Resource Adapter consists of jar files, META-INF/ra.xml plus it can optionally contain "native" libraries/files that are to be deployed by the J2 EE deployer. This seems to be the JCADeployer in JBoss' case which is supposed to deploy the files to a directory within the server at least from the small amount of documentation that I can find in this area but this isn't happening when I try to deploy my RAR file.

                • 5. Re: RA deployment with native libraries
                  vickyk

                   

                  "EricHardesty" wrote:

                  Do I need to configure something else to get this to occur? Can't find much information/documentation about RAR deployment in JBoss.
                  Eric


                  Were you able to deploy the RAR in the Jboss4.* Or you are deploying this for the first time directly on the JBoss5?

                  • 6. Re: RA deployment with native libraries
                    erichardesty

                     

                    Were you able to deploy the RAR in the Jboss4.* Or you are deploying this for the first time directly on the JBoss5?


                    First attempt at using JBoss.