組件負載平衡應(yīng)用 下面的說明可使 clb 得到迅速應(yīng)用。這些說明假設(shè)將用 stager 來將內(nèi)容部署到 web 層和 com+ 群集上。并假定您掌握了有關(guān) visual basic、asp 和 html 的實際使用知識。
在 stager 上使用 visual basic,創(chuàng)建一個導(dǎo)出以下函數(shù)的 com+ 組件。 public function getname() as string set ws = createobject("wscript.network") getname = ws.computername set ws=nothing
end function
使用 com+ services explorer 將組件打包進 com+ 應(yīng)用程序中。
在 stager 上,創(chuàng)建包括 com+ 組件的 application center 應(yīng)用程序。
用下面的腳本創(chuàng)建一個名為 default.asp 的 asp 文件。 <script language=vbscript runat="server">
for n=1 to 50 set x=createobject ("yourcomponent.yourclass") response.write "component created on: " response.write x.getname response.write "<br>" set x=nothing next