Hi Don,

It's not *absolutely* necessary. The statistics bundle actually
depends on other bundles, all of which I could use directly, but it
would be desirable and/or interesting for learning purposes.

Justin

On Tue, Jun 21, 2011 at 6:36 PM, Donald Whytock <[email protected]> wrote:
> Do you absolutely need the statistics bundle to run in a Felix
> framework?  Or could you just include the bundle's .jar on your
> classpath, instantiate the service object and run the method directly?
>
> Don
>
> On Tue, Jun 21, 2011 at 6:31 PM, Justin Stoecker <[email protected]> 
> wrote:
>> Hi,
>>
>> I have a "statistics" bundle that provides the service of reading a
>> file, doing some calculations, and writing a new file. Ideally, I
>> would like to write a small command-line program inside an executable
>> JAR (not a bundle) that would be used as follows:
>>
>> java -jar analyzer.jar file1 file2 file3 ...
>>
>> The host program in analyzer.jar would then launch an embedded
>> framework, auto-deploy the statistics bundle, and use the service
>> interface of that bundle. I read on the felix website that there are
>> two options for this type of situation: having the service interfaces
>> inside the host program (not something I want to do, as these bundles
>> should not depend on this host program) or to use reflection. I am not
>> sure how to use reflection for this purpose.
>>
>> As an alternative, I figured I could write a second bundle that reads
>> a series of files from a fixed location and uses the statistics
>> bundle, as both would be inside the OSGi container. I can put these
>> bundles into the bundle directory of the stand-alone felix framework
>> and this works; however, I don't want felix to keep running after all
>> the files are processed.
>>
>> What is the cleanest and easiest way to accomplish the task of
>> providing input (file names) to a service and having it shutdown when
>> finished?
>>
>> Thanks,
>> Justin
>>
>> ---------------------------------------------------------------------
>> 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]
>
>

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

Reply via email to