Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [virgo-dev] Deploy artifact by drag-drop from Eclipse 3.6.0 + STS (v2.5.1) against deploying bundle Jar (for same project) in 'Pickup' folder of Virgo Web Server v2.1.1

On 10 Jan 2011, at 18:08, Prashant Badhe wrote:

Hi All,

I am new to Virgo Web server; I just able to create 3 OSGi bundles using Eclipse + STS. Two of these bundles exposes simple hello world kind of service which the third bundle consumes when it is deployed on VWS. What I observed is, if a OSGi bundle package is dragged and dropped from Eclipse Package explore onto VWS instance running in Servers view is perfectly working as expected, but if I try to create and deploy the Jar file from my project either by copying it to VWS Pickup directory OR from VWS admin UI, then it is not working. I receive no error, below is the console output for 'Pickup' directory deployment:
 
[2011-01-10 18:35:00.566] fs-watcher                   <HD0001I> Hot deployer processing 'CREATED' event for file 'mytest.package2-1.0.0.0.jar'.
[2011-01-10 18:35:03.475] fs-watcher                   <DE0000I> Installing bundle 'mytest.package2' version '1.0.0.0'.
[2011-01-10 18:35:05.385] fs-watcher                   <DE0001I> Installed bundle 'mytest.package2' version '1.0.0.0'.
[2011-01-10 18:35:05.613] fs-watcher                   <DE0004I> Starting bundle 'mytest.package2' version '1.0.0.0'.
[2011-01-10 18:35:05.682] start-signalling-3           <DE0005I> Started bundle 'mytest.package2' version '1.0.0.0'.
[2011-01-10 18:35:57.007] fs-watcher                   <HD0001I> Hot deployer processing 'CREATED' event for file 'mytest.package1-1.0.0.0.jar'.
[2011-01-10 18:35:57.936] fs-watcher                   <DE0000I> Installing bundle 'mytest.package1' version '1.0.0.0'.
[2011-01-10 18:35:59.009] fs-watcher                   <DE0001I> Installed bundle 'mytest.package1' version '1.0.0.0'.
[2011-01-10 18:35:59.120] fs-watcher                   <DE0004I> Starting bundle 'mytest.package1' version '1.0.0.0'.
[2011-01-10 18:35:59.854] start-signalling-3           <DE0005I> Started bundle 'mytest.package1' version '1.0.0.0'.
[2011-01-10 18:36:12.600] fs-watcher                   <HD0001I> Hot deployer processing 'CREATED' event for file 'mytest.consumer-1.0.0.0.jar'.
[2011-01-10 18:36:12.973] fs-watcher                   <DE0000I> Installing bundle 'mytest.consumer' version '1.0.0.0'.
[2011-01-10 18:36:13.328] fs-watcher                   <DE0001I> Installed bundle 'mytest.consumer' version '1.0.0.0'.
[2011-01-10 18:36:13.456] fs-watcher                   <DE0004I> Starting bundle 'mytest.consumer' version '1.0.0.0'.
mytest.consumer-1.0.0.0.jar is a client bundle consuming service exposed by mytest.package1-1.0.0.0.jar & mytest.package2-1.0.0.0.jar.
I also observed that if I deploy by using drag-drop in Eclipse then there is exploded Jar folder appearing in the 'Stage' folder for each bundle and no Jar file in 'Pickup' folder.
 
Is I am missing something in order to make the Jars being deployed in Pickup directory working?

No, although if the client bundle imports packages from the other bundles, you could place the other bundles in repository/usr and, when you copy the client bundle to pickup, Virgo would automatically deploy the other bundles first.

You didn't show any log messages after the DE0004I message for the client bundle, so assuming there were none, you should follow up on the state of the client bundle. Use the Virgo shell or the admin console to check the state of the bundle and whether it is wired to the other bundles the way you would expect. You can also check that the services have been correctly published by the other bundles because if they haven't and you are using Spring DM in the client bundle, the client bundle could be waiting for the services.

 
Secondly, I am looking for programmatically start/stop/refresh/install/uninstall bundles into VWS by Java code or some other way. Is there a sample Java code or some help available to do this?

You can use the deployer mbean with interface described by this class:


 

Thanks in advance,
-Prashant
_______________________________________________
virgo-dev mailing list
virgo-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/virgo-dev

Regards,
Glyn


Back to the top