Use the following steps to create and deploy a custom advisor to a proxy server. Custom advisor policies allow for more specific determination of target application server availability. Custom advisors are Java™ code modules that work within the proxy server to provide information about application server availability to the proxy server selection code.
public AbstractHttpProxyCustomAdvisor(CustomAdvisorConfigObject caConfigObject) { super(caConfigObject); }
public boolean isUsable(AdvisableServer aServer) throws CustomAdvisorException;
protected void initialize() { super.initialize(); }For more information about the required routines and the other methods available to a custom advisor, see the application programming interface (API) reference section of the information center. A list of the product API specifications is displayed in alphabetic order.
The httpcustomadvisor.jar file can be used as a sample of a custom advisor. This file contains an AbstractHttpProxycustomAdvisor.java class that extends the com.ibm.wsspi.advisor.AbstractCustomAdvisor and implements the isUsable() and initialize() methods.
<advisor-context> <description>Webbsphere Proxy Demo HTTP Advisor Context</description> <display-name>Webbsphere Proxy Demo HTTP Advisor Context</display-name> ? <advisor> <advisor-name>WebsphereProxyDemoHttpAdvisor</advisor-name> ? <advisor-class> com.ibm.ws.proxy.demo.customadvisor.http.HttpProxyCustomAdvisor </advisor-class> <description>Demo Websphere Proxy Http Advisor Implementation</description> <display-name>Demo Websphere Proxy Http Advisor</display-name> </advisor> </advisor-context>
After compiling the custom advisor code, you need to create the advisor-context.xml file. This file is used to identify the code as a custom advisor Java archive (JAR) file when it is imported as an asset and then added as a compilation unit to a business-level application (BLA). When the custom advisor JAR asset is added to a BLA and then targeted to a proxy server, the Content DistributionFramework (CDF) support distributes and copies all the BLA artifacts of the custom advisor to the appropriate configuration information on the targets specified.
<advisor-name> SomeCustomAdvisor </advisor-name> <advisor-class> com.ibm.wlm.test.customadvisor.SomeCustomAdvisor </advisor-class> <description> Some Custom Advisor Description </description> <display-name> Some display name </display-name>
$AdminTask importAsset {-source C:/proxy/testadvisor.jar -storageType FULL} $AdminTask createEmptyBLA {-name myBLA} $AdminTask addCompUnit {-blaID myBLA -cuSourceID assetname=testadvisor.jar,assetversion=1.0 -MapTargets {{.* ProxyServer}} -CustomAdvisorCUOptions {{"type=Cluster,cellName=yourCellName,clusterName=yourClusterName ,applicationName=myBLA" default default default 1000}}} $AdminConfig save
In this information ...Related concepts
| IBM Redbooks, demos, education, and more(Index) Use IBM Suggests to retrieve related content from ibm.com and beyond, identified for your convenience. This feature requires Internet access. Most of the following links will take you to information that is not part of the formal product documentation and is provided "as is." Some of these links go to non-IBM Web sites and are provided for your convenience only and do not in any manner serve as an endorsement by IBM of those Web sites, the material thereon, or the owner thereof. |