Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc) » [Teneo] Refresh ?
[Teneo] Refresh ? [message #48541] |
Tue, 05 September 2006 10:24 ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: dami.dworld.org
Hello,
I used the teneo EMF Hibernate with the Library EMF Example. No problem.
However, I've done some tests :
2 Clients : A and B
If Client 'A' add a Book and Commit => Client B don't update automatically
:(
I try to hit "Refresh" and it's not any better, no update.
I'd like to find a way to update the view according to the real database
content, any simple solution ?
Thank you
|
|
| |
Re: [Teneo] Refresh ? [message #48604 is a reply to message #48574] |
Tue, 05 September 2006 11:18 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: dami.dworld.org
"Martin Taal" <mtaal@elver.org>
> Dami,
> I am not sure why the refresh action does not update the information. When
> you look at the log (log4j) do you see that the system actually connects
> to the database and does queries?
I've done some additional tests, to be clear, I'm using the Editor generated
by EMF. When I run the editor, it displays my model as a TREE with node.
With the Library example, I have "Library" Which included "Writer" and
"Book". When I hit the contextual menu "Refresh" on the Library element,
nothing happend. No move in the log4j. However, if I select a Writer and
that I do the exact same thing, I see the Log4j moving (connecting, etc.)
but the Writer is not updated according with the database last changed (I
renamed the writer with another client).
> Client notification/broadcast when something changes in the database is
> not supported by Teneo. You can also look at CDO (another EMFT project)
> which supports client notifications/broadcast in combination with a
> persistence solution.
Ok, but a manually refresh will do the work :p I need to make it work.
> gr. Martin
>
|
|
|
Re: [Teneo] Refresh ? [message #48667 is a reply to message #48604] |
Tue, 05 September 2006 12:01 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Martin Taal![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=mtaal%40springsite.com) Messages: 5468 Registered: July 2009 |
Senior Member |
|
|
Hi Dami,
Assume you know which object changed then you should try something like this:
EObject object = resource.getEObject(obj.getUriFragment());
HibernateResource hbResource = (HibernateResource)resource;
hbResource.getSession().refresh(object);
This post on the elver mailing list can also be of interest:
http://article.gmane.org/gmane.comp.java.emf.persistency/287
gr. Martin
dami wrote:
> "Martin Taal" <mtaal@elver.org>
>> Dami,
>> I am not sure why the refresh action does not update the information. When
>> you look at the log (log4j) do you see that the system actually connects
>> to the database and does queries?
>
> I've done some additional tests, to be clear, I'm using the Editor generated
> by EMF. When I run the editor, it displays my model as a TREE with node.
> With the Library example, I have "Library" Which included "Writer" and
> "Book". When I hit the contextual menu "Refresh" on the Library element,
> nothing happend. No move in the log4j. However, if I select a Writer and
> that I do the exact same thing, I see the Log4j moving (connecting, etc.)
> but the Writer is not updated according with the database last changed (I
> renamed the writer with another client).
>
>
>> Client notification/broadcast when something changes in the database is
>> not supported by Teneo. You can also look at CDO (another EMFT project)
>> which supports client notifications/broadcast in combination with a
>> persistence solution.
>
> Ok, but a manually refresh will do the work :p I need to make it work.
>
>> gr. Martin
>>
>
>
--
With Regards, Martin Taal
Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
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
|
|
|
Re: [Teneo] Refresh ? [message #48750 is a reply to message #48667] |
Tue, 05 September 2006 14:03 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: dami.dworld.org
"Martin Taal" <mtaal@elver.org>
> Hi Dami,
> Assume you know which object changed then you should try something like
> this:
> EObject object = resource.getEObject(obj.getUriFragment());
> HibernateResource hbResource = (HibernateResource)resource;
> hbResource.getSession().refresh(object);
>
> This post on the elver mailing list can also be of interest:
> http://article.gmane.org/gmane.comp.java.emf.persistency/287
>
Thanks again for your help !
Where should I insert this code ? I want to be able to manually refresh
whenever I need it with the editor plugin.
--
dami
|
|
| | |
Re: [Teneo] Refresh ? [message #590212 is a reply to message #48574] |
Tue, 05 September 2006 11:18 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: dami.dworld.org
"Martin Taal" <mtaal@elver.org>
> Dami,
> I am not sure why the refresh action does not update the information. When
> you look at the log (log4j) do you see that the system actually connects
> to the database and does queries?
I've done some additional tests, to be clear, I'm using the Editor generated
by EMF. When I run the editor, it displays my model as a TREE with node.
With the Library example, I have "Library" Which included "Writer" and
"Book". When I hit the contextual menu "Refresh" on the Library element,
nothing happend. No move in the log4j. However, if I select a Writer and
that I do the exact same thing, I see the Log4j moving (connecting, etc.)
but the Writer is not updated according with the database last changed (I
renamed the writer with another client).
> Client notification/broadcast when something changes in the database is
> not supported by Teneo. You can also look at CDO (another EMFT project)
> which supports client notifications/broadcast in combination with a
> persistence solution.
Ok, but a manually refresh will do the work :p I need to make it work.
> gr. Martin
>
|
|
|
Re: [Teneo] Refresh ? [message #590227 is a reply to message #48604] |
Tue, 05 September 2006 12:01 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) |
Martin Taal![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=mtaal%40springsite.com) Messages: 5468 Registered: July 2009 |
Senior Member |
|
|
Hi Dami,
Assume you know which object changed then you should try something like this:
EObject object = resource.getEObject(obj.getUriFragment());
HibernateResource hbResource = (HibernateResource)resource;
hbResource.getSession().refresh(object);
This post on the elver mailing list can also be of interest:
http://article.gmane.org/gmane.comp.java.emf.persistency/287
gr. Martin
dami wrote:
> "Martin Taal" <mtaal@elver.org>
>> Dami,
>> I am not sure why the refresh action does not update the information. When
>> you look at the log (log4j) do you see that the system actually connects
>> to the database and does queries?
>
> I've done some additional tests, to be clear, I'm using the Editor generated
> by EMF. When I run the editor, it displays my model as a TREE with node.
> With the Library example, I have "Library" Which included "Writer" and
> "Book". When I hit the contextual menu "Refresh" on the Library element,
> nothing happend. No move in the log4j. However, if I select a Writer and
> that I do the exact same thing, I see the Log4j moving (connecting, etc.)
> but the Writer is not updated according with the database last changed (I
> renamed the writer with another client).
>
>
>> Client notification/broadcast when something changes in the database is
>> not supported by Teneo. You can also look at CDO (another EMFT project)
>> which supports client notifications/broadcast in combination with a
>> persistence solution.
>
> Ok, but a manually refresh will do the work :p I need to make it work.
>
>> gr. Martin
>>
>
>
--
With Regards, Martin Taal
Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
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
|
|
|
Re: [Teneo] Refresh ? [message #590264 is a reply to message #48667] |
Tue, 05 September 2006 14:03 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: dami.dworld.org
"Martin Taal" <mtaal@elver.org>
> Hi Dami,
> Assume you know which object changed then you should try something like
> this:
> EObject object = resource.getEObject(obj.getUriFragment());
> HibernateResource hbResource = (HibernateResource)resource;
> hbResource.getSession().refresh(object);
>
> This post on the elver mailing list can also be of interest:
> http://article.gmane.org/gmane.comp.java.emf.persistency/287
>
Thanks again for your help !
Where should I insert this code ? I want to be able to manually refresh
whenever I need it with the editor plugin.
--
dami
|
|
| |
Goto Forum:
Current Time: Sun Sep 01 02:19:13 GMT 2024
Powered by FUDForum. Page generated in 0.03509 seconds
|