Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
COSMOS Design 208274
WIP
https://bugs.eclipse.org/bugs/show_bug.cgi?id=208274
COSMOS Toolkit/SDK
- Development environment - install a number of plugins into eclipse workbench
- Include examples and documentation on how to extend the COSMOS framework.
- Developers will create extensions to the COSMOS framework in the eclipse workbench environment.
- Testing environment: WSDM Tooling allows the launching of endpoints within eclipse
- Export the end result into deployment enviroment
- J2EE, OSGi
- Server component
- Client component
Design Considerations
- Decide on project multiplicity, e.g. one for client, one for server etc...
- What other things are available, e.g. STP or WTP may have annotations for web services.
Initial Design
To create a new MDR
File/New/Cosmos/
Projects Create MDR Project
- Creates org.eclipse.cosmos.*mdrname.mdr project
- Creates org.eclipse.cosmos.*mdrname.mdr.test junit project
- Creates Activator.java
- Creates *mdrnameMdr.java
- Creates Junit test *mdrnameTest.java
- Create config.proprties
- Create domainEPR.xml
- Create MANIFEST.MF
- Creates Plug-in Dependencies
- org.apache.xerces_2.8.0*
- org.apache.xml.resolver*
- muse-complete-2.2.0.jar
- org.eclipse.osgi_3.3.2.R33x*
- org.eclipse.cosmos.common
- org.eclipse.dc.cmdbf.services
- org.eclipse.dc.dataManager
- org.eclipse.dc.mdr
- org.eclipse.dc.mdr.common
- org.eclipse.cosmos.management.common
- org.eclipse.cosmos.samples.cmdbf.services
Create Mdr Properties Wizard.
When the 'Create Mdr' wizard is launched, the following properties can be set:
- MdrName
- Resouce_ID
- Display Name
- Description
- Management Domain EPR file name
- Machine and port
- Deployment target (Tomcat/OSGI)
Mdr Project Details:
Activator.java
package org.eclipse.cosmos.*mdrname.mdr; import org.eclipse.cosmos.dc.dataManager.api.IDataManager; import org.eclipse.cosmos.dc.dataManager.impl.AbstractDataManagerActivator; public class Activator extends AbstractDataManagerActivator { @Override protected IDataManager getDataManagerInstance() { return new *MdrnameMdr(); } }
*MdrnameMdr.java
package org.eclipse.cosmos.*mdrname.mdr; import org.eclipse.cosmos.dc.cmdbf.services.query.service.IQueryHandlerFactory; import org.eclipse.cosmos.dc.dataManager.api.IDataManager; import org.eclipse.cosmos.dc.mdr.api.IMdrQuery; import org.eclipse.cosmos.dc.mdr.impl.AbstractMdr; import org.eclipse.cosmos.dc.mgmt.annotations.ManagedResource; import org.eclipse.cosmos.samples.cmdbf.services.query.ICMDBfSampleConstants; import org.eclipse.cosmos.samples.cmdbf.services.query.QueryHandlerFactory; import org.eclipse.cosmos.samples.cmdbf.services.query.XMLRepository; @ManagedResource public class *MdrnameMdr extends AbstractMdr implements IDataManager, IMdrQuery { public ExampleMdr() { } @Override public IQueryHandlerFactory getQueryHandlerFactory() { return QueryHandlerFactory.getInstance(); } }
config.properties
RESOURCE_ID=Example DISPLAY_NAME=MDR Example DESCRIPTION=An example of an MDR MGMT_DOMAIN_EPR_FILE=META-INF/domainEPR.xml
domainEPR.xml
<?xml version="1.0" encoding="UTF-8"?> <wsa:EndpointReference xmlns:wsa="http://www.w3.org/2005/08/addressing"> <wsa:Address>http://localhost:8080/cosmos/services/domain</wsa:Address> </wsa:EndpointReference>
MANIFEST.MF
Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Example MDR Bundle-SymbolicName: org.eclipse.cosmos.*mdrname.mdr Bundle-Version: 1.0.0 Bundle-Activator: org.eclipse.cosmos.*mdrname.mdr.Activator Import-Package: org.osgi.framework;version="1.3.0" Require-Bundle: org.eclipse.cosmos.dc.mdr, org.apache.xerces, org.eclipse.cosmos.common, org.eclipse.cosmos.dc.cmdbf.services, org.apache.muse.complete, org.eclipse.cosmos.samples.cmdbf.services Export-Package: org.eclipse.cosmos.*mdrname.mdr