Skip to main content



      Home
Home » Modeling » EMF » [CDO] Automatic EPackage registration
[CDO] Automatic EPackage registration [message #541076] Fri, 18 June 2010 05:13 Go to next message
Eclipse UserFriend
Hi everyone,

I read that CDO 3.0 had a lazy package registration mechanism : each time I commit a transaction, the EPackages contained in my session's package registry should be registered on the repository.

But when I'm trying to register a new Package :
packageRegistry.putEPackage(newPackage)

and commit my transaction, when I close the session and start a new one the package isn't contained in this new session's package registry.

Should I set an option or proceed differently ?

Thanks !
Alex
Re: [CDO] Automatic EPackage registration [message #541263 is a reply to message #541076] Sat, 19 June 2010 02:10 Go to previous messageGo to next message
Eclipse UserFriend
Hi Alex,

You can only commit new EPackages to a repository if the transaction
contains at least one new object of an EClass of that package. And in
this case the manual registration of the EPackage with the CDOSession of
this transaction is not necessary. It's done automatically if the
package is registered with the global package registry. Manual
registration is only needed for dynamic packages or if you need to have
the packages available *before* the new objects are attached. The
CDOEditor for example displays the registered packages from the session
package registry in a popup menu so that you can select a n EClass and
create new objects.

Cheers
/Eike

----
http://thegordian.blogspot.com
http://twitter.com/eikestepper



Am 18.06.2010 11:13, schrieb Alex:
> Hi everyone,
>
> I read that CDO 3.0 had a lazy package registration mechanism : each
> time I commit a transaction, the EPackages contained in my session's
> package registry should be registered on the repository.
> But when I'm trying to register a new Package :
> packageRegistry.putEPackage(newPackage)
>
> and commit my transaction, when I close the session and start a new
> one the package isn't contained in this new session's package registry.
> Should I set an option or proceed differently ?
> Thanks !
> Alex
Re: [CDO] Automatic EPackage registration [message #541436 is a reply to message #541263] Mon, 21 June 2010 03:42 Go to previous messageGo to next message
Eclipse UserFriend
Thanks for the reply !

In my case, I'm generating a new EPackage according to a textual description of it (a bit like EFactory or EMFAtic for example).

I would like this EPackage to be registered even if there it has currently no instance.

I didn't quite understant what you meant by "It's done automatically if the package is registered with the global package registry" : what's the global package registry ? My local EMF Package registry ? The configuration's package registry ?

Thanks again for your helpfull explanations Smile

Re: [CDO] Automatic EPackage registration [message #541452 is a reply to message #541436] Mon, 21 June 2010 04:54 Go to previous message
Eclipse UserFriend
Am 21.06.2010 09:42, schrieb Alex:
> Thanks for the reply !
>
> In my case, I'm generating a new EPackage according to a textual
> description of it (a bit like EFactory or EMFAtic for example).
> I would like this EPackage to be registered even if there it has
> currently no instance.
That's not supported. Please commit a new "fake" object, potentially to
a "fake" resource.

> I didn't quite understant what you meant by "It's done automatically
> if the package is registered with the global package registry" :
> what's the global package registry ?
See EPackage.Registry.INSTANCE

Cheers
/Eike

----
http://thegordian.blogspot.com
http://twitter.com/eikestepper


> My local EMF Package registry ? The configuration's package registry ?
> Thanks again for your helpfull explanations :)
>
>
Previous Topic:Synchronize WSDL-Editor & BPEL-Editor
Next Topic:[EMF Transaction] How to use it?
Goto Forum:
  


Current Time: Tue Jul 08 19:06:39 EDT 2025

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

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

Back to the top