Hahah, you all thought I'd gone away and you were safe. How wrong you were. Here I am again with another inane question to make you groan.
Part of our project uses a JCA-compliant Resource Adapter (hereinafter referred to as RA, as I'm too lazy to keep typing that) to connect to a legacy system. Please once again bear in mind that I've inherited this project from previous developers who have now left. Now, the RA makes use of the SPI Connection, ManagedConnection, ConnectionFactory, ManagedConnectionFactory interfaces, which is great. However, it currently doesn't make use of the CCI Interaction and related interfaces, preferring instead to utilise a custom-written API. I think this is fine, at least from what I've read.
Now my question is this: Part of this API takes a class that is specific to our code as an argument, and later transforms it into the class required by the legacy system. So our main application code needs access to this class to be able to pass it in, and the RA needs access to the class to be able to use it. Originally, code specific to the RA and in fact the legacy system was being used in the main app, which completely defeats the object of having the RA in my opinion. So I shifted things around, put the JARs specific to the legacy system inside the RA, and moved the common class into a utility project which was then added to the Java JAR Dependencies and Java Build Path for both the main application and the RA.
Now, although the main application can see the common class, the RA cannot. I get a ClassDefNotFoundException whenever I try to call the RA. The only way I've managed to get it to work thus far is to import the classes from the Util project into the RA. I've googled for this and not found much... I'm guessing that an RA must have all of its dependent JARs packaged with it. In which case, would it be better to stick the common classes in the RA, and have the RA project on the Java Build Path and Java JAR Dependencies of the main application project? Is that the way it's meant to work?
I'd actually prefer to implement the Interaction stuff, but time is pressing and the RA is only an interim measure while we transition over to a new system to replace the legacy system.