[CDO] Automatic EPackage registration [message #541076] |
Fri, 18 June 2010 09:13 |
|
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 06:10 |
|
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
Cheers
/Eike
----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
|
|
|
Re: [CDO] Automatic EPackage registration [message #541436 is a reply to message #541263] |
Mon, 21 June 2010 07:42 |
|
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
|
|
|
|
Powered by
FUDForum. Page generated in 0.03326 seconds