Home » Eclipse Projects » Remote Application Platform (RAP) » ApplicationConfiguration DS example(configure method never executed when running as a component.)
ApplicationConfiguration DS example [message #1060972] |
Wed, 29 May 2013 11:29 |
Erwin Hogeweg Messages: 37 Registered: July 2009 |
Member |
|
|
Hi,
First of all, my apologies for all the spam here. I am really trying to figure out things on my own first, but every now and again you hit this wall that is just too high.
One the last steps I am working on is dropping the Activator, and creating a DS component for my service. That seems straightforward if you read the documentation. However, for some reason, most likely because I doing something wrong, it doesn't work.
I have implemented my definition similar to the sample definition below but the configure method is never called.
<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0">
<implementation class="com.example.SimpleConfiguration"/>
<service>
<provide interface="org.eclipse.rwt.application.ApplicationConfiguration"/>
</service>
<property name="contextName" type="String" value="example"/>
</scr:component>
When I add activator and deactivator method, they are hit when I define them in the component. This indicates to me that the DS bundle is doing it's work. The configure() method is never called though.
<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0">
<implementation class="com.example.SimpleConfiguration enabled="true" immediate="true" name="com.example.test" activate="activate" deactivate="deactivate"/>
<service>
<provide interface="org.eclipse.rwt.application.ApplicationConfiguration"/>
</service>
<property name="contextName" type="String" value="example"/>
</scr:component>
Obviously I am still missing a piece of the puzzle. I have spent numerous hours searching the web for a hint or a complete example, to no avail.
So, as always, any help is greatly appreciated.
Kind Regards,
Erwin
|
|
|
Re: ApplicationConfiguration DS example [message #1061005 is a reply to message #1060972] |
Wed, 29 May 2013 13:38 |
Ivan Furnadjiev Messages: 2426 Registered: July 2009 Location: Sofia, Bulgaria |
Senior Member |
|
|
Hi Erwin,
just use New Project Wizard and create a project based on "RAP Hello
World" template. The generated project uses DS.
[1]
http://www.eclipse.org/rap/developers-guide/devguide.php?topic=hello-world.html&version=2.0
Best,
Ivan
On 5/29/2013 2:29 PM, Erwin Hogeweg wrote:
> Hi,
>
> First of all, my apologies for all the spam here. I am really trying
> to figure out things on my own first, but every now and again you hit
> this wall that is just too high.
>
> One the last steps I am working on is dropping the Activator, and
> creating a DS component for my service. That seems straightforward if
> you read the documentation. However, for some reason, most likely
> because I doing something wrong, it doesn't work.
>
> I have implemented my definition similar to the sample definition
> below but the configure method is never called.
>
> <scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0">
> <implementation class="com.example.SimpleConfiguration"/>
> <service>
> <provide
> interface="org.eclipse.rwt.application.ApplicationConfiguration"/>
> </service>
> <property name="contextName" type="String" value="example"/>
> </scr:component>
>
> When I add activator and deactivator method, they are hit when I
> define them in the component. This indicates to me that the DS bundle
> is doing it's work. The configure() method is never called though.
>
> <scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0">
> <implementation class="com.example.SimpleConfiguration enabled="true"
> immediate="true" name="com.example.test" activate="activate"
> deactivate="deactivate"/>
> <service>
> <provide
> interface="org.eclipse.rwt.application.ApplicationConfiguration"/>
> </service>
> <property name="contextName" type="String" value="example"/>
> </scr:component>
>
> Obviously I am still missing a piece of the puzzle. I have spent
> numerous hours searching the web for a hint or a complete example, to
> no avail.
>
> So, as always, any help is greatly appreciated.
>
> Kind Regards,
>
> Erwin
>
>
>
--
Ivan Furnadjiev
Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/
Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
|
|
| | |
Goto Forum:
Current Time: Thu Apr 25 02:25:57 GMT 2024
Powered by FUDForum. Page generated in 0.03355 seconds
|