|
|
|
Re: [CDO]: How to start the CDO-Server from a command shell without eclipse [message #728087 is a reply to message #727975] |
Thu, 22 September 2011 09:45   |
Eclipse User |
|
|
|
Am 22.09.2011 12:23, schrieb Juan C. Flores:
> Hello Eike,
>
> as far as I can see, the plugin starts the server using directly the osgi mechanism. Do you mean I should create an
> osgi-service (with the implementation in org.eclipse.emf.cdo.server.product) wich in turn starts the server?
I think I was confused by the fact that this thread's subject is a little different fro the exact question in the first
post, where you ask for a UI-less way. In general CDO, EMF and Net4j can operate in a number or environments:
a) Standalone, meaning that OSGi is not *running* (some bundle jars might be needed on the flat classpath, though)
b) Headless, meaning that OSGi is running, but without any Eclipse UI
c) RCP, meaning that OSGi is running together with an Eclipse workbench
d) IDE, same as RCP but including some plugins like core.resources and ui.ide
BTW, standalone, with this definition, can theoretically mean that a UI is included, such as Swing or SWT-standalone loops.
Regarding CDO, EMF or Net4j the only thing that makes a difference is whether OSGi is running or not. More exactly one
would say whether an extension registry is active or not. And the difference is that without an extension registry a
number of factories (or other things that are contributed automatically elsewise) may need to be registered manually.
So, you can basically take any example to start a CDO server and run it standalone. Just ensure that the following calls
are being made some time at the beginning:
IManagedContainer container = IPluginContainer.INSTANCE;
Net4jUtil.prepareContainer(container); // Prepare the Net4j kernel
TCPUtil.prepareContainer(container); // Prepare the TCP transport (optional)
JVMUtil.prepareContainer(container); // Prepare the JVM transport (optional)
CDONet4jServerUtil.prepareContainer(container); // Prepare the CDO server for Net4j
Cheers
/Eike
----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
|
|
|
|
Re: [CDO]: How to start the CDO-Server from a command shell without eclipse [message #728459 is a reply to message #728419] |
Fri, 23 September 2011 05:43  |
Eclipse User |
|
|
|
Am 23.09.2011 11:01, schrieb Juan C. Flores:
> Hi,
>
> I think you are right, the subject is a little bit confusing.
>
> Well, what I want is to start the server as simple as possible.
> 1) start from a comand shell script
> 2) The CDO-Server starts without any UI. at least no visible one.
> 3) If OSGI is not required, it would be great. As I said, as simple as possible
>
> I think the variant a) is the one I am looking for.
> 1) I would create a new eclipse Java Project
> 2) Implement or copy paste a java class which starts the CDO Server and do required tasks.
> 3) define the required jars in the classpath
Yes, that will work.
>
> My Problem is, that I don't know which jars I need. How can I find out which jars are required?
You could browse the dependency extent in some PDE views or editors.
Generally I recommend to create Plugin Projects rather than pure Java Projects. You can still launch your main() method
from within Eclipse. If you set a breakpoint somewhere, the debugger should show you the assembled classpath.
Cheers
/Eike
----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
|
|
|
Powered by
FUDForum. Page generated in 0.48944 seconds