[
https://issues.jboss.org/browse/AS7-2695?page=com.atlassian.jira.plugin.s...
]
David Lloyd commented on AS7-2695:
----------------------------------
{quote}
"System.loadLibrary() will automatically look there first."
What? How? and there is where?
{quote}
System.loadLibrary() always uses the caller's class loader first to locate native
libs. "There" is the "lib" directory in the module which executes
that method.
{quote}
There are few technical reasons why having
product/lib/${platform}-${arch}/native.so would create some issues.
{quote}
For #1, correct, you should either link statically or rely upon the operating system to
provide dependencies.
For #2, you have it backwards - by having arch-specific directories we allow a single
distribution which works on any operating system.
For #3, I don't see this as any different than an OS distributing Java JARs. We
don't use the OS for this case, so we shouldn't use the OS for the JNI case
either, especially given that a JNI library is so tightly bound to its JAR counterpart.
If you want to do it this way then you certainly can, but we don't normally support
the distribution of some components separately from the AS because it's a bit of a
pain from the user's perspective. If we can find a way to get around that then fine.
Package APR native libraries correctly
--------------------------------------
Key: AS7-2695
URL:
https://issues.jboss.org/browse/AS7-2695
Project: Application Server 7
Issue Type: Task
Components: Web
Reporter: David Lloyd
Assignee: Remy Maucherat
Fix For: 7.1.0.CR1
The APR libraries for native jbossweb should be packaged in the "lib" directory
of the module under the platform specific name, e.g.
* {{lib/linux-i686/libxxxx.so}}
* {{lib/linux-x86_64/libxxxx.so}}
* {{lib/solaris-sparc/libxxxx.so}}
* {{lib/solaris-sparcv9/libxxxx.so}}
* {{lib/solaris-i686/libxxxx.so}}
* {{lib/solaris-x68_64/libxxxx.so}}
* {{lib/macosx-i686/libxxxx.sl}}
* {{lib/macosx-x86_64/libxxxx.sl}}
For the case where you need to vary the library based on the Solaris version, you have
two options:
* (best solution) rework the library to use weak symbols and/or libc probes and/or system
call error detection, to detect features which are present and absent and adjust at
runtime
* Introduce more than one library in each of the solaris-xxx directories with the version
suffix, e.g. libnative-2.8.so or similar and check for solaris at load time, and if
solaris, choose the library with the version encoded in the name
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see:
http://www.atlassian.com/software/jira