|
Re: [CDO] Server config file for gastro example [message #535219 is a reply to message #535216] |
Fri, 21 May 2010 15:48 |
|
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">
Cheers
/Eike
----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03112 seconds