Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [CDO] how to use CDOServerApplication within the client application
[CDO] how to use CDOServerApplication within the client application [message #668520] Fri, 06 May 2011 03:02 Go to next message
John Smith is currently offline John SmithFriend
Messages: 137
Registered: July 2009
Senior Member
I want to melt my CDO client with my CDO server, so how can I use the
functionality CDOServerApplication provides withing my client
application (I dont wanted to use copy&paste)?
Re: [CDO] how to use CDOServerApplication within the client application [message #668523 is a reply to message #668520] Fri, 06 May 2011 04:12 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------050803010204000209010406
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit

Am 06.05.2011 05:02, schrieb exquisitus:
> I want to melt my CDO client with my CDO server, so how can I use the functionality CDOServerApplication provides withing my client application (I dont wanted to use copy&paste)?
I'd try something like this:

|IApplicationContext context = *new *IApplicationContext()
{
*public **void *setResult(Object result, IApplication application)
{
}

*public *String getBrandingProperty(String key)
{
*return null*;
}

*public *String getBrandingName()
{
*return null*;
}

*public *String getBrandingId()
{
*return null*;
}

*public *String getBrandingDescription()
{
*return null*;
}

*public *Bundle getBrandingBundle()
{
*return null*;
}

*public *String getBrandingApplication()
{
*return null*;
}

*public *Map getArguments()
{
*return null*;
}

*public **void *applicationRunning()
{
}
};

CDOServerApplication app = *new *CDOServerApplication();
app.start(context);
app.stop();|



--------------050803010204000209010406
Content-Type: text/html; charset=ISO-8859-15
Content-Transfer-Encoding: 8bit

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-15"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Am 06.05.2011 05:02, schrieb exquisitus:
<blockquote cite="mid:ipvnu3$65c$1@news.eclipse.org" type="cite">I
want to melt my CDO client with my CDO server, so how can I use
the functionality CDOServerApplication provides withing my client
application (I dont wanted to use copy&amp;paste)?
<br>
</blockquote>
I'd try something like this:<br>
<br>
<title></title>
<style type="text/css">
<!--code { font-family: Courier New, Courier; font-size: 10pt; margin: 0px; }-->
</style>
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-15">
<!-- ======================================================== -->
<!-- = Java Sourcecode to HTML automatically converted code = -->
<!-- = Java2Html Converter 5.0 [2006-02-26] by Markus Gebhard markus@jave.de = -->
<!-- = Further information: http://www.java2html.de = -->
<div class="java" align="left">
<table bgcolor="#ffffff" border="0" cellpadding="3"
cellspacing="0">
<tbody>
<tr>
<!-- start source code --> <td nowrap="nowrap" align="left"
valign="top"> <code>
<font color="#ffffff">


Re: [CDO] how to use CDOServerApplication within the client application [message #686692 is a reply to message #668523] Tue, 10 May 2011 05:54 Go to previous messageGo to next message
John Smith is currently offline John SmithFriend
Messages: 137
Registered: July 2009
Senior Member
>> I want to melt my CDO client with my CDO server, so how can I use the
>> functionality CDOServerApplication provides withing my client
>> application (I dont wanted to use copy&paste)?
> I'd try something like this:
>
> |IApplicationContext context = *new *IApplicationContext()
> {
> *public **void *setResult(Object result, IApplication application)
> {
> }
> ..


I get an exception "Channel registration timeout after 10000
milliseconds". Also I tried to pass the real IApplicationContext.
So CDOServerApplication is not reusable for the client as it seems.
Re: [CDO] how to use CDOServerApplication within the client application [message #686694 is a reply to message #686692] Tue, 10 May 2011 07:50 Go to previous message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-15"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Am 10.05.2011 07:54, schrieb exquisitus:
<blockquote cite="mid:iqajhs$adl$1@news.eclipse.org" type="cite">
<blockquote type="cite">
<blockquote type="cite">I want to melt my CDO client with my CDO
server, so how can I use the
<br>
functionality CDOServerApplication provides withing my client
<br>
application (I dont wanted to use copy&amp;paste)?
<br>
</blockquote>
I'd try something like this:
<br>
<br>
|IApplicationContext context = *new *IApplicationContext()
<br>
{
<br>
*public **void *setResult(Object result, IApplication
application)
<br>
{
<br>
}
<br>
..
<br>
</blockquote>
<br>
<br>
I get an exception "Channel registration timeout after 10000
milliseconds". Also I tried to pass the real IApplicationContext.
<br>
So CDOServerApplication is not reusable for the client as it
seems.
<br>
</blockquote>
This conclusion is a little too quick ;-)<br>
<br>
I suspect that exception occurs because you've forgotten to deploy
the org.eclipse.emf.cdo.server.net4j plugin to your client (embedded
server). <br>
<br>
BTW. I've added a null context check to OSGiApplication. With that
you should be able to just execute:<br>
<br>
<code><br>
<font color="#ffffff">    </font><font color="#000000">CDOServerApplication app = </font><font
color="#7f0055"><b>new </b></font><font color="#000000">CDOServerApplication</font><font
color="#000000">()</font><font color="#000000">;</font><br>
<font color="#ffffff">    </font><font color="#000000">app.start</font><font
color="#000000">(</font></code><code><font color="#7f0055"><b>null</b></font></code><code><font
color="#000000">)</font><font color="#000000">;</font><br>
<font color="#ffffff">    </font><font color="#000000">app.stop</font><font
color="#000000">()</font><font color="#000000">;</font></code> <br>
<br>
Does this help?<br>
<br>
Cheers<br>
/Eike<br>
<br>
----<br>
<a class="moz-txt-link-freetext" href="http://www.esc-net.de">http://www.esc-net.de</a><br>
<a class="moz-txt-link-freetext" href="http://thegordian.blogspot.com">http://thegordian.blogspot.com</a><br>
<a class="moz-txt-link-freetext" href="http://twitter.com/eikestepper">http://twitter.com/eikestepper</a><br>
<br>
<br>
</body>
</html>


Re: [CDO] how to use CDOServerApplication within the client application [message #686848 is a reply to message #668523] Tue, 10 May 2011 05:54 Go to previous message
John Smith is currently offline John SmithFriend
Messages: 137
Registered: July 2009
Senior Member
>> I want to melt my CDO client with my CDO server, so how can I use the
>> functionality CDOServerApplication provides withing my client
>> application (I dont wanted to use copy&paste)?
> I'd try something like this:
>
> |IApplicationContext context = *new *IApplicationContext()
> {
> *public **void *setResult(Object result, IApplication application)
> {
> }
> ..


I get an exception "Channel registration timeout after 10000
milliseconds". Also I tried to pass the real IApplicationContext.
So CDOServerApplication is not reusable for the client as it seems.
Re: [CDO] how to use CDOServerApplication within the client application [message #686850 is a reply to message #686692] Tue, 10 May 2011 07:50 Go to previous message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-15"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Am 10.05.2011 07:54, schrieb exquisitus:
<blockquote cite="mid:iqajhs$adl$1@news.eclipse.org" type="cite">
<blockquote type="cite">
<blockquote type="cite">I want to melt my CDO client with my CDO
server, so how can I use the
<br>
functionality CDOServerApplication provides withing my client
<br>
application (I dont wanted to use copy&amp;paste)?
<br>
</blockquote>
I'd try something like this:
<br>
<br>
|IApplicationContext context = *new *IApplicationContext()
<br>
{
<br>
*public **void *setResult(Object result, IApplication
application)
<br>
{
<br>
}
<br>
..
<br>
</blockquote>
<br>
<br>
I get an exception "Channel registration timeout after 10000
milliseconds". Also I tried to pass the real IApplicationContext.
<br>
So CDOServerApplication is not reusable for the client as it
seems.
<br>
</blockquote>
This conclusion is a little too quick ;-)<br>
<br>
I suspect that exception occurs because you've forgotten to deploy
the org.eclipse.emf.cdo.server.net4j plugin to your client (embedded
server). <br>
<br>
BTW. I've added a null context check to OSGiApplication. With that
you should be able to just execute:<br>
<br>
<code><br>
<font color="#ffffff">    </font><font color="#000000">CDOServerApplication app = </font><font
color="#7f0055"><b>new </b></font><font color="#000000">CDOServerApplication</font><font
color="#000000">()</font><font color="#000000">;</font><br>
<font color="#ffffff">    </font><font color="#000000">app.start</font><font
color="#000000">(</font></code><code><font color="#7f0055"><b>null</b></font></code><code><font
color="#000000">)</font><font color="#000000">;</font><br>
<font color="#ffffff">    </font><font color="#000000">app.stop</font><font
color="#000000">()</font><font color="#000000">;</font></code> <br>
<br>
Does this help?<br>
<br>
Cheers<br>
/Eike<br>
<br>
----<br>
<a class="moz-txt-link-freetext" href="http://www.esc-net.de">http://www.esc-net.de</a><br>
<a class="moz-txt-link-freetext" href="http://thegordian.blogspot.com">http://thegordian.blogspot.com</a><br>
<a class="moz-txt-link-freetext" href="http://twitter.com/eikestepper">http://twitter.com/eikestepper</a><br>
<br>
<br>
</body>
</html>


Previous Topic:(no subject)
Next Topic:Re: [CDO] Commit timestamp
Goto Forum:
  


Current Time: Fri Apr 26 11:37:21 GMT 2024

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

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

Back to the top