Thanks Dennis and Neil for your replies. I managed to get it working. 
When I bring up the RCP App, the services are installed. I can say that by 
looking at the debug statements in the bind method. Thereafter the workbench 
creates another instance of the View . So I have 2 instances of View. For now I 
have gotten around the problem by defining the reference of the remote service 
as "static". Not sure if this is the best way.   
Neil, I don't see OSGI console while running the RCP App. I do have the 
following in my VM args. This is making it very difficult to see which services 
are in ACTIVE state. I also tried attaching a port to the console. 
Unfortunately because of firewall I cant telnet to the port.
Program Arguments:
-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} - 
console
VM args:
-Dequinox.ds.print=true -Dequinox.ds.debug=true

Regards
Priyanka

-----Original Message-----
From: equinox-dev-boun...@eclipse.org [mailto:equinox-dev-boun...@eclipse.org] 
On Behalf Of equinox-dev-requ...@eclipse.org
Sent: Friday, February 06, 2009 9:01 AM
To: equinox-dev@eclipse.org
Subject: equinox-dev Digest, Vol 46, Issue 7

Send equinox-dev mailing list submissions to
        equinox-dev@eclipse.org

To subscribe or unsubscribe via the World Wide Web, visit
        https://dev.eclipse.org/mailman/listinfo/equinox-dev
or, via email, send a message with subject or body 'help' to
        equinox-dev-requ...@eclipse.org

You can reach the person managing the list at
        equinox-dev-ow...@eclipse.org

When replying, please edit your Subject line so it is more specific than "Re: 
Contents of equinox-dev digest..."


Today's Topics:

   1. Re: Declarative Services within RCP Applications (Neil Bartlett)
   2. Handling errors in the equinox (Krzysztof Daniel)


----------------------------------------------------------------------

Message: 1
Date: Fri, 6 Feb 2009 11:49:33 +0000
From: Neil Bartlett <njbartl...@gmail.com>
Subject: Re: [equinox-dev] Declarative Services within RCP
        Applications
To: Equinox development mailing list <equinox-dev@eclipse.org>
Message-ID:
        <bb4674270902060349l5aa6d4adl50588815b584a...@mail.gmail.com>
Content-Type: text/plain; charset=UTF-8

Well spotted Dennis. However the dependency on util is not indirect, it is a 
straightforward direct dependency. And util does not need to be started, it 
just needs to be present and resolved.

Priyanka, could you show us the output of the "ss" command in the OSGi console?

Note that in general, integrating Eclipse Extensions and OSGi Services (whether 
DS or otherwise) is a hard problem because of the lifecycle mismatch and the 
semantic differences between extensions and services.

Regards,
Neil

On Fri, Feb 6, 2009 at 11:23 AM, O'Flynn, Dennis <dennis.ofl...@compuware.com> 
wrote:
> I'm under the assumption that equinox.ds has an indirect dependency upon 
> equinox.util.  Try starting equinox.util before equinos.ds.
>
> I use the following startup order in my RCP app's config.ini:
>
> osgi.bundles=...\
>   org.eclipse.equinox.u...@2:start, \
>   org.eclipse.equinox...@2:start, \
>   ...
>
>
>
> The contents of this e-mail are intended for the named addressee only. It 
> contains information that may be confidential. Unless you are the named 
> addressee or an authorized designee, you may not copy or use it, or disclose 
> it to anyone else. If you received it in error please notify us immediately 
> and then destroy it.
>
> From: equinox-dev-boun...@eclipse.org 
> [mailto:equinox-dev-boun...@eclipse.org] On Behalf Of Mitra, Priyanka
> Sent: Thursday, February 05, 2009 5:47 PM
> To: equinox-dev@eclipse.org
> Subject: [equinox-dev] Declarative Services within RCP Applications
>
> Ben,
>
> Thanx for your input. I do have the org.eclipse.equinox.ds in config.ini 
> file. This is my config.ini file. All the custom bundles start at level 5. In 
> the Run Configuration->Configuration tab, "Use an existing config.ini as a 
> template" is checked in and "Use default location" is checked in. Still the 
> bundles are not starting when launched in eclipse application.
>
> #Configuration File
> #Thu Feb 05 13:57:13 PST 2009
> osgi.bundles=org.eclipse.osgi.services_3.1.200.v20071203....@start, \
>                org.eclipse.equinox.ds_1.0.0.v20080427-0830....@2:start, \
>                
> org.eclipse.core.runtime.compatibility.registry_3.2.200.v20080610, \
>                org.eclipse.ui.workbench_3.4.1.m20080827-0800a....@start, \
>                org.eclipse.equinox.transforms.hook_1.0.0.v20080610.jar, \
>                org.eclipse.core.jobs_3.4.0.v20080512....@start, \
>                org.eclipse.swt_3.4.1.v3449c....@start, \
>                org.eclipse.core.databinding_1.1.1.m20080827-0800b....@start, \
>                org.eclipse.core.contenttype_3.3.0.v20080604-1400....@start, \
>                com.ibm.icu_3.8.1.v20080530....@start, \
>                org.eclipse.core.commands_3.4.0.i20080509-2000....@start, \
>                org.eclipse.core.runtime_3.4.0.v20080512....@start, \
>                org.eclipse.equinox.registry_3.4.0.v20080516-0950....@start, \
>                org.eclipse.equinox.common_3.4.0.v20080421-2006....@start, \
>                org.eclipse.core.expressions_3.4.0.v20080603-2000....@start, \
>                org.eclipse.ui_3.4.1.m20080910-0800....@start, \
>                org.eclipse.equinox.util_1.0.0.v20080414....@start, \
>                
> org.eclipse.core.runtime.compatibility.auth_3.2.100.v20070502....@start, \
>                
> org.eclipse.equinox.preferences_3.2.201.r34x_v20080709....@start, \
>                org.eclipse.swt.gtk.linux.x86_3.4.1.v3449c.jar, \
>                org.eclipse.jface.databinding_1.2.1.m20080827-0800a....@start, 
> \
>                org.eclipse.jface_3.4.1.m20080827-2000....@start, \
>                org.eclipse.equinox.app_1.1.0.v20080421-2006....@start, \
>                org.eclipse.help_3.3.101.v20080702_34x....@start, \
>                javax.servlet_2.4.0.v200806031604....@start
>                myhe...@5:start, \
>                jmsimpor...@5:start, \
>                com.etrade.comm...@5:start, \
>                com.etrade.tops....@5:start, \
> osgi.bundles.defaultStartLevel=4
> osgi.install.area=file\:/etrade/home/pmitra/eclipse
> osgi.framework=file\:/etrade/home/pmitra/eclipse/plugins/org.eclipse.o
> sgi_3.4.2.R34x_v20080826-1230.jar
> osgi.configuration.cascaded=false
>
> Regards
> Priyanka
>
> -----Original Message-----
> From: equinox-dev-boun...@eclipse.org 
> [mailto:equinox-dev-boun...@eclipse.org] On Behalf Of 
> equinox-dev-requ...@eclipse.org
> Sent: Thursday, February 05, 2009 5:08 AM
> To: equinox-dev@eclipse.org
> Subject: equinox-dev Digest, Vol 46, Issue 5
>
> Send equinox-dev mailing list submissions to
>        equinox-dev@eclipse.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
>        https://dev.eclipse.org/mailman/listinfo/equinox-dev
> or, via email, send a message with subject or body 'help' to
>        equinox-dev-requ...@eclipse.org
>
> You can reach the person managing the list at
>        equinox-dev-ow...@eclipse.org
>
> When replying, please edit your Subject line so it is more specific than "Re: 
> Contents of equinox-dev digest..."
>
>
> Today's Topics:
>
>   1. Declarative Services within RCP Applications (Mitra, Priyanka)
>   2. Re: Declarative Services within RCP Applications (Benjamin CAB?)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Wed, 4 Feb 2009 18:48:04 -0500
> From: "Mitra, Priyanka" <priyanka.mi...@etrade.com>
> Subject: [equinox-dev] Declarative Services within RCP Applications
> To: <equinox-dev@eclipse.org>
> Message-ID:
>        
> <6b657591b767a94aa6170def5d8b5bb7016ef...@atl1ex11.corp.etradegrp.com>
> Content-Type: text/plain; charset="us-ascii"
>
> Hello
>
> I am not very clear how to use declaratively declarative services from RCP 
> Application. I have a main container that other plugins that contribute to 
> UI. In one of the plugin, I have a view that has to subscribe to a JMS 
> service, the implementation of which is declared as a service in another 
> bundle.
> I am able to run this using "Run As -> OSGI Framework". The subscription 
> takes place without any problems. But when run as Eclipse Application, osgi 
> console comes up and then immediately shuts down and then my RCP Application 
> comes up. The subscription to JMS service fails as there is no reference 
> available. In fact it almost seems like the DS bundle for JMS is not loaded 
> or installed at the runtime of RCP App. Am I missing something in the run 
> configuration? Why the service bundle is not getting installed when RCP app 
> comes up?
>
> This is my service bundle: Subscription implementation is in JMSConnection.
>
> <?xml version="1.0"?>
> <component name="jmsService">
>        <implementation class="com.....JMSConnection"/>
>        <service>
>                <provide interface="com......IMessageService"/>
>        </service>
> </component>
>
> This is the call from consumer bundle. This bundle also contributes to UI..
>
> <?xml version="1.0"?>
> <component name="jmsconn">
>        <implementation
> class="tops.order.trade.mgmt.ui.views.AlertsView"/>
>        <reference name="jmsService"
>        interface="com......IMessageService"
>        bind="setService"
>        unbind="unsetService"
>        cardinality="0..1"
>        policy="dynamic"/>
> </component>
>
> AlertsView.java
>
> public class AlertsView extends ViewPart implements IMessageHandler {
>
>        private IMessageService jmsService = null;
>
>        public void createPartControl(Composite parent) {
>                .............. // some UI code
>
>                openJMSConnection(topic, mapper, handler);
>        }
>        /* (non-Javadoc)
>         */
>        public void setService(IMessageService jmsService) {
>                System.out.println("Setting up JMS Service Instance");
>            this.jmsService = jmsService;
>            openJMSConnection("", new AlertsMessageMapper(), this);
>        }
>        /* (non-Javadoc)
>         */
>        public void unsetService(IMessageService jmsService) {
>            this.jmsService = null;
>        }
>
>        public void openJMSConnection (String topic, IMessageMapper mapper, 
> IMessageHandler handler)
>        {
>            if (this.jmsService != null) {
>                System.out.println("Service not null");
>                jmsService.subscribeService(topic, mapper, handler);
>            }
>            else
>                System.out.println("Service is null");
>        }
>
> Can anyone suggest what is the best way to mix the use of extensions and 
> services at the same time within RCP Application. I appreciate your attention 
> on this matter.
>
> Regards..
> Priyanka
>
> -------------- next part -------------- An HTML attachment was 
> scrubbed...
> URL: 
> https://dev.eclipse.org/mailman/private/equinox-dev/attachments/200902
> 04/407b1ce4/attachment.html
>
> ------------------------------
>
> Message: 2
> Date: Thu, 05 Feb 2009 14:07:55 +0100
> From: Benjamin CAB? <benjamin.c...@anyware-tech.com>
> Subject: Re: [equinox-dev] Declarative Services within RCP
>        Applications
> To: Equinox development mailing list <equinox-dev@eclipse.org>
> Message-ID: <498ae4ab.6010...@anyware-tech.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Mitra,
>
> The org.eclipse.equinox.ds bundle must always be started; hence you need to 
> either use a custom config.ini which should look like
>    osgi.bundles=org.eclipse.equinox...@2:start
> or use Eclipse 3.5 M5 to be able to set the DS bundle to autostart using the 
> new Eclipse launch configuration dialog...
>
> On a side note, adding -Dequinox.ds.print=true to the VM args of your launch 
> configuration may be useful to have traces about components activation, 
> deactivation, etc.
>
> Cheers,
> Ben
> Anyware Technologies <http://www.anyware-tech.com> *Benjamin Cabé* 
> Expert Eclipse benjamin.c...@anyware-tech.com 
> <mailto:benjamin.c...@anyware-tech.com>
> *http://blog.benjamin-cabe.com*
> Tel : +33(0)5 61 00 06 41
> Fax : +33(0)5 61 00 51 46
>
> *Nouvelle adresse
> *
>
> ----------------------------------------------------------------------
> --
> *Anyware Technologies
> * Lake Park
> ZAC de l'Hers - Allée du Lac
> BP 87216
> 31672 Labège Cedex
> France
> www.anyware-tech.com <http://www.anyware-tech.com>
>
>
>
> Mitra, Priyanka a écrit :
>>
>> Hello
>>
>> I am not very clear how to use declaratively declarative services 
>> from RCP Application. I have a main container that other plugins that 
>> contribute to UI. In one of the plugin, I have a view that has to 
>> subscribe to a JMS service, the implementation of which is declared 
>> as a service in another bundle.
>>
>> I am able to run this using "Run As -> OSGI Framework". The 
>> subscription takes place without any problems. But when run as 
>> Eclipse Application, osgi console comes up and then immediately shuts 
>> down and then my RCP Application comes up. The subscription to JMS 
>> service fails as there is no reference available. In fact it almost 
>> seems like the DS bundle for JMS is not loaded or installed at the 
>> runtime of RCP App. Am I missing something in the run configuration? 
>> Why the service bundle is not getting installed when RCP app comes up?
>>
>> This is my service bundle: Subscription implementation is in 
>> JMSConnection.
>>
>> <?xml version="1.0"?>
>> <component name="jmsService">
>>         <implementation class="com.....JMSConnection"/>
>>         <service>
>>                 <provide interface="com......IMessageService"/>
>>         </service>
>> </component>
>>
>> This is the call from consumer bundle. This bundle also contributes 
>> to UI..
>>
>> <?xml version="1.0"?>
>> <component name="jmsconn">
>>         <implementation
>> class="tops.order.trade.mgmt.ui.views.AlertsView"/>
>>         <reference name="jmsService"
>>         interface="com......IMessageService"
>>         bind="setService"
>>         unbind="unsetService"
>>         cardinality="0..1"
>>         policy="dynamic"/>
>> </component>
>>
>> AlertsView.java
>>
>> public class AlertsView extends ViewPart implements IMessageHandler {
>>
>>         private IMessageService jmsService = null;
>>
>>         public void createPartControl(Composite parent) {
>>                 .............. // some UI code
>>
>>                 openJMSConnection(topic, mapper, handler);
>>         }
>>         /* (non-Javadoc)
>>          */
>>         public void setService(IMessageService jmsService) {
>>                 System.out.println("Setting up JMS Service Instance");
>>             this.jmsService = jmsService;
>>             openJMSConnection("", new AlertsMessageMapper(), this);
>>         }
>>         /* (non-Javadoc)
>>          */
>>         public void unsetService(IMessageService jmsService) {
>>             this.jmsService = null;
>>         }
>>
>>         public void openJMSConnection (String topic, IMessageMapper 
>> mapper, IMessageHandler handler)
>>         {
>>             if (this.jmsService != null) {
>>                 System.out.println("Service not null");
>>                 jmsService.subscribeService(topic, mapper, handler);
>>             }
>>             else
>>                 System.out.println("Service is null");
>>         }
>>
>> Can anyone suggest what is the best way to mix the use of extensions 
>> and services at the same time within RCP Application. I appreciate 
>> your attention on this matter.
>>
>> Regards..
>> Priyanka
>>
>> ---------------------------------------------------------------------
>> -
>> --
>>
>> _______________________________________________
>> equinox-dev mailing list
>> equinox-dev@eclipse.org
>> https://dev.eclipse.org/mailman/listinfo/equinox-dev
>>
> -------------- next part -------------- Skipped content of type 
> multipart/related
>
> ------------------------------
>
> _______________________________________________
> equinox-dev mailing list
> equinox-dev@eclipse.org
> https://dev.eclipse.org/mailman/listinfo/equinox-dev
>
>
> End of equinox-dev Digest, Vol 46, Issue 5
> ******************************************
> _______________________________________________
> equinox-dev mailing list
> equinox-dev@eclipse.org
> https://dev.eclipse.org/mailman/listinfo/equinox-dev
> _______________________________________________
> equinox-dev mailing list
> equinox-dev@eclipse.org
> https://dev.eclipse.org/mailman/listinfo/equinox-dev
>


------------------------------

Message: 2
Date: Fri, 6 Feb 2009 12:57:00 +0100
From: Krzysztof Daniel <krzysztof_dan...@pl.ibm.com>
Subject: [equinox-dev] Handling errors in the equinox
To: equinox-dev@eclipse.org
Message-ID:
        <ofbaf74386.fcdd6233-onc1257555.00409102-c1257555.0041a...@pl.ibm.com>
Content-Type: text/plain; charset="us-ascii"

Hello,

Introduction:
Eclipse UI has a StatusManager, the entry point for all errors. If you want to 
raise an issue, you just call StatusManager.getManager(StatusAdapter, style) 
and you do not care what will happen next. It is up to application to decide if 
the StatusAdapter (Status wrapper) should be shown, processed or only logged or 
even ignored.

The problem:
StatusManager was introduced in the Platform UI and therefore is not able to 
react correctly to some events that are only logged. More over, listening to 
the logs in non ui plug-ins causes some runtime information to be lost. 

My question is if equinox team will be open for such contribution (this 
requires quite a lot of work, so I'd like to know if this feature is 
acceptable).

The underlying bug is https://bugs.eclipse.org/bugs/show_bug.cgi?id=193110
.

--
Christopher Daniel
Technical Support Engineer
Eclipse Support Center
IBM Software Group
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
https://dev.eclipse.org/mailman/private/equinox-dev/attachments/20090206/62d8b6e8/attachment.html

------------------------------

_______________________________________________
equinox-dev mailing list
equinox-dev@eclipse.org
https://dev.eclipse.org/mailman/listinfo/equinox-dev


End of equinox-dev Digest, Vol 46, Issue 7
******************************************
_______________________________________________
equinox-dev mailing list
equinox-dev@eclipse.org
https://dev.eclipse.org/mailman/listinfo/equinox-dev

Reply via email to