Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [CDO] Server config file for gastro example
[CDO] Server config file for gastro example [message #535216] Fri, 21 May 2010 15:21 Go to next message
Waldi  is currently offline Waldi Friend
Messages: 60
Registered: July 2009
Member
Hi,

where can I find it? Where is the Database created? And where can I
configure the location of the server config file? I download the newest
version of the example from the cvs.

Btw: In the example from the eclipse update manager (CDO 3.0) some config
files are not included.
Re: [CDO] Server config file for gastro example [message #535219 is a reply to message #535216] Fri, 21 May 2010 15:48 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.
--------------020207060607070207020504
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit

Hi Waldi,

Comments below...


Am 21.05.2010 17:21, schrieb Waldi:
> Hi,
>
> where can I find it? Where is the Database created? And where can I
> configure the location of the server config file? I download the newest
> version of the example from the cvs.
>
The Gastro server is not started from a config file. It demonstrates the
programmatic setup of a server in
org.gastro.internal.server.OM.Activator.doStart():

| @Override
*protected **void *doStart() *throws *Exception
{
OM.LOG.info("Gastro server starting");
JdbcDataSource dataSource = *new *JdbcDataSource();
dataSource.setURL("jdbc:h2:_database/gastro");

IMappingStrategy mappingStrategy = CDODBUtil.createHorizontalMappingStrategy(*true*);
IDBAdapter dbAdapter = *new *H2Adapter();
IDBConnectionProvider dbConnectionProvider = DBUtil.createConnectionProvider(dataSource);
IStore store = CDODBUtil.createStore(mappingStrategy, dbAdapter, dbConnectionProvider);

Map<String, String> props = *new *HashMap<String, String>();
props.put(IRepository.Props.OVERRIDE_UUID, "gastro");
props.put(IRepository.Props.SUPPORTING_AUDITS, "true");
props.put(IRepository.Props.CURRENT_LRU_CAPACITY, "100000");
props.put(IRepository.Props.REVISED_LRU_CAPACITY, "10000");

repository = CDOServerUtil.createRepository("gastro", store, props);
CDOServerUtil.addRepository(IPluginContainer.INSTANCE, repository);
CDONet4jServerUtil.prepareContainer(IPluginContainer.INSTANC E);

acceptor =
(IAcceptor)IPluginContainer.INSTANCE.getElement("org.eclipse.net4j.acceptors ",
"tcp", "0.0.0.0:2036");
OM.LOG.info("Gastro server started");
}

@Override
*protected **void *doStop() *throws *Exception
{
OM.LOG.info("Gastro server stopping");
LifecycleUtil.deactivate(acceptor);
LifecycleUtil.deactivate(repository);
OM.LOG.info("Gastro server stopped");
}|


> Btw: In the example from the eclipse update manager (CDO 3.0) some config
> files are not included.
>
It would be helpful to know what exactly you're missing ;-)

Cheers
/Eike

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



--------------020207060607070207020504
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">
Hi Waldi,<br>
<br>
Comments below...<br>
<br>
<br>
Am 21.05.2010 17:21, schrieb Waldi:
<blockquote cite="mid:ht68du$n59$1@build.eclipse.org" type="cite">
<pre wrap="">Hi,

where can I find it? Where is the Database created? And where can I
configure the location of the server config file? I download the newest
version of the example from the cvs.
</pre>
</blockquote>
The Gastro server is not started from a config file. It demonstrates
the programmatic setup of a server in
org.gastro.internal.server.OM.Activator.doStart():<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 align="left" nowrap="nowrap"
valign="top"> <code><font color="#ffffff">


Re: [CDO] Server config file for gastro example [message #535220 is a reply to message #535219] Fri, 21 May 2010 15:53 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Am 21.05.2010 17:48, schrieb Eike Stepper:
> [...]
>> Btw: In the example from the eclipse update manager (CDO 3.0) some config
>> files are not included.
>>
> It would be helpful to know what exactly you're missing ;-)
Ok, I think I see what you mean. The two config/ folders in the
department and the table plugins are not included in the packaging. Is
it ok that I add them to the source bundles?

Cheers
/Eike

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


Re: [CDO] Server config file for gastro example [message #535226 is a reply to message #535220] Fri, 21 May 2010 16:13 Go to previous messageGo to next message
Waldi  is currently offline Waldi Friend
Messages: 60
Registered: July 2009
Member
see comments below

*lol* it should be a hint... Someone who is try to run the delivered example
will fail because the config files are missing. To avoid this, I give this
hint and if you want you can fix it ;-) If it run when you add this to the
source bundle I think its a good place to add it ;-)

"Eike Stepper" <stepper@esc-net.de> schrieb im Newsbeitrag
news:ht6aa4$6ov$2@build.eclipse.org...
> Am 21.05.2010 17:48, schrieb Eike Stepper:
>> [...]
>>> Btw: In the example from the eclipse update manager (CDO 3.0) some
>>> config
>>> files are not included.
>>>
>> It would be helpful to know what exactly you're missing ;-)
> Ok, I think I see what you mean. The two config/ folders in the
yes I mean exactly this.
> department and the table plugins are not included in the packaging. Is it
> ok that I add them to the source bundles?
>
> Cheers
> /Eike
>
> ----
> http://thegordian.blogspot.com
> http://twitter.com/eikestepper
>
>
Re: [CDO] Server config file for gastro example [message #535249 is a reply to message #535226] Fri, 21 May 2010 17:51 Go to previous message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Am 21.05.2010 18:13, schrieb Waldi:
> see comments below
>
> *lol* it should be a hint... Someone who is try to run the delivered example
> will fail because the config files are missing. To avoid this, I give this
> hint and if you want you can fix it ;-) If it run when you add this to the
> source bundle I think its a good place to add it ;-)
>
Done ;-)

Cheers
/Eike

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


> "Eike Stepper"<stepper@esc-net.de> schrieb im Newsbeitrag
> news:ht6aa4$6ov$2@build.eclipse.org...
>
>> Am 21.05.2010 17:48, schrieb Eike Stepper:
>>
>>> [...]
>>>
>>>> Btw: In the example from the eclipse update manager (CDO 3.0) some
>>>> config
>>>> files are not included.
>>>>
>>>>
>>> It would be helpful to know what exactly you're missing ;-)
>>>
>> Ok, I think I see what you mean. The two config/ folders in the
>>
> yes I mean exactly this.
>
>> department and the table plugins are not included in the packaging. Is it
>> ok that I add them to the source bundles?
>>
>> Cheers
>> /Eike
>>
>> ----
>> http://thegordian.blogspot.com
>> http://twitter.com/eikestepper
>>
>>
>>
>
>


Previous Topic:[Teneo] Lazy Properties, Instrumentation, Teneo+Hibernate
Next Topic:[Teneo] Mapping Exception Unknown Entity
Goto Forum:
  


Current Time: Fri Apr 26 21:36:24 GMT 2024

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

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

Back to the top