Hi All,
I am trying out the Dynamic System resolution.I have a 2 systems System1 (Alias EDM2) and System2.I have an iView Test1 which connects to Alias EDM2.At the runtime I should be able to connect to System2 instead of System1.
I implemented a portal service as mentioned in the help and Daniel's weblog.
Once I deploy the code I am able to see the Registry entry for the alias.
But when I run the iView Test1 it stills points to EDM2.I am not sure if I missed something.
public interface IAliasResolutionService extends IDynamicSystemService
{
public static final String KEY = "AliasResolution.ich_srvc";
}
public class AliasResolutionService implements IAliasResolutionService,IService{
private IServiceContext mm_serviceContext;
/**
* Generic init method of the service. Will be called by the portal runtime.
* @param serviceContext
*/
public void init(IServiceContext serviceContext)
{
mm_serviceContext = serviceContext;
}
/**
* This method is called after all services in the portal runtime
* have already been initialized.
*/
public void afterInit()
{
}
/**
* configure the service
* @param configuration
* @deprecated
*/
public void configure(com.sapportals.portal.prt.service.IServiceConfiguration configuration)
{
}
/**
* This method is called by the portal runtime
* when the service is destroyed.
*/
public void destroy()
{
}
/**
* This method is called by the portal runtime
* when the service is released.
* @deprecated
*/
public void release()
{
}
/**
* @return the context of the service, which was previously set
* by the portal runtime
*/
public IServiceContext getContext()
{
return mm_serviceContext;
}
/**
* This method should return a string that is unique to this service amongst all
* other services deployed in the portal runtime.
* @return a unique key of the service
*/
public String getKey()
{
return KEY;
}
public String getAlternativeSystem(IUser user, String alias)
{
String system = "pcd:portal_content/test/systems.SCLNT100";//PCD Path
return system;
}
}
Portalapp.xml
<?xml version="1.0" encoding="utf-8"?>
<application>
<registry>
<entry path="/runtime/alias.mappers/SAP_ICH" name="ich_srvc" type="service"/>
</registry>
<application-config>
<property name="releasable" value="false"/>
<property name="startup" value="true"/>
<property name="ServicesReference" value="com.sap.portal.ivs.api_dynamicSystemService"/>
</application-config>
<components/>
<services>
<service name="ich_srvc">
<service-config>
<property name="className" value="com.aliasresolution.AliasResolutionService"/>
<property name="startup" value="true"/>
</service-config>
</service>
</services>
</application>
Please help me out.
Thanks.
Sowjanya.