RE: Suggestions for JavaSVN/JavaHL integration
From: Alexander Kitaev <alex_at_tmate.org>
Date: 2005-03-03 20:24:35 CET
Hello Holger,
I'm not sure whether my suggestion is the same as yours, but what I mean is that:
Client will get the following jars and put them on classpath:
- svn-common.jar // contains API and command line client implementation And one of the following (or both:)
The code will look like:
SVNJni.setup(); // this class is from svn-jni.jar, may be replaced with Class.forName(...) like with JDBC drivers or set up automatically in environments like Eclipse
ISVNClient client = SVNClientManager.getSVNClient(SVNClient.PURE_JAVA); // or ISVNClient client = SVNClientManager.getDefaultSVNClient();
This way client will get jni or pure java implementation depending on what jars are on classpath.
Also there may be an SVNWrapper implementation of ISVNClient that will select what exact implementation to use for every method. For instance, assuming there are both svn-pure.jar and svn-jni.jar exists, it may delegate calls to JNI implementation for "file://" operations and to pure java implementation for others. And particular implementation may provide information (either with a special method or by throwing a NotImplemented exception) about which operations are supported, so SVNWrapper may "try" to invoke pure java implementation first and then jni implementation if certain method is not implemented in pure java version.
Alexander Kitaev.
> -----Original Message-----
---------------------------------------------------------------------
|
This is an archived mail posted to the Subversion Dev mailing list.
This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.