Home » Modeling » EMF » (no subject)
(no subject) [message #687228] |
Thu, 16 June 2011 17:26  |
Eclipse User |
|
|
|
Hi,
I have some server side code which starts a job which runs on the server and connects to the CDO server. This job should
start when the whole osgi app starts but it should get a signal when the repository is ready to connect to. When it gets
the signal it can start itself and read info from the repository. Is there a way to receive this signal?
I tried an element post processor but at that point the repository has been created but is not yet available to be used
through normal cdo session/transaction.
--
With Regards, Martin Taal
Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
|
|
| | | | |
(no subject) [message #687516 is a reply to message #687232] |
Fri, 17 June 2011 05:27   |
Eclipse User |
|
|
|
Okay, I will try to add a listener directly to the container. Where do I that? Or can it be done declaratively?
gr. Martin
On 06/17/2011 09:16 AM, Eike Stepper wrote:
> Am 16.06.2011 23:53, schrieb Martin Taal:
>> Hi,
>> As an extra info, I tried adding a listener to the container for the event that the repository was added, but when
>> execute on that (and connect to the repository on that event) then I get a stackoverflowerror. So that does not seem
>> to be a good direction either.
> Hmm, I would have suggested that an IListener on the container is preferrable over an IElementProcessor. In both cases
> you should check isActive() on the added container element (your repository) and if it's not yet active add another
> listener (LifecycleEventAdapter) to that element and postpone your processing. If yu submit a bugzilla I can abstract
> this pattern in a new ActivationAdapter class because this looks like a common use case.
>
> Cheers
> /Eike
>
> ----
> http://www.esc-net.de
> http://thegordian.blogspot.com
> http://twitter.com/eikestepper
>
>
>>
>> gr. Martin
>>
>> On 06/16/2011 11:26 PM, Martin Taal wrote:
>>> Hi,
>>> I have some server side code which starts a job which runs on the server and connects to the CDO server. This job should
>>> start when the whole osgi app starts but it should get a signal when the repository is ready to connect to. When it gets
>>> the signal it can start itself and read info from the repository. Is there a way to receive this signal?
>>>
>>> I tried an element post processor but at that point the repository has been created but is not yet available to be used
>>> through normal cdo session/transaction.
>>>
>>
>>
--
With Regards, Martin Taal
Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
|
|
|
(no subject) [message #687520 is a reply to message #687516] |
Fri, 17 June 2011 16:03  |
Eclipse User |
|
|
|
Am 17.06.2011 11:27, schrieb Martin Taal:
> Okay, I will try to add a listener directly to the container. Where do I that? Or can it be done declaratively?
Only programmatically I fear:
IPluginContainer.INSTANCE.addListener(new IListener() {...});
I like the idea of being able to do it declaratively, though. Can you file a bugzilla to remind me?
Cheers
/Eike
----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
>
> gr. Martin
>
> On 06/17/2011 09:16 AM, Eike Stepper wrote:
>> Am 16.06.2011 23:53, schrieb Martin Taal:
>>> Hi,
>>> As an extra info, I tried adding a listener to the container for the event that the repository was added, but when
>>> execute on that (and connect to the repository on that event) then I get a stackoverflowerror. So that does not seem
>>> to be a good direction either.
>> Hmm, I would have suggested that an IListener on the container is preferrable over an IElementProcessor. In both cases
>> you should check isActive() on the added container element (your repository) and if it's not yet active add another
>> listener (LifecycleEventAdapter) to that element and postpone your processing. If yu submit a bugzilla I can abstract
>> this pattern in a new ActivationAdapter class because this looks like a common use case.
>>
>> Cheers
>> /Eike
>>
>> ----
>> http://www.esc-net.de
>> http://thegordian.blogspot.com
>> http://twitter.com/eikestepper
>>
>>
>>>
>>> gr. Martin
>>>
>>> On 06/16/2011 11:26 PM, Martin Taal wrote:
>>>> Hi,
>>>> I have some server side code which starts a job which runs on the server and connects to the CDO server. This job should
>>>> start when the whole osgi app starts but it should get a signal when the repository is ready to connect to. When it gets
>>>> the signal it can start itself and read info from the repository. Is there a way to receive this signal?
>>>>
>>>> I tried an element post processor but at that point the repository has been created but is not yet available to be used
>>>> through normal cdo session/transaction.
>>>>
>>>
>>>
>
>
|
|
|
Goto Forum:
Current Time: Wed Jul 23 04:59:22 EDT 2025
Powered by FUDForum. Page generated in 0.38021 seconds
|