It's all about the answers!

Ask a question

[SOLVED] CCM Service component development

Joao Bosco Jares A. Chaves (324813) | asked Aug 05 '13, 12:31 p.m.
edited Sep 02 '13, 10:35 a.m. by Ralph Schoon (58.7k23642)
 Hi Folks,

I have found many articles that explain advisor development, but until now I have not found anything to explain how to expose a new component service as we can found at https://localhost:9443/ccm/admin? When I deploy a new advisor as plugin manner, this advisor is shown in the component status list as "No Services", but I want to define services for him. How can I do it?


Accepted answer

permanent link
sam detweiler (12.4k6182201) | answered Aug 07 '13, 5:18 p.m.
edited Sep 02 '13, 11:49 a.m.
RTC supports a client (library) calling a server side service. they marshall all the parameters and the results.

the 'interface' is the api definition.

the client needs to 'call it' and the server needs to 'implement it'

so you build two jar files..

interface and client code
interface and server service code

you also have some client application, that uses the client library to get data from the server, thru the service interface definition.

Joao Bosco Jares A. Chaves selected this answer as the correct answer

5 other answers

permanent link
sam detweiler (12.4k6182201) | answered Aug 05 '13, 3:31 p.m.
edited Aug 05 '13, 4:15 p.m.
I have created my own services..

these require 3 parts

service implemention
client implementation
here is my interface definition

public interface IRepositoryFileService

    public String getSpecialVolumePrefix();

    public int getSpecialFileSize();
    public Object getServerProperty(String id);


here is the top of my implemention
public class RepositoryFileService extends AbstractService implements IRepositoryFileService

here is the xml in plugin.xml for the serer side
   <extension point="">
                    <providedService interface="com.xx.repository.service.IRepositoryFileService"/>

on the client side, I wanted to use the client interface (getClientLibrary)
make an interface
public interface IFileParmClient
    Object getProperty(String id );
    String getSpecialVolumePrefix();
    int getSpecialFileSize();

make a class that implements it
public final class FileParmClient implements IFileParmClient{

create the client library factory

public class FileParmClientLibraryFactory extends ClientLibraryFactory {
    public Object createClientLibrary(IClientLibraryContext context) {
        return new FileParmClient(context);

---- using this client interface (this is another service class, which has a simpler sample)
                    ISynchParmClient p= getVarService();
                        System.out.println("calling to get parms");
                        Varlist = (String)p.getProperty("sfdc.fieldstosynch");
                        System.out.println("unable to locate parms service");
      private static ISynchParmClient IVarService=null;
      private static ISynchParmClient getVarService()
              System.out.println("parm client get library failed");   
          return IVarService;

permanent link
sam detweiler (12.4k6182201) | answered Aug 05 '13, 3:34 p.m.
my services do NOT show in the active service list however.

their parameters DO show in the list of config properties in the advanced server admin panel.

permanent link
Joao Bosco Jares A. Chaves (324813) | answered Aug 05 '13, 4:15 p.m.
 Thanks a lot, one more time sam.
Best Regards.

sam detweiler commented Aug 05 '13, 4:19 p.m.

you're welcome.. I forgot to mention the interface/server/client split.

because u can't use client code on the server, nor server code on the client, you need them separated.

so, the server side is interface + server
and the client side is interface + client.

permanent link
Joao Bosco Jares A. Chaves (324813) | answered Aug 07 '13, 1:42 p.m.

Just now I have time to put to run your response, however I can not understand the relation between service, client and interface. So, I have some more questions to you as bellow:

a) What is the deploy topology between server and client?
b) The same interface will be shared between both sides? If not, how client side can do relation with the server side?


permanent link
Joao Bosco Jares A. Chaves (324813) | answered Aug 29 '13, 4:44 p.m.
Hi sam detweiler.

I just had time now to study and implement this thread. So Thanks a lot one more time, because you answer is really nice.

Below, my configurations to help others, if necessary:

Plugin Project 1:  com.example.jazz.simplerest.common (ISimpleRestService)




public interface ISimpleRestService extends ITeamModelledRestService {
public String getHelp() throws TeamRepositoryException;


Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Common SimpleRest Plugin
Bundle-SymbolicName: com.example.jazz.simplerest.common;singleton:=true
Bundle-Version: 1.0.0
Bundle-Vendor: EXAMPLE

Plugin Project 2:  com.example.jazz.simplerest.service (SimpleRestService)

Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Service Plug-in
Bundle-SymbolicName: com.example.jazz.simplerest.service;singleton:=true
Bundle-Version: 1.0.0
Bundle-Vendor: EXAMPLE
Import-Package: javax.servlet,




public class SimpleRestService extends AbstractService implements ISimpleRestService {

private final static String USAGE_HELP_MSG = "Usage /";

public String getHelp() throws TeamRepositoryException {


Feature Project:  com.example.jazz.simplerest.service (com.example.jazz.simplerest.common, com.example.jazz.simplerest.service)


<?xml version="1.0" encoding="UTF-8"?>

   <description url="">
      [Enter Feature Description here.]

   <copyright url="">
      [Enter Copyright Description here.]

   <license url="">
      [Enter License Description here.]




sam detweiler commented Aug 29 '13, 6:09 p.m.

I am so glad you were able to accomplish your goal. thank you also for the feedback

Your answer

Register or to post your answer.