Re: [CDO] References across two EMF models [message #727256] |
Tue, 20 September 2011 17:45 |
|
Hi Slawomir,
Is it possible that you try if the same problem occurs when using the DBStore (H2 is the easiest way to set up) instead
of the HibernateStore? Then I could see better whether the problem is caused by a particular store or whether it can be
a bug in the CDO core.
Cheers
/Eike
----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
Am 20.09.2011 19:38, schrieb Slawomir Duszynski:
> No, the models are statically known to my CDO client plugin. The MANIFEST.MF references both model plugins as
> Require-Bundle, when starting the client I register the packages
>
> CDOSession session = sessionConfiguration.openSession();
>
> org.eclipse.emf.cdo.net4j.CDOSession.Options sessionOptions = (org.eclipse.emf.cdo.net4j.CDOSession.Options) session
> .options();
> sessionOptions.getProtocol().setTimeout(ISignalProtocol.NO_TIMEOUT);
> System.out.println(session + " open");
>
> // package registry
> session.getPackageRegistry().putEPackage(Model1Package.eINSTANCE);
> System.out.println(Model1Package.eNAME + " put in registry");
>
> session.getPackageRegistry().putEPackage(Model2Package.eINSTANCE);
> System.out.println(Model2Package.eNAME + " put in registry");
>
>
> and then I just create various objects and add them to the CDOResource:
>
>
> ClassY info = Model2Factory.eINSTANCE.createClassY();
> CDOResource res = transaction.getOrCreateResource(resourceName);
> res.getContents().add(info);
>
>
> As I said, everything works ok as long as EMF of Model2 contains no references to Model1. But as soon as I add such a
> reference to ClassY, it is not possible to commit ClassY object to the repository. I debugged more, changing different
> EMF properties and project settings, but nothing helped so far.
>
> Are there any tutorials/documentation/examples on how to handle a case of two referencing models with CDO and Teneo? I
> suppose something is wrong with my configuration, maybe I could figure it out looking at a working reference case.
>
> Cheers,
> Slawomir
Cheers
/Eike
----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
|
|
|
Re: [CDO] References across two EMF models [message #727271 is a reply to message #727256] |
Tue, 20 September 2011 18:49 |
Martin Taal Messages: 5468 Registered: July 2009 |
Senior Member |
|
|
I have worked with CDO/Teneo with many models in one server which reference eachother, and it worked. So my guess is
that it might be related to the Lob part, have you tried other types of ereferences?
gr. Martin
On 09/20/2011 07:45 PM, Eike Stepper wrote:
> Hi Slawomir,
>
> Is it possible that you try if the same problem occurs when using the DBStore (H2 is the easiest way to set up) instead
> of the HibernateStore? Then I could see better whether the problem is caused by a particular store or whether it can be
> a bug in the CDO core.
>
> Cheers
> /Eike
>
> ----
> http://www.esc-net.de
> http://thegordian.blogspot.com
> http://twitter.com/eikestepper
>
>
>
> Am 20.09.2011 19:38, schrieb Slawomir Duszynski:
>> No, the models are statically known to my CDO client plugin. The MANIFEST.MF references both model plugins as
>> Require-Bundle, when starting the client I register the packages
>>
>> CDOSession session = sessionConfiguration.openSession();
>>
>> org.eclipse.emf.cdo.net4j.CDOSession.Options sessionOptions = (org.eclipse.emf.cdo.net4j.CDOSession.Options) session
>> .options();
>> sessionOptions.getProtocol().setTimeout(ISignalProtocol.NO_TIMEOUT);
>> System.out.println(session + " open");
>>
>> // package registry
>> session.getPackageRegistry().putEPackage(Model1Package.eINSTANCE);
>> System.out.println(Model1Package.eNAME + " put in registry");
>>
>> session.getPackageRegistry().putEPackage(Model2Package.eINSTANCE);
>> System.out.println(Model2Package.eNAME + " put in registry");
>>
>>
>> and then I just create various objects and add them to the CDOResource:
>>
>>
>> ClassY info = Model2Factory.eINSTANCE.createClassY();
>> CDOResource res = transaction.getOrCreateResource(resourceName);
>> res.getContents().add(info);
>>
>>
>> As I said, everything works ok as long as EMF of Model2 contains no references to Model1. But as soon as I add such a
>> reference to ClassY, it is not possible to commit ClassY object to the repository. I debugged more, changing different
>> EMF properties and project settings, but nothing helped so far.
>>
>> Are there any tutorials/documentation/examples on how to handle a case of two referencing models with CDO and Teneo? I
>> suppose something is wrong with my configuration, maybe I could figure it out looking at a working reference case.
>>
>> Cheers,
>> Slawomir
--
With Regards, Martin Taal
Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
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
|
|
|
Powered by
FUDForum. Page generated in 0.02829 seconds