Skip to content
This repository has been archived by the owner on Feb 22, 2019. It is now read-only.

org.nasdanika.cdo

Pavel Vlasov edited this page Mar 28, 2014 · 4 revisions

This bundle provides the following classes and interfaces:

  • CDOSessionInitializer - components which implement this interface are used by session provider components to initialize CDO sessions, e.g. register packages and load initial data, if the underlying repository is empty.
  • CDOSessionProviderComponent - an OSGi component which connects to a CDO Server/repository and exposes CDOSessionProvider interface. This component may connect to a repository over TCP or JVM transports. It can be configured to use zero or more session initializers.
  • CDOSessionProviderServerComponent - is a combination of CDOSessionProviderComponent and ServerComponent with the server component activated before the session provider component and deactivated after.
  • RepositoryProvider interface shall be implemented by components which provide repositories for the ServerComponent
  • ServerComponent exposes one or more CDO repositories over JVM or TCP transports.

Sample server component definition

<?xml version="1.0" encoding="UTF-8"?>
<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" immediate="true" name="Credit Cards">
   <implementation class="org.nasdanika.cdo.CDOSessionProviderServerComponent"/>
   <reference 
   		bind="addRepository" 
   		cardinality="1..1" 
   		interface="org.nasdanika.cdo.RepositoryProvider" 
   		name="RepositoryProvider" 
   		policy="static" 
   		target="(component.name=credit_cards_repository)" 
   		unbind="removeRepository"/>
   	
   <property name=".acceptors" type="String" value="jvm:credit_cards"/>
   <property name=".repositoryName" type="String" value="credit_cards"/>
   <property name=".connector" type="String" value="jvm:credit_cards"/>
   <service>
      <provide interface="org.eclipse.emf.cdo.session.CDOSessionProvider"/>
   </service>
   <property name="alias" type="String" value="credit_cards"/>
   <reference 
   		bind="addSessionInitializer" 
   		cardinality="1..1" 
   		interface="org.nasdanika.cdo.CDOSessionInitializer" 
   		name="CDOSessionInitializer" 
   		policy="static" 
   		target="(component.name=credit_cards_session_initializer)" 
   		unbind="removeSessionInitializer"/>
   		
</scr:component>
Clone this wiki locally