On 06/22/2012 01:54 AM, Rajith Attapattu wrote:
On Thu, Jun 21, 2012 at 12:30 PM, Gordon Sim <[email protected]> wrote:
I would include the source that uses the generated JNI code alongside
the source from which that JNI code is constructed.
>
This would mean that we place the Java files inside the cpp directory?

Yes. You are already compiling java code there, just that it is currently generated (or embedded in the templates in the swig input file).

This looks better **if we do move** the bindings outside of the cpp directory.

Personally I think it looks better regardless. You then have all the source for one logical component all in the same place. You produce one jar implementing a well defined interface and all an application needs to do to use this implementation is alter their classpath accordingly.

However then the build will be a bit more complicated, in terms of testing etc..

How so? For testing you need all the parts of the impl, the pure java, the JNI wrapper and the native library.

I do see your point here. In this case the only dependency would be
the jar file that bundles the Qpid API.
And in the Java side there will be no dependency on a build artefact.
(On the other hand an argument could be made that, the Qpid API jar is
also a build artefact, all though a pretty lame one at that).

No, I think it *is* a build artefact. However as it is an explicit public API it provides an obvious interface to depend on. (This is much more like the JMS clients dependency on the JMS interface).


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to