[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
| Re: [ecf-dev] service discovery working even if port mis configured | 
This test class refers to EDEFBundleGenerator...which given some input 
information creates and writes a bundle that contains dynamically 
generated EDEF...using the EndpointDescriptionWriter class that I 
described before.
Hopefully this will get you well on the way.   At some point in the 
future...if desired...I could probably refactor and move the 
EDEFBundleGenerator into ECF API rather than test code, but this can't 
happen right away as we are closing in on Luna freeze). Or...if you 
are able...given your arrangement...you could create such a utility 
class (i.e. for dynamically creating and installing an 'edef bundle') 
and contribute it to ECF.   Please consider doing that...it would make 
a nice community addition.
that approach actually worked out quite well. The only thing missing 
from EDEFBundleGenerator was that the generateEDEFBundle method return 
the generated bundle file so that it can be installed in the osgi 
runtime.  eg.:
final BundleContext context = 
FrameworkUtil.getBundle(this.getClass()).getBundleContext();
final Bundle discoveryBundle = 
context.installBundle(bundleFile.toURI().toURL().toExternalForm());
discoveryBundle.start();
So after getting used to the general need to generate a discovery bundle 
with the edef file it was pretty straightforward.
Thanks again!
Regards,
Peter