[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [virgo-dev] Building a custom artifact deployer

Hi Glyn,

I guess I could make an attempt to write a sample custom deployer. I
don't have a toy example for Virgo yet.
What I have written, as part of another project, is code for
atomically deploying/starting/undeploying zip files containing bundle
jars (a "poor man's PAR" without scoping, pulling in dependencies,
etc).
I could try to adapt that code to the Virgo deployment interfaces.
I am currently on vacation so I can't give you a time frame yet.

The first step is to make sure all classes/interfaces that are to be
exposed in the public API are promoted to exported packages.
I'm not sure if ArtifactStorage is the only missing link here, but a
start would be to promote it and notify me when its done. Then I could
have a new go at it. When I have some working code I'll put it on
github.

best regards, Peter


On Fri, Jul 9, 2010 at 5:58 PM, Glyn Normington <gnormington@xxxxxxxxxx> wrote:
> Hi Peter
>
> Yes, InstallArtifactTreeFactory obeys the whiteboard pattern and the deployer will pick up any that are registered.
>
> Your right that the ArtifactStorage interface needs promoting to an exported package to be usable by 3rd parties.
>
> It would be good to collaborate on a toy example and then make that available as a Virgo sample. Compare [1].
>
> Would you be interested in stripping down what you are doing into a toy and, with my and possibly others' help, getting that going with Virgo with a view to contributing it as a sample? (I guess the best way would be to create a small project on github that I could then directly access rather than sending zips around, but you can call the shots here.)
>
> Regards,
> Glyn
> [1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=315867
> On 9 Jul 2010, at 15:21, Peter Gardfjäll wrote:
>
>> Hi,
>>
>> as far as I can tell part of writing a custom artifact deployer for
>> Virgo is to register an InstallArtifactTreeFactory in the OSGi service
>> registry.
>> I assume that all such factories get picked up by the Virgo runtime.
>> Am I right so far...?
>>
>> If that is indeed the correct approach, one apparent problem that
>> strikes me is that the ArtifactStorage interface, which is a parameter
>> of the InstallArtifactTreeFactory.constructInstallArtifactTree method,
>> is internal to the org.eclipse.virgo.kernel.deployer bundle (that is,
>> its package is not exported).
>> This makes it impossible for me to write a bundle with a custom tree factory.
>> Maybe some restructuring is required to simplify the development of
>> additional deployers?
>> What are your thoughts?
>>
>> best regards, Peter
>> _______________________________________________
>> virgo-dev mailing list
>> virgo-dev@xxxxxxxxxxx
>> https://dev.eclipse.org/mailman/listinfo/virgo-dev
>
> _______________________________________________
> virgo-dev mailing list
> virgo-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/virgo-dev
>