2

Is it possible to deploy a JCA resource adapter (rar) that references a shared library, inside the OpenLiberty server? What is the server.xml configuration snippet for this? I looked at the JCA docs for Liberty and found nothing on the topic... My guess is something like this, but not sure:

<library id="mySharedLib">
        <fileset dir="${server.config.dir}/odb" includes="*.jar" />
</library>
...
<resourceAdapter id="myrar" location="${server.config.dir}/jca/my.rar">
        <properties.myrar conf="${server.output.dir}/jca/odb-server.xml"/>
        <classloader commonLibraryRef="mySharedLib"/>
</resourceAdapter>
Hristo Stoyanov
  • 1,508
  • 3
  • 15
  • 24
  • I'm assuming since you accepted Mark's answer you tried the solution, but in case you didn't, I ran a quick test on lastest OL and the solution works as expected. – F Rowe Jan 27 '18 at 00:07

1 Answers1

2

Here's link to the schema for resourceAdapter which shows you can use classloader with a commonLibraryRef as you described. Something like the following:

<library id="MyLib">
    <fileset dir="/some/dir" includes="sharedlib.jar"/>
</library>

<resourceAdapter id="AdapterForMe" location="${server.config.dir}/connectors/RA.rar">
    <classloader commonLibraryRef="MyLib"/>
</resourceAdapter>
mswatosh
  • 466
  • 2
  • 8