[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [cosmos-dev] How to add values for registration / query processing to the map
|
Hi Jimmy,
By using the framework from COSMOS, the work for exposing the query and
registration function as web services, and the handshake with the COSMOS
broker are done by the framework. The URLs to the services will be created
for you, and you don't need to do any mapping. You only need to provide
configuration values (config.properties) and logic for handling the CMDBf
query and registration request. You need to write "handlers" for the query
and registration engine. See this wiki page for information on how to
write handlers:
http://wiki.eclipse.org/Providing_a_CMDBf_Query_and_Registration_Service#Query_and_Registration_Service
In the generated code, you need to change the getQueryHandlerFactory() and
getNotificationHandlerFactory() methods to return an instance of the
factory class for the query and registration handlers respectively.
Examples:
MDR example:
- org.eclipse.cosmos.example.mdr.web <= This is the project equivalent to
your project generated by the tooling
- org.eclipse.cosmos.samples.cmdbf.services <= This is the class that
implements the query handlers, and the handler factory
Registration example:
- org.eclipse.cosmos.example.mdr.registration.web <= This is the project
equivalent to your project generated by the tooling
- org.eclipse.cosmos.example.mdr.registration <= This project implements
query and registration handlers for a test federating CMDB.
Does your internal MDR use Apache Axis to expose the query and registration
endpoints? If so, it's a non-COSMOS MDR or federating CMDB. You cannot
use the UI to interact with a non-COSMOS MDR or federating CMDB. In i10,
we will support the use of Axis2, not Axis, to create the web services.
The interoperability of non-COSMOS MDRs will be improved. But the concepts
of the COSMOS framework will remain the same.
Regards,
_________________________
Hubert Leung
IBM Toronto Lab
hkyleung@xxxxxxxxxx
905-413-3382
"Mohsin, Jimmy"
<Jimmy.Mohsin@ca.
com> To
Sent by: <cosmos-dev@xxxxxxxxxxx>
cosmos-dev-bounce cc
s@xxxxxxxxxxx
Subject
[cosmos-dev] How to add values for
03/27/2008 05:27 registration / query processing
PM to the map
Please respond to
Cosmos Dev
<cosmos-dev@eclip
se.org>
Hubert / Sheldon / Anyone
I have an internal MDR that publishes its query / registration services
with URLs of the following form:
http://localhost:8080/axis/services/Query
http://localhost:8080/axis/services/Registration
My goal: I am trying to execute CMDBf queries against this internal MDR
using the COSMOS i9 webUI
I ran the MDR toolkit wizard in i9 and generated the code shown snipper
shown below. Some questions:
1. Which methods are a must fill?
2. Should I be execute the generated code WITHOUT making any changes?
Obviously, nothing should happen..
3. How do I map the query / registration service URLs given above to what
needs to be filled in the methods below? Is there any code sample
available for this purpose?
Thanks,
Jimmy
=========================================Generated Code
========================================
package com.ca.myOwnMdr;
import org.eclipse.cosmos.dc.mdr.registration.AbstractFederatingCMDB;
import org.eclipse.cosmos.me.management.annotations.ManagedResource;
import
org.eclipse.cosmos.dc.cmdbf.services.query.service.IQueryHandlerFactory;
import
org.eclipse.cosmos.dc.cmdbf.services.common.INotificationHandlerFactory;
@ManagedResource
public class myMdr extends AbstractFederatingCMDB {
public myMdr() {
java.util.Map<String, Object> init = new java.util.Hashtable<String,
Object>();
// TODO add values required for query or registration processing to the
map
getQueryOperation().initialize(init);
getRegistrationOperation().initialize(init);
getDeregistrationOperation().initialize(init);
}
@Override
public IQueryHandlerFactory getQueryHandlerFactory() {
// TODO implement query handler factory
return null;
}
@Override
public INotificationHandlerFactory getNotificationHandlerFactory() {
// TODO implement notification handler factory
return null;
}
}_______________________________________________
cosmos-dev mailing list
cosmos-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cosmos-dev