|
|
|
|
Re: Share Live CDO Objects with .Net [message #847346 is a reply to message #847255] |
Tue, 17 April 2012 08:09 |
Martin Fluegge Messages: 141 Registered: July 2009 |
Senior Member |
|
|
Firoz,
I am also not aware of a direct Net4J/CDO implementation.
At work we implemented a Rest-based service using XMI as serialization to communicate between Java and C# based applications. Thus we wrote a serializer/deserializer for XMI on the C# site which uses meta information from an ecore/genmodel and creates POJOs (or is it POC#Os? - Plain old C# objects) which were generated from the metamodel. But as you want to use CDO this might not be the right approach for you.
The question is: What is your use case?
If you need full CDO assistance (lazy loading, updating etc.) I think you also have to re-implemented most parts of EMF (package registry, containment references, notifications, resources).
I am also not a C# expert, but from my experiences porting a Java application to C# is not as difficult as it sounds. But porting EMF, CDO client site and Net4J is a lot of work. But I agree, that this sounds quite interesing.
Cheers,
Martin
|
|
|
Re: Share Live CDO Objects with .Net [message #850073 is a reply to message #830487] |
Thu, 19 April 2012 18:37 |
Firoz Ahmad Messages: 3 Registered: March 2012 |
Junior Member |
|
|
I did some digging and there is a way to achieve the same. It is a nice simple way. I never bought the fact that you cannot do this.
1. Service Based implementation
Approach:
CDO works on the premise of a CDO Server running 1: n CDO Instances. Each Instance is self-managed and persisted to a configured Database server. These are the core components that could help lead us to a Web Service under OSGi (through which now you can extend traditional Eclipse plug-ins as Web services).
• An EMF model Library (Your Class Library). It is imperative you should have this for implementing live objects on CDO.
• Other libraries/plug-ins like Org.Eclipse.EMF.CDO, Org.Eclipse.EMF.CDO.Net4J,Org.Eclipse.Net4J.TCP,Org.Eclipse.EMF.Ecore.Change
Steps:
• Create a plug-In Project under Eclipse.
• Create Custom Adaptor to be used by the Plug-In(Not required, but nice design practice)
• Create Custom Java class with API's to CDO Server/CDO Instance for read/updates using transaction handle opened to live CDO instance using for example transaction.getOrCreateResource("/YourCDOLiveInstance").
• Export .JAR from eclipse plug-in and expose .Jar as Eclipse Plug-In Web Service under Tomcat
Pros:
• SOA.
• Abstraction of Your Model complexity implementation from consumer.
• Technology agnostic/highly re-usable.
• Highly configurable.
• Scalable and Customizable.
• Allows development of standard Message schema for contracts for communication between it and other custom applications within/out of Your domain.
• Allows for sharing of final model representation of Message sent in a standard format for persistence and cross-checking.
[Updated on: Thu, 19 April 2012 18:43] Report message to a moderator
|
|
|
Powered by
FUDForum. Page generated in 0.03287 seconds