Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [Transactions] [Teneo] What is the best way to create a NotificationFilter for the contents of a spe
[Transactions] [Teneo] What is the best way to create a NotificationFilter for the contents of a spe [message #68440] Sat, 20 January 2007 19:03 Go to next message
Eclipse UserFriend
Originally posted by: eclipsenews.cs-guy.com

Hi all,

I'm just getting started with EMF Transactions. So far I'm finding it very
useful. But, I'm having trouble with creating a NotificationFilter that
does what I want. Here is my scenario:

I am writing an RCP application that uses an EMF model to hold both runtime
and persistent data. The persistent data are managed by Teneo/Hibernate and
are contained by a hibernate://... Resource inside my
TransactionalEditingDomain. The runtime data are contained by a different
Resource that is also inside my TransactionalEditingDomain.

I would like to have a ResourceSetListener that only responds to NOT_TOUCH
type changes on EObjects contained by the hibernate://... resource. This
listener should respond to such events by calling save() on the
hibernate://... resource to keep the database in synch with the live
application data.

I don't know how to construct the proper NotificationFilter to return from
the ResourceSetListener. None of the set of available static filters nor
any of the create...Filter() methods provided by class NotificationFilter
seem to fit my needs, and I'm not allowed to create a custom
NotificationFilter because it's constructor is declared with default
visibility.

What am I missing?

I'm currently using EMF Transaction SDK 1.1.0.v200612220820.

Thanks,
Chris
Re: [Transactions] [Teneo] What is the best way to create a NotificationFilter for the contents of a [message #68487 is a reply to message #68440] Mon, 22 January 2007 10:16 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Chris,
I am afraid that I can't help you with this one. Maybe Ed or Christian can help you out.

gr. Martin

Chris Hines wrote:
> Hi all,
>
> I'm just getting started with EMF Transactions. So far I'm finding it very
> useful. But, I'm having trouble with creating a NotificationFilter that
> does what I want. Here is my scenario:
>
> I am writing an RCP application that uses an EMF model to hold both runtime
> and persistent data. The persistent data are managed by Teneo/Hibernate and
> are contained by a hibernate://... Resource inside my
> TransactionalEditingDomain. The runtime data are contained by a different
> Resource that is also inside my TransactionalEditingDomain.
>
> I would like to have a ResourceSetListener that only responds to NOT_TOUCH
> type changes on EObjects contained by the hibernate://... resource. This
> listener should respond to such events by calling save() on the
> hibernate://... resource to keep the database in synch with the live
> application data.
>
> I don't know how to construct the proper NotificationFilter to return from
> the ResourceSetListener. None of the set of available static filters nor
> any of the create...Filter() methods provided by class NotificationFilter
> seem to fit my needs, and I'm not allowed to create a custom
> NotificationFilter because it's constructor is declared with default
> visibility.
>
> What am I missing?
>
> I'm currently using EMF Transaction SDK 1.1.0.v200612220820.
>
> Thanks,
> Chris
>
>


--

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: [Transactions] [Teneo] What is the best way to create a NotificationFilter for the contents of a [message #68574 is a reply to message #68440] Mon, 22 January 2007 22:06 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: cdamus.ca.ibm.com

Hi, Chris,

The only resource-oriented filter available is the content-type filter. I
don't suppose that this would help, because the contents of a hibernate
resource are of the same type as XML or XMI resources (the schema is
independent of the persistence model).

I'm afraid that you'll just have to do the filtering in your
ResourceSetListener (checking the notifier's eResource() to see whether it
is a hibernate resource). The filter model is restrictive because it is
our intention to support declarative filters on the listener extension
point and reuse/optimization of filters; that just hasn't happened, yet.

Cheers,

Christian


Chris Hines wrote:

> Hi all,
>
> I'm just getting started with EMF Transactions. So far I'm finding it
> very
> useful. But, I'm having trouble with creating a NotificationFilter that
> does what I want. Here is my scenario:
>
> I am writing an RCP application that uses an EMF model to hold both
> runtime
> and persistent data. The persistent data are managed by Teneo/Hibernate
> and are contained by a hibernate://... Resource inside my
> TransactionalEditingDomain. The runtime data are contained by a different
> Resource that is also inside my TransactionalEditingDomain.
>
> I would like to have a ResourceSetListener that only responds to NOT_TOUCH
> type changes on EObjects contained by the hibernate://... resource. This
> listener should respond to such events by calling save() on the
> hibernate://... resource to keep the database in synch with the live
> application data.
>
> I don't know how to construct the proper NotificationFilter to return from
> the ResourceSetListener. None of the set of available static filters nor
> any of the create...Filter() methods provided by class NotificationFilter
> seem to fit my needs, and I'm not allowed to create a custom
> NotificationFilter because it's constructor is declared with default
> visibility.
>
> What am I missing?
>
> I'm currently using EMF Transaction SDK 1.1.0.v200612220820.
>
> Thanks,
> Chris
Re: [Transactions] [Teneo] What is the best way to create a NotificationFilter for the contents of a [message #68975 is a reply to message #68574] Tue, 23 January 2007 16:24 Go to previous message
Eclipse UserFriend
Originally posted by: chris.enterprise-elements.com

Thanks Christian,

Your suggested implementation is the way the program is currently written.
I just didn't know if there was a better way.

Chris

"Christian W. Damus" <cdamus@ca.ibm.com> wrote in message
news:ep3chn$u1k$1@utils.eclipse.org...
>
> Hi, Chris,
>
> The only resource-oriented filter available is the content-type filter. I
> don't suppose that this would help, because the contents of a hibernate
> resource are of the same type as XML or XMI resources (the schema is
> independent of the persistence model).
>
> I'm afraid that you'll just have to do the filtering in your
> ResourceSetListener (checking the notifier's eResource() to see whether it
> is a hibernate resource). The filter model is restrictive because it is
> our intention to support declarative filters on the listener extension
> point and reuse/optimization of filters; that just hasn't happened, yet.
>
> Cheers,
>
> Christian
>
>
> Chris Hines wrote:
>
>> Hi all,
>>
>> I'm just getting started with EMF Transactions. So far I'm finding it
>> very
>> useful. But, I'm having trouble with creating a NotificationFilter that
>> does what I want. Here is my scenario:
>>
>> I am writing an RCP application that uses an EMF model to hold both
>> runtime
>> and persistent data. The persistent data are managed by Teneo/Hibernate
>> and are contained by a hibernate://... Resource inside my
>> TransactionalEditingDomain. The runtime data are contained by a
>> different
>> Resource that is also inside my TransactionalEditingDomain.
>>
>> I would like to have a ResourceSetListener that only responds to
>> NOT_TOUCH
>> type changes on EObjects contained by the hibernate://... resource. This
>> listener should respond to such events by calling save() on the
>> hibernate://... resource to keep the database in synch with the live
>> application data.
>>
>> I don't know how to construct the proper NotificationFilter to return
>> from
>> the ResourceSetListener. None of the set of available static filters nor
>> any of the create...Filter() methods provided by class NotificationFilter
>> seem to fit my needs, and I'm not allowed to create a custom
>> NotificationFilter because it's constructor is declared with default
>> visibility.
>>
>> What am I missing?
>>
>> I'm currently using EMF Transaction SDK 1.1.0.v200612220820.
>>
>> Thanks,
>> Chris
>
Re: [Transactions] [Teneo] What is the best way to create a NotificationFilter for the contents of a [message #601473 is a reply to message #68440] Mon, 22 January 2007 10:16 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Chris,
I am afraid that I can't help you with this one. Maybe Ed or Christian can help you out.

gr. Martin

Chris Hines wrote:
> Hi all,
>
> I'm just getting started with EMF Transactions. So far I'm finding it very
> useful. But, I'm having trouble with creating a NotificationFilter that
> does what I want. Here is my scenario:
>
> I am writing an RCP application that uses an EMF model to hold both runtime
> and persistent data. The persistent data are managed by Teneo/Hibernate and
> are contained by a hibernate://.. Resource inside my
> TransactionalEditingDomain. The runtime data are contained by a different
> Resource that is also inside my TransactionalEditingDomain.
>
> I would like to have a ResourceSetListener that only responds to NOT_TOUCH
> type changes on EObjects contained by the hibernate://.. resource. This
> listener should respond to such events by calling save() on the
> hibernate://.. resource to keep the database in synch with the live
> application data.
>
> I don't know how to construct the proper NotificationFilter to return from
> the ResourceSetListener. None of the set of available static filters nor
> any of the create...Filter() methods provided by class NotificationFilter
> seem to fit my needs, and I'm not allowed to create a custom
> NotificationFilter because it's constructor is declared with default
> visibility.
>
> What am I missing?
>
> I'm currently using EMF Transaction SDK 1.1.0.v200612220820.
>
> Thanks,
> Chris
>
>


--

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: [Transactions] [Teneo] What is the best way to create a NotificationFilter for the contents of a [message #601523 is a reply to message #68440] Mon, 22 January 2007 22:06 Go to previous message
Eclipse UserFriend
Originally posted by: cdamus.ca.ibm.com

Hi, Chris,

The only resource-oriented filter available is the content-type filter. I
don't suppose that this would help, because the contents of a hibernate
resource are of the same type as XML or XMI resources (the schema is
independent of the persistence model).

I'm afraid that you'll just have to do the filtering in your
ResourceSetListener (checking the notifier's eResource() to see whether it
is a hibernate resource). The filter model is restrictive because it is
our intention to support declarative filters on the listener extension
point and reuse/optimization of filters; that just hasn't happened, yet.

Cheers,

Christian


Chris Hines wrote:

> Hi all,
>
> I'm just getting started with EMF Transactions. So far I'm finding it
> very
> useful. But, I'm having trouble with creating a NotificationFilter that
> does what I want. Here is my scenario:
>
> I am writing an RCP application that uses an EMF model to hold both
> runtime
> and persistent data. The persistent data are managed by Teneo/Hibernate
> and are contained by a hibernate://.. Resource inside my
> TransactionalEditingDomain. The runtime data are contained by a different
> Resource that is also inside my TransactionalEditingDomain.
>
> I would like to have a ResourceSetListener that only responds to NOT_TOUCH
> type changes on EObjects contained by the hibernate://.. resource. This
> listener should respond to such events by calling save() on the
> hibernate://.. resource to keep the database in synch with the live
> application data.
>
> I don't know how to construct the proper NotificationFilter to return from
> the ResourceSetListener. None of the set of available static filters nor
> any of the create...Filter() methods provided by class NotificationFilter
> seem to fit my needs, and I'm not allowed to create a custom
> NotificationFilter because it's constructor is declared with default
> visibility.
>
> What am I missing?
>
> I'm currently using EMF Transaction SDK 1.1.0.v200612220820.
>
> Thanks,
> Chris
Re: [Transactions] [Teneo] What is the best way to create a NotificationFilter for the contents of a [message #601603 is a reply to message #68574] Tue, 23 January 2007 16:24 Go to previous message
Chris Hines is currently offline Chris HinesFriend
Messages: 15
Registered: July 2009
Junior Member
Thanks Christian,

Your suggested implementation is the way the program is currently written.
I just didn't know if there was a better way.

Chris

"Christian W. Damus" <cdamus@ca.ibm.com> wrote in message
news:ep3chn$u1k$1@utils.eclipse.org...
>
> Hi, Chris,
>
> The only resource-oriented filter available is the content-type filter. I
> don't suppose that this would help, because the contents of a hibernate
> resource are of the same type as XML or XMI resources (the schema is
> independent of the persistence model).
>
> I'm afraid that you'll just have to do the filtering in your
> ResourceSetListener (checking the notifier's eResource() to see whether it
> is a hibernate resource). The filter model is restrictive because it is
> our intention to support declarative filters on the listener extension
> point and reuse/optimization of filters; that just hasn't happened, yet.
>
> Cheers,
>
> Christian
>
>
> Chris Hines wrote:
>
>> Hi all,
>>
>> I'm just getting started with EMF Transactions. So far I'm finding it
>> very
>> useful. But, I'm having trouble with creating a NotificationFilter that
>> does what I want. Here is my scenario:
>>
>> I am writing an RCP application that uses an EMF model to hold both
>> runtime
>> and persistent data. The persistent data are managed by Teneo/Hibernate
>> and are contained by a hibernate://.. Resource inside my
>> TransactionalEditingDomain. The runtime data are contained by a
>> different
>> Resource that is also inside my TransactionalEditingDomain.
>>
>> I would like to have a ResourceSetListener that only responds to
>> NOT_TOUCH
>> type changes on EObjects contained by the hibernate://.. resource. This
>> listener should respond to such events by calling save() on the
>> hibernate://.. resource to keep the database in synch with the live
>> application data.
>>
>> I don't know how to construct the proper NotificationFilter to return
>> from
>> the ResourceSetListener. None of the set of available static filters nor
>> any of the create...Filter() methods provided by class NotificationFilter
>> seem to fit my needs, and I'm not allowed to create a custom
>> NotificationFilter because it's constructor is declared with default
>> visibility.
>>
>> What am I missing?
>>
>> I'm currently using EMF Transaction SDK 1.1.0.v200612220820.
>>
>> Thanks,
>> Chris
>
Previous Topic:Teneo: <version type="dbtimestamp">
Next Topic:Teneo newbi, problems getting started
Goto Forum:
  


Current Time: Thu Feb 25 23:33:50 GMT 2021

Powered by FUDForum. Page generated in 0.02327 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top