cancel
Showing results for 
Search instead for 
Did you mean: 

How to check that my portal service is running

0 Kudos
528

Hi,

Do you know some admin application in portal which show all services that are running

I created a simple portal service and when I try to get it with this code:

public void doContent(IPortalComponentRequest request, IPortalComponentResponse response)

{

try {

response.write("!!!BEGIN OF TEST<br/>");

String srvID = IPCDProvider.KEY;

IPCDProvider service = (IPCDProvider)

PortalRuntime.getRuntimeResources().getService(srvID);

response.write("<p>Name = " + service.getKey());

} catch (Exception e) {

// TODO: handle exception

response.write("END WITH ERROR!!!<br/><br/>");

response.write("ERROR:::" + e);

}

I receive error : ERROR:::com.sapportals.portal.prt.service.ServiceException: Service not found: pcd.PCDProvider

I want to check that my service is deployed and running

View Entire Topic
Dan_Wroblewski
Developer Advocate
Developer Advocate
0 Kudos

Hi Rosen,

Apparently there is no way to see all services at once, but I assume you know the application in which your service was deployed.

You can use the application console to check the application and what services were deployed and if they are started.

System Administration --> Support --> Portal Runtime --> Application Console

Daniel

0 Kudos

Yes I saw (under System Admin -> Support -> Portal Runtime -> Application Console) that my service is started

But I receive error when I try getService method

String srvID = "tc.lm.ctc.cpa.pcd_sda";

IPCDProvider service = (IPCDProvider)

PortalRuntime.getRuntimeResources().getService(srvID);

This is portalapp.xml of my testing application

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

<application alias="ShowPCDConfigData">

<application-config>

<property name="PrivateSharingReference" value="com.sap.portal.pcd.glservice,tc.lm.ctc.cpa.pcd_sda"/>

</application-config>

<components>

<component name="Test">

<component-config>

<property name="ClassName" value="com.sap.tc.lm.ctc.cpa.pcd.test.Test"/>

</component-config>

<component-profile/>

</component>

</components>

<services/>

</application>

This is a portalapp.xml of my portal application that expose servise (that I am tring to get)

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

<application alias="PCDProviderService">

<application-config>

<property name="PrivateSharingReference" value="com.sap.portal.pcd.glservice"/>

</application-config>

<components/>

<services>

<service name="PCDProvider">

<service-config>

<property name="className" value="com.sap.lm.ctc.cpa.pcd.service.PCDProvider"/>

<property name="startup" value="true"/>

</service-config>

</service>

</services>

</application>

Could you help me, please

detlev_beutner
Active Contributor
0 Kudos

Hi Rosen,

String srvID = "tc.lm.ctc.cpa.pcd_sda";

==> String srvID = "PCDProviderService.PCDProvider";

(probably also "tc.lm.ctc.cpa.pcd_sda.PCDProvider").

will do it.

Hope it helps

Detlev

0 Kudos

Thank you very much Detlev