ApplicationConfiguration DS example [message #1060972] |
Wed, 29 May 2013 07:29  |
Eclipse User |
|
|
|
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 09:38   |
Eclipse User |
|
|
|
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/
|
|
|
|
Re: ApplicationConfiguration DS example [message #1061068 is a reply to message #1061013] |
Wed, 29 May 2013 14:39  |
Eclipse User |
|
|
|
Ralf,
I wondered why you said this:
Quote:it seems that you're still using RAP 1.5.
... because I am using 2.0! So I checked out your example, and it looked the same as my code, at least, that't what I though. until I spotted the typo in the ApplicationConfiguration package name in the component definition... inserted the ".rap", and everything fell magically in place.
I must have copied that from a 1.5 sample project and forgot to update to the new package names.
I am rolling again, thanks for your help.
Kind Regards,
Erwin
|
|
|
Powered by
FUDForum. Page generated in 0.02896 seconds