Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [CDO] how to register package ?
icon5.gif  [CDO] how to register package ? [message #498861] Wed, 18 November 2009 20:14 Go to next message
Rencana Tarigan is currently offline Rencana TariganFriend
Messages: 56
Registered: July 2009
Location: Bandung, Indonesia
Member

Hi all,
Can someone tell me how to register package (.ecore) to a session manually/automatically with java code ?


Re: [CDO] how to register package ? [message #498955 is a reply to message #498861] Thu, 19 November 2009 10:28 Go to previous messageGo to next message
Victor Roldan Betancort is currently offline Victor Roldan BetancortFriend
Messages: 524
Registered: July 2009
Senior Member
Rencana,

AFAIK, EPackages are registered (committed to the repository) in the
first attempt to commit a CDOObject that is instance of any of the
elements in the EPackage.

So you only need a CDO-aware model, create instances and commit them in
a CDOTransaction. The EPackage shall be committed automatically.

Are you experiencing any problem with this?

Cheers,
Víctor.

Rencana Tarigan escribió:
> Hi all,
> Can someone tell me how to register package (.ecore) to a session
> manually/automatically with java code ?
Re: [CDO] how to register package ? [message #498996 is a reply to message #498955] Thu, 19 November 2009 13:28 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Hey guys,

If you want to you can proactively register a package with
session.getPackageRegistry().putEPackage(...)

Cheers
/Eike

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



Víctor Roldán Betancort schrieb:
> Rencana,
>
> AFAIK, EPackages are registered (committed to the repository) in the
> first attempt to commit a CDOObject that is instance of any of the
> elements in the EPackage.
>
> So you only need a CDO-aware model, create instances and commit them
> in a CDOTransaction. The EPackage shall be committed automatically.
>
> Are you experiencing any problem with this?
>
> Cheers,
> Víctor.
>
> Rencana Tarigan escribió:
>> Hi all,
>> Can someone tell me how to register package (.ecore) to a session
>> manually/automatically with java code ?


Re: [CDO] how to register package ? [message #499076 is a reply to message #498996] Thu, 19 November 2009 18:01 Go to previous message
Rencana Tarigan is currently offline Rencana TariganFriend
Messages: 56
Registered: July 2009
Location: Bandung, Indonesia
Member

Hi Victor,
I think that only work when you commit transaction first, how if you get resource from cdo server first, i think you will get same error with me, package unit not available..

Hi Eike,
Thanks for reply and my code work Smile

Thanks,
CanA


Previous Topic:[CDO] Support for external proxies
Next Topic:Customizing standard EMF editor Drag & Drop behavior
Goto Forum:
  


Current Time: Thu Apr 25 17:49:58 GMT 2024

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

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

Back to the top