[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[equinox-dev] Declarative Services within RCP Application

Neil, I am able to get the osgi console while running the RCP App. Here is the output.

osgi> ss

Framework is launched.

id	State       Bundle
0	ACTIVE      org.eclipse.osgi_3.4.2.R34x_v20080826-1230
	            Fragments=6
1	ACTIVE      org.eclipse.osgi.services_3.1.200.v20071203
2	ACTIVE      org.eclipse.equinox.ds_1.0.0.v20080427-0830
3	RESOLVED    org.eclipse.core.runtime.compatibility.registry_3.2.200.v20080610
	            Master=15
4	ACTIVE      org.eclipse.ui.workbench_3.4.1.M20080827-0800a
5	ACTIVE      tops.order.trade.mgmt_1.0.0
6	RESOLVED    org.eclipse.equinox.transforms.hook_1.0.0.v20080610
	            Master=0
7	ACTIVE      com.etrade.tops.container_1.0.0
8	ACTIVE      org.eclipse.core.jobs_3.4.0.v20080512
9	ACTIVE      org.eclipse.swt_3.4.1.v3449c
	            Fragments=26
10	ACTIVE      org.eclipse.core.databinding_1.1.1.M20080827-0800b
11	ACTIVE      org.eclipse.core.contenttype_3.3.0.v20080604-1400
12	ACTIVE      com.ibm.icu_3.8.1.v20080530
13	ACTIVE      org.eclipse.core.commands_3.4.0.I20080509-2000
14	ACTIVE      JMSImporter_1.0.0
15	ACTIVE      org.eclipse.equinox.registry_3.4.0.v20080516-0950
	            Fragments=3
16	ACTIVE      org.eclipse.core.runtime_3.4.0.v20080512
17	ACTIVE      org.eclipse.equinox.common_3.4.0.v20080421-2006
18	ACTIVE      com.etrade.common3_1.0.0
19	ACTIVE      org.eclipse.core.expressions_3.4.0.v20080603-2000
20	ACTIVE      org.eclipse.ui_3.4.1.M20080910-0800
21	ACTIVE      org.eclipse.equinox.util_1.0.0.v20080414
22	ACTIVE      org.eclipse.core.runtime.compatibility.auth_3.2.100.v20070502
23	ACTIVE      com.etrade.tops.jms_1.0.0
24	ACTIVE      org.eclipse.jface.databinding_1.2.1.M20080827-0800a
25	ACTIVE      org.eclipse.equinox.preferences_3.2.201.R34x_v20080709
26	RESOLVED    org.eclipse.swt.gtk.linux.x86_3.4.1.v3449c
	            Master=9
27	ACTIVE      org.eclipse.jface_3.4.1.M20080827-2000
28	ACTIVE      org.eclipse.equinox.app_1.1.0.v20080421-2006
29	ACTIVE      org.eclipse.help_3.3.101.v20080702_34x
30	ACTIVE      javax.servlet_2.4.0.v200806031604 


-----Original Message-----
From: equinox-dev-bounces@xxxxxxxxxxx [mailto:equinox-dev-bounces@xxxxxxxxxxx] On Behalf Of equinox-dev-request@xxxxxxxxxxx
Sent: Friday, February 06, 2009 9:01 AM
To: equinox-dev@xxxxxxxxxxx
Subject: equinox-dev Digest, Vol 46, Issue 7

Send equinox-dev mailing list submissions to
	equinox-dev@xxxxxxxxxxx

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-request@xxxxxxxxxxx

You can reach the person managing the list at
	equinox-dev-owner@xxxxxxxxxxx

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 <njbartlett@xxxxxxxxx>
Subject: Re: [equinox-dev] Declarative Services within RCP
	Applications
To: Equinox development mailing list <equinox-dev@xxxxxxxxxxx>
Message-ID:
	<bb4674270902060349l5aa6d4adl50588815b584a754@xxxxxxxxxxxxxx>
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.OFlynn@xxxxxxxxxxxxx> 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.util@2:start, \
>   org.eclipse.equinox.ds@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-bounces@xxxxxxxxxxx 
> [mailto:equinox-dev-bounces@xxxxxxxxxxx] On Behalf Of Mitra, Priyanka
> Sent: Thursday, February 05, 2009 5:47 PM
> To: equinox-dev@xxxxxxxxxxx
> 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.jar@start, \
>                org.eclipse.equinox.ds_1.0.0.v20080427-0830.jar@2:start, \
>                org.eclipse.core.runtime.compatibility.registry_3.2.200.v20080610, \
>                org.eclipse.ui.workbench_3.4.1.M20080827-0800a.jar@start, \
>                org.eclipse.equinox.transforms.hook_1.0.0.v20080610.jar, \
>                org.eclipse.core.jobs_3.4.0.v20080512.jar@start, \
>                org.eclipse.swt_3.4.1.v3449c.jar@start, \
>                org.eclipse.core.databinding_1.1.1.M20080827-0800b.jar@start, \
>                org.eclipse.core.contenttype_3.3.0.v20080604-1400.jar@start, \
>                com.ibm.icu_3.8.1.v20080530.jar@start, \
>                org.eclipse.core.commands_3.4.0.I20080509-2000.jar@start, \
>                org.eclipse.core.runtime_3.4.0.v20080512.jar@start, \
>                org.eclipse.equinox.registry_3.4.0.v20080516-0950.jar@start, \
>                org.eclipse.equinox.common_3.4.0.v20080421-2006.jar@start, \
>                org.eclipse.core.expressions_3.4.0.v20080603-2000.jar@start, \
>                org.eclipse.ui_3.4.1.M20080910-0800.jar@start, \
>                org.eclipse.equinox.util_1.0.0.v20080414.jar@start, \
>                org.eclipse.core.runtime.compatibility.auth_3.2.100.v20070502.jar@start, \
>                org.eclipse.equinox.preferences_3.2.201.R34x_v20080709.jar@start, \
>                org.eclipse.swt.gtk.linux.x86_3.4.1.v3449c.jar, \
>                org.eclipse.jface.databinding_1.2.1.M20080827-0800a.jar@start, \
>                org.eclipse.jface_3.4.1.M20080827-2000.jar@start, \
>                org.eclipse.equinox.app_1.1.0.v20080421-2006.jar@start, \
>                org.eclipse.help_3.3.101.v20080702_34x.jar@start, \
>                javax.servlet_2.4.0.v200806031604.jar@start
>                MyHello@5:start, \
>                JMSImporter@5:start, \
>                com.etrade.common3@5:start, \
>                com.etrade.tops.jms@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-bounces@xxxxxxxxxxx 
> [mailto:equinox-dev-bounces@xxxxxxxxxxx] On Behalf Of 
> equinox-dev-request@xxxxxxxxxxx
> Sent: Thursday, February 05, 2009 5:08 AM
> To: equinox-dev@xxxxxxxxxxx
> Subject: equinox-dev Digest, Vol 46, Issue 5
>
> Send equinox-dev mailing list submissions to
>        equinox-dev@xxxxxxxxxxx
>
> 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-request@xxxxxxxxxxx
>
> You can reach the person managing the list at
>        equinox-dev-owner@xxxxxxxxxxx
>
> 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.mitra@xxxxxxxxxx>
> Subject: [equinox-dev] Declarative Services within RCP Applications
> To: <equinox-dev@xxxxxxxxxxx>
> Message-ID:
>        
> <6B657591B767A94AA6170DEF5D8B5BB7016EFDFB@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
> 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.cabe@xxxxxxxxxxxxxxxx>
> Subject: Re: [equinox-dev] Declarative Services within RCP
>        Applications
> To: Equinox development mailing list <equinox-dev@xxxxxxxxxxx>
> Message-ID: <498AE4AB.6010403@xxxxxxxxxxxxxxxx>
> 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.ds@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.cabe@xxxxxxxxxxxxxxxx 
> <mailto:benjamin.cabe@xxxxxxxxxxxxxxxx>
> *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@xxxxxxxxxxx
>> https://dev.eclipse.org/mailman/listinfo/equinox-dev
>>
> -------------- next part -------------- Skipped content of type 
> multipart/related
>
> ------------------------------
>
> _______________________________________________
> equinox-dev mailing list
> equinox-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/equinox-dev
>
>
> End of equinox-dev Digest, Vol 46, Issue 5
> ******************************************
> _______________________________________________
> equinox-dev mailing list
> equinox-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/equinox-dev
> _______________________________________________
> equinox-dev mailing list
> equinox-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/equinox-dev
>


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

Message: 2
Date: Fri, 6 Feb 2009 12:57:00 +0100
From: Krzysztof Daniel <krzysztof_daniel@xxxxxxxxxx>
Subject: [equinox-dev] Handling errors in the equinox
To: equinox-dev@xxxxxxxxxxx
Message-ID:
	<OFBAF74386.FCDD6233-ONC1257555.00409102-C1257555.0041A335@xxxxxxxxxx>
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@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/equinox-dev


End of equinox-dev Digest, Vol 46, Issue 7
******************************************