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 |
Eclipse User |
|
|
|
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 #68574 is a reply to message #68440] |
Mon, 22 January 2007 22:06 |
Eclipse User |
|
|
|
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 |
Eclipse User |
|
|
|
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 #601523 is a reply to message #68440] |
Mon, 22 January 2007 22:06 |
Eclipse User |
|
|
|
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 |
Chris Hines 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
>
|
|
|
Goto Forum:
Current Time: Fri Apr 19 22:45:55 GMT 2024
Powered by FUDForum. Page generated in 0.03671 seconds
|