I think I'm beginning to follow...

Are you suggesting setting up my own repository to allow my users to get 
updates automatically? What a great idea!

- Joel

________________________________________
From: Marcel Offermans [[email protected]]
Sent: Friday, March 27, 2009 5:43 AM
To: [email protected]
Subject: Re: Using the Bundle Repository

On Mar 26, 2009, at 15:22 , Joel Schuster wrote:

>>> I'm trying to understand what the real advantage of using the Bundle
>>> Repository for installing bundles. I understand the advantage of it
>>> being able to discover dependencies and load those as well.
>>
>> That is correct.
>
> As the Felix BundleRepository bundle only seems to work against the
> Felix repository this isn't yet very usefull. See: 
> https://issues.apache.org/jira/browse/FELIX-973

Fair enough, so it needs some work. To be honest, I mostly use OBR
just as a plain store for bundles, as I find that I already know which
sets of bundles work together (because that's how I designed my
application). But that's a different issue. :)

>> It's hard for me to judge what you really need. Can you explain a bit
>> more about what you are trying to achieve? Are you trying to make a
>> "static distribution" of the framework with a set of bundles that
>> form
>> your application?
>
> Yes, that is exactly what I wish to do. I guess I'm very used to the
> 'deploy' directory of JBoss and other J2EE containers. I'm really
> trying to get away from them as OSGi is simply so much more elegant,
> not to mention not the overkill that dragging along a full J2EE
> container would be for a simple server app.

As others mentioned already, something like FileInstall is an option
for deploying all bundles in a directory, or something even simpler
like:

List<Bundle> bundles = new ArrayList<Bundle>();
for (File f : (new File(bundleDir)).listFiles()) {
        try {
                Bundle bundle = context.installBundle("file://" + f, new
FileInputStream(f));
                bundles.add(bundle);
        }
        catch (BundleException e) {
                e.printStackTrace();
        }
}
for (Bundle b : bundles) {
        b.start();
}

But both approaches are fairly simplistic, so I'm not sure if you
really want to use them for the delivery of your products (unless it's
really a static distribution that you don't intend on updating "the
OSGi way" anyway).

Greetings, Marcel


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


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

Reply via email to