|
Re: [CDO] how to use CDOServerApplication within the client application [message #668523 is a reply to message #668520] |
Fri, 06 May 2011 04:12 |
|
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&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">
Cheers
/Eike
----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
|
|
|
|
Re: [CDO] how to use CDOServerApplication within the client application [message #686694 is a reply to message #686692] |
Tue, 10 May 2011 07:50 |
|
<!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&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>
Cheers
/Eike
----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
|
|
|
|
Re: [CDO] how to use CDOServerApplication within the client application [message #686850 is a reply to message #686692] |
Tue, 10 May 2011 07:50 |
|
<!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&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>
Cheers
/Eike
----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
|
|
|
Powered by
FUDForum. Page generated in 0.03497 seconds