I took at a look at that code.
The JNI code is basically unchanged from the 0.1 version.
The interesting part is the code is for handling the XML structures used
by libvirt.
You can see how Daniel Schweger's added functionality is meant to be
used in the srtc/testclient/org/libvirt/TestXen.java file.
The way I imagined the java-libvirt architecture is that there is a
lower 'core' level, which is basically a function-for function
equivalent of the C libvirt functionality, with the bare minimum of
object-orientedness thrown in to pass for a proper java library (the
current libvirt in CVS)
Plus, there should/can be anotherl API, that exposes the XML files as
java objects with get/set functions, etc. (It's in the
org.libvirt.schema package in Daniel Schweger's code)
Optionally, there could be higher level API that uses the core and XML
api, and provides a really clean java-style object model, but IO haven't
given it much thought yet.
I think these two or three layers should be clearly demarcated, maybe
even shipped as separate packages, becuse anything that layers on more
functionaity that what the current cvs provides represents design
decisions that are not inherent to libvirt.
One may not want to use the XML technology/object model/whatever that
libvirt-java ships, but rather add their own XML handling stuff/ higher
level abstractions on top of the core libvirt bindings. (for example,
Daniel Schweger's code uses XMLBeans, my original idea was to use JAXB
for the same purpose).
BTW I am working on adding the core bindings for the storage stuff, but
don't expect anything soon, as my day job is currently eating all my time.
regards
István
libvir-list-request(a)redhat.com wrote:
Send Libvir-list mailing list submissions to
libvir-list(a)redhat.com
To subscribe or unsubscribe via the World Wide Web, visit
https://www.redhat.com/mailman/listinfo/libvir-list
or, via email, send a message with subject or body 'help' to
libvir-list-request(a)redhat.com
You can reach the person managing the list at
libvir-list-owner(a)redhat.com
When replying, please edit your Subject line so it is more specific
than "Re: Contents of Libvir-list digest..."
Today's Topics:
1. Re: AW: beta libvirt-java port uploaded (Daniel Veillard)
2. AW: [libvirt] AW: beta libvirt-java port uploaded
(Daniel Schwager)
3. storage_conf.c: In function 'virStorageSize' (Jaime Traver)
4. Re: storage_conf.c: In function 'virStorageSize' (Atsushi SAKAI)
----------------------------------------------------------------------
Message: 1
Date: Thu, 3 Jul 2008 12:29:04 -0400
From: Daniel Veillard <veillard(a)redhat.com>
Subject: Re: [libvirt] AW: beta libvirt-java port uploaded
To: Daniel Schwager <Daniel.Schwager(a)dtnet.de>
Cc: libvir-list(a)redhat.com
Message-ID: <20080703162903.GI1362(a)redhat.com>
Content-Type: text/plain; charset=us-ascii
On Thu, Jul 03, 2008 at 12:10:40PM +0200, Daniel Schwager wrote:
> Cool - there's an "official" port...
>
http://comments.gmane.org/gmane.comp.emulators.libvirt/7118
>
> sorry for my last port, i didn't watch this list in the last time ..
>
BTW there is a new one 0.1.2 with better portability and JPackage
compatibility.
I must admit i'm a bit lost by all the code in your tarball,
there are changes to libvirt-java, even in code already included in
0.1.0 , and a lot of subtrees which seems only loosely coupled to
libvirt.
What are the diffs which should be applied to the cirrent 0.1.2
code base ? and what specifically should be added in libvirt-java
CVS. The Beans support seems one of them (but i have no idea how
it's supposed to be used).
A bit of explanations would go a long way ;-)
Daniel