35
1 © 2003 BEA Systems, Inc. BEA WebLogic Server 8.1 管理新功能簡介 葉文彬 Wenpin Yeh Developer Relation Engineer [email protected]

BEA WebLogic Server 8.1 管理新功能簡介 - search read.pudn.comread.pudn.com/downloads114/ebook/480034/2005_12_16_190946_dhAJaUGD… · WebLogic Server使您能夠自動地記載伺服器所觀察到的低記憶體情形。WebLogic

  • Upload
    others

  • View
    5

  • Download
    0

Embed Size (px)

Citation preview

  • 1

    © 2003 BEA Systems, Inc.

    BEA WebLogic Server 8.1

    管理新功能簡介

    葉文彬 Wenpin YehDeveloper Relation Engineer

    [email protected]

  • 2

    2© 2003 BEA Systems, Inc.

    課程總覽

    WebLogic Server 8.1所支援的J2EE 1.3 標準規範版本

    WebLogic Server 8.1在叢集環境的部署模式

    建立WebLogic Server 8.1 Domain在發展或開發模式的差異

    使用jRockit作為WebLogic Server 8.1 Java Virtual Machine的優點

    config.xml 的歸檔管理

    使用WebLogic Bulder 作為前端的部署工具與Deployment Descriptor alternation

    使用NodeManager作為WebLogic Server 8.1 Managed Server的自我健康診斷與開機管理

    Customed ClassLoader and Application level class library (For Enterprise Application, ear)

    新的JDBC功能

    新的Security功能

    新的Web Application 功能

  • 3

    3© 2003 BEA Systems, Inc.

    WebLogic Server 8.1 對於Java標準規範的支援

    Standard Version Standard Version

    J2EE 1.3 JDKs 1.4

    J2EE EJB 2.0 and 1.1 J2EE JMS 1.0.2b

    J2EE JDBC (with third-party drivers)

    2.0 MS SQL jDriver 1.0

    Oracle OCI jDriver 1.0 and some 2.0 features (batching)

    J2EE JNDI 1.2

    OTS/JTA 1.2 and 1.0.1b J2EE Servlet 2.3 and 2.2

    J2EE JSP 1.2 and 1.1 RMI/IIOP 1.0

    JMX 1.0 JavaMail 1.2

    JAAS 1.0 Full J2EE CA 1.0

    JCE 1.4 Java RMI 1.0

    JAXP 1.1 JAX-RPC 1.0

    了解WebLogic Server 8.1所支援的J2EE1.3 標準,有助於開發與部署符合J2EE規範的應用程式。

  • 4

    4© 2003 BEA Systems, Inc.

    WebLogic Server 8.1 對於Java標準規範的支援

    Standard Version Standard Version

    SOAP 1.1 and 1.2 WSDL 1.1

    UDDI v 1 and v2 WS-Security 1.0

    WebLogic Server 8.1 對於其他標準規範的支援

    Standard Version Standard Version

    SSL v3 X.509 v3

    LDAP v2 TLS v1

    HTTP 1.1 (+ byte-range) SNMP --

  • 5

    5© 2003 BEA Systems, Inc.

    部署應用程式到WebLogic Server 8.1的注意事項(Since WLS7.0) 籌畫型態(stage mode)

    部署籌畫型態 行為 何時使用

    stage 管理伺服器首先複製部署單元來源程式到標的伺服器的staging目錄(staging目錄預設名稱為stage,他位於標的伺服器的根目錄)標的伺服器再運用他們自己的部署檔案副本進行部署。

    部署小型或中型的應用程式到多個WebLogic Server實例。

  • 6

    6© 2003 BEA Systems, Inc.

    部署應用程式到WebLogic Server 8.1的注意事項(Since WLS7.0) 籌畫型態(stage mode)

    nostage 管理伺服器不複製部署單元檔案。取而代之的是所有伺服器的部署運用的是同一個部署單元的實體檔案,這個檔案必須能夠被管理伺服起與所有的標的伺服器直接存取。以nostage部署的exploded archive directories (檔案目錄), WebLogic Server自動地偵測對已部署JSP/Servlet的改變並更新這個部署。 (這個行為需要的話可以取消。)(這個satging模式在管理伺服器及標的伺服器處於不同的機器或不同的作業系統時可能沒有效用。)

    一個單一的管理伺服器部署。一個在multi-home的機器上的叢集部署。部署相當大的程式到許多標的伺服器或部署單元可以共享一個目錄的叢集。exploded archive directories的部署,在更改內容後而你想要定期的重新部署。需要透過Administration Console動態更動特定部署描述子(Deployment Descriptors) 的部署 。

  • 7

    7© 2003 BEA Systems, Inc.

    部署應用程式到WebLogic Server 8.1的注意事項(Since WLS7.0) 籌畫型態(stage mode)

    external_stage 管理伺服器不複製部署單元檔案。取而代之的是管理者必須確信在進行部署之前所有部署的檔案被分配到正確的staging目錄,(例如,在部署前手動複製到staging的目錄). 以external_stage進行部署,管理伺服器需要一個部署檔案的副本作為確認之用。存放在標的伺服器staging目錄中的部署檔案在部署前不會確認。

    你想要手動控制到標的伺服器的部署檔案配送地方的部署動作。third-party applications 或 scripts 管理複製部署檔案到正確的staging 目錄的部署動作。不需要經由Administration Console動態更動選定的部署描述子的部署動作(在external_stage mode不支援)不需要部分重新部署應用元件的部署動作。

    Server vs. Application Staging ModesWhen you deploy an application or standalone module using the Administration Console, the

    staging mode is set at the application level. The application staging mode always overrides any deployment mode specified for the target server itself.

    The server staging mode specifies the default deployment mode for a server if none is specified at deployment time. For example, the server staging mode is used if you deploy using weblogic.Deployer and you do not specify a staging mode. The default value for the server staging mode is nostage for the Administration Server and stage mode for Managed Servers.

  • 8

    8© 2003 BEA Systems, Inc.

    建立WebLogic Server 8.1 Domain在發展或開發模式的差異java … -Dweblogic.ProductionModeEnabled=true …weblogic.Server功用 在開發模式 在生產模式

    SSL 你可以使用WebLogic Server安全性服務提供的測試性電子簽章,以這些電子簽章你可以設計應用程式在SSL保護的環境中工作,對於管理安全性的較多資訊,請參閱”設定SSL”如下網址。http://e-docs.bea.com/wls/docs81/secmanage/ssl.html

    如果你使用測試性的電子簽章,會顯現出一個警告性的訊息。

    部署應用程式 WebLogic Server實例可以自動地部署及更新存在於domain_name/applications的應用程式。(domain_name指的是weblogic.Domain的名稱)

    Auto deployment的作用被取消,所以你必須使用WebLogic Server Administration Console或weblogic.Deployer工具對於部署的較多資訊,請參閱”部署WebLogic Server應用程式”,網址如下。http://e-docs.bea.com/wls/docs81/deployment/index.html

    在許多生產環境中使用develop mode是不推薦的。

    尤其在cluster環境,自動部署的功能是不推薦的。

  • 9

    9© 2003 BEA Systems, Inc.

    建立WebLogic Server 8.1 Domain在發展或開發模式的差異java … -Dweblogic.ProductionModeEnabled=true …weblogic.Server

    Log File Rotation

    當您啟動一個伺服器,伺服器自動地更換(rotate)它本身的伺服器紀錄檔(log file)名稱為server-name.log.n,在隨後的服務期間,當檔案大小到達500K bytes時,伺服器自動循環它本身的伺服器紀錄檔

    當檔案大小到達500K bytes時,伺服器自動循環它本身的伺服器紀錄檔

    執行佇列Execute Queues

    預設給執行佇列可用的執行緒數目為15。執行緒數目決定使用指定的執行佇列可以同時處理的作業。一般預設所有應用程式使用名稱為weblogic.kernel.Default的執行佇列。您可以建立額外的佇列來體驗你的應用程式對於使用更多的資源掌控程度。

    預設給執行佇列可用的執行緒數目為25。

    JDBC 連線貯存池

    預設容量為15個連線。 預設容量為25個連線。

  • 10

    10© 2003 BEA Systems, Inc.

    WebLogic Server 8.1 管理操作上的新功能

    簡潔的管理操作畫面

    內建的輔助說明令操作一目了然

    進階的操作選項減少以往必須在Deployment Descriptor加上註記的不便。

  • 11

    11© 2003 BEA Systems, Inc.

    WebLogic Server 8.1 管理操作上的新功能

    config.xml 的歸檔管理

    預設管理伺服器歸檔5個之前版本的config.xml在domain-name/configArchive目錄下。當您儲存一個對於domain 設定的改變,管理伺服器儲存之前的設定在domain-name/configArchive/config.xml#n. 每次管理伺服器會儲存一個檔案在configArchive目錄下,它增加#n字尾的值直到一個可設定的副本數目(預設是5

    個),此後每次您改變了domain的設定:§ 已歸檔的檔案被rotated,所以最新的檔案名稱的字尾有最大的編號。§ 之前已歸檔的檔案被改名為較低的編號。

    § 較舊的檔案被刪除。

  • 12

    12© 2003 BEA Systems, Inc.

    使用WebLogic Server 的不同部署工具

    Admin ConsoleWeblogic.DeployerWebLogic Builder

    1.使用 Admin Console

    2.使用 weblogic.Deployer 工具列

    3. 使用WebLogic Builder 作為前端的部署工具。

    請注意:

    1. 原本的Deployment Descriptor Editor已經移走,指定預設Web Application的方式在war是在weblogic.xml 中指定context,

    在ear是在application.xml中指定 。

    2. Certificate.war 已移除

    C:\> javaw.exe -client weblogic.marathon.Main

    使用WebLogic Builder來部署應用程式

  • 13

    13© 2003 BEA Systems, Inc.

    使用WebLogic Server 的不同部署工具

    weblogic.Deployer

    Alternate Deployment Descriptors (更迭部署描述子)改變一個應用程式執行階段的部署設定,而不需要修改及重新包裝archive的內容。-altappdd 選定更換的J2EE部署描述子名稱,

    例如application.xml。-altwlsappdd 選定更換的WebLogic Server部署描述子名稱,

    例如weblogic-application.xml。

    Alternate Deployment Descriptors (更迭部署描述子)這項功能使您能夠改變一個應用程式執行階段的部署設定,而不需要修改及重新包裝archive的內容。

    使用更迭部署描述子,你可以使用weblogic.Deployer工具,搭配下列其一或兩者選項

    -altappdd 選定更換的J2EE部署描述子名稱,例如application.xml。

    -altwlsappdd 選定更換的WebLogic Server部署描述子名稱,例如weblogic-application.xml。

  • 14

    14© 2003 BEA Systems, Inc.

    使用NodeManager作為WebLogic Server 8.1 Managed Server的自我健康診斷與開機管理

    Automatically Logging Low Memory Conditions

    WebLogic Server使您能夠自動地記載伺服器所觀察到的低記憶體情形。WebLogic Server藉著在一個時間間隔中取樣多次可用記憶體來偵測低記憶體情況。在每個間隔的最後,一個平均自由記憶體數目被紀錄並跟下一個間隔所得到的平均值比較。假如在任何取樣的間隔,平均值低於使用者訂定的數目,伺服器記載一個低記憶體警告訊息在紀錄檔中,並設定伺服器的狀態為”waring”。

    假使平均可用記憶體降低為你開啟伺服器之後緊接地記載的開始可用記憶體的5%,伺服器記載一個訊息在紀錄檔中。

  • 15

    15© 2003 BEA Systems, Inc.

    使用NodeManager作為WebLogic Server 8.1 Managed Server的自我健康診斷與開機管理

    Automatically Logging Low Memory Conditions

    WebLogic Server使您能夠自動地記載伺服器所觀察到的低記憶體情形。WebLogic Server藉著在一個時間間隔中取樣多次可用記憶體來偵測低記憶體情況。在每個間隔的最後,一個平均自由記憶體數目被紀錄並跟下一個間隔所得到的平均值比較。假如在任何取樣的間隔,平均值低於使用者訂定的數目,伺服器記載一個低記憶體警告訊息在紀錄檔中,並設定伺服器的狀態為”waring”。

    假使平均可用記憶體降低為你開啟伺服器之後緊接地記載的開始可用記憶體的5%,伺服器記載一個訊息在紀錄檔中。

  • 16

    16© 2003 BEA Systems, Inc.

    使用NodeManager作為WebLogic Server 8.1 Managed Server的自我健康診斷與開機管理

    Attribute Explaination

    Low Memory GCThreshold 輸入一個百分比作為weblogic server記載低記憶體警告並且改變健康狀態為”warning”的門檻值。記憶體門檻值預(Memory Threshold)設為5%,這意味著預設為在平均可用記憶體達到開機時最初可用記憶體的5%之後,伺服器記載低記憶體的警告。

    Low Memory Granularity Level 輸入一個百分比作為weblogic server記載低記憶體警告並且改變健康狀態為”warning”的門檻值。這個門檻值預設為5%,這意味著預設為在平均可用記憶體低於達兩個間隔以上的平均值的5%之後,伺服器記載低記憶體的警告。

    Low Memory Sample Size 輸入在一個固定週期之間的可用記憶體取樣次數,預設值為10次,愈高的取樣次數愈能增加讀取的準確度。

    Low Memory Time Interval 輸入間隔的時間,單位為秒,預設為3600秒。

    http://e-docs.bea.com/wls/docs81/perform/JVMTuning.html#1131009

  • 17

    17© 2003 BEA Systems, Inc.

    Customed ClassLoader and Application level class library (For Enterprise Application, ear)

    APP-INF/classesAPP-INF/lib

    Share?

    解決在模組與應用程式之間的Class參考關係。

    您的應用程式可以使用許多不同的Java classes, 包括Enterprise Bean, Servlet and JavaServer Page, utility classes 和third-party package。WebLogic Server部署應用程式在個別的classloader以保持獨立性並且幫助動態重新部署與解除部署。在某些狀況下,你可能需要包含一組的java classes在超過一個以上的應用程式或模組。這個地方講解如何使用WebLogic Server的多個classloader,所以你能夠成功地籌備你的應用程式。

    在這一版本的WebLogic Server,現在每一個資源配適器(resource adapater)使用它們自己的classloader去載入類別(與Web applications相似)。因此像Web applications和EJBs的模組被包裹成具有一個資源配適器的一個application archive(EAR 檔案),就沒有對資源配適器的可見度。假設這種可見度是必須的,您就必須擺放資源配適器的class在APP-INF/classes,或是將這些檔案歸檔後將他們放在APP-INF/lib下。

    請確定在您的WebLogic Server的system classpath中沒有資源配適器特定的class,假使你需要使用資源配適器特定的class (e.g. EJB或Web application),您必須將這些class跟這些相對應的模組歸檔(archive file)包裹在一起。

    包裝共用的utility classWebLogic Server提供位於EAR檔案的一個位置,您可以在此擺放共享的utility class。擺放utility jar files在

    APP-INF/lib的目錄,以及個別的class在APP-INF/classes的目錄,(請勿將jar file擺在/classes的目錄,也請勿將class擺放在/lib的目錄)。這些classes會被載入應用程式的root classloader。

    這個功能消除了必須擺放utility class在system classpath或是在擺放class在EJB jar file中(這樣就視標準的WebLogic Server classloader hierarchy而定),請注意使用這個功能有一些不同於使用MANIFEST.MF 中的Class-Path,使用APP-INF,class definition是整個應用程式所共享的。而MANIFEST.MF的Class-Path,在參考的模組的classpath是單純的擴展,意味著個別的副本存在於各個模組中。

  • 18

    18© 2003 BEA Systems, Inc.

    Customed ClassLoader and Application level class library (For Enterprise Application, ear)

    APP-INF/classesAPP-INF/lib

    META-INF/MANIFEST.MF

    Manifest-Version: 1.0 [CRLF]Class-Path: utility.jar [CRLF]

    Manifest Class-PathJ2EE的規格中提供了在MANIFEST Class-Path項目作為一個模組需要指明它需要一個輔助的jar檔或classes的手段。

    假設你需要額外的輔助性作為你EJB Jar或WAR 檔案的一部份,你只需要使用MANIFEST Class-Path的項目。在這種情況下,當你建立JAR或WAR檔案時,你必需包進一個MANIFEST,在其中的Class-Path元素中參照所需的jar檔。

    e.g.

    Manifest-Version: 1.0 [CRLF]Class-Path: utility.jar [CRLF] 在MANIFEST檔案的第一行,你總是必須包含Manifest-Version的屬性,隨後以一個換行符號(CR | LF |CRLF),然後是Class-Path的屬性。更多有關於MANIFEST的格式可以從以下網址得到。

    http://java.sun.com/j2se/1.4/docs/guide/jar/jar.html#JARhttp://java.sun.com/docs/books/tutorial/jar/basics/manifest.html

    MANIFEST Class-Path項目參照到的其他檔案相對於定義這些項目本身的檔案位置。

    e.g.

    //x.war//y.jarsThe manifest file itself should be located in the archive at META-INF/MANIFEST.MF.

  • 19

    19© 2003 BEA Systems, Inc.

    標準以及自訂的ClassLoader Hierarchy

    標準的Classloader階層無法解析sibling classloader的類別。Custom Module Classloader HierarchiesYou can create custom classloader hierarchies for an application allowing for better control over

    class visibility and reloadability. You achieve this by defining a classloader-structure element in the weblogic-application.xml deployment descriptor file.

    The following diagram illustrates how classloaders are organized by default for WebLogic applications. An application level classloader exists where all EJB classes are loaded. For each Web module, there is a separate child classloader for the classes of that module.

    For simplicity, JSP classloaders are not described in the following diagram.

    Figure Standard Classloader Hierarchy

    This hierarchy is optimal for most applications, because it allows call-by-reference semantics when you invoke EJBs. It also allows Web modules to be independently reloaded without affecting other modules. Further, it allows code running in one of the Web modules to load classes from any of the EJB modules. This is convenient, as it can prevent a Web module from including the interfaces for EJBs that is uses. Note that some of those benefits are not strictly J2EE-compliant.

    The ability to create custom module classloaders provides a mechanism to declare alternateclassloader organizations that allow the following:

    • Reloading individual EJB modules independently • Reloading groups of modules to be reloaded together • Reversing the parent child relationship between specific Web modules and EJB

    modules

    • Namespace separation between EJB modules

  • 20

    20© 2003 BEA Systems, Inc.

    標準以及自訂的ClassLoaderHierarchy

    Declaring the Classloader HierarchyYou can declare the classloader hierarchy in the WebLogic-specific application deployment

    descriptor weblogic-application.xml. For instructions on how to edit deployment descriptors, refer to the "WebLogic Builder Online Help."

    The DTD for this declaration is as follows:

    Listing 4-2 Declaring the Classloader Hierarchy

    The top-level element in weblogic-application.xml includes an optional classloader-structure element. If you do not specify this element, then the standard classloader is used. Also, if you do not include a particular module in the definition, it is assigned a classloader, as in the standard hierarchy. That is, EJB modules are associated with the application Root classloader, and Web application modules have their own classloaders.

    The classloader-structure element allows for the nesting of classloader-structure stanzas, so that you can describe an arbitrary hierarchy of classloaders. There is currently a limitation of three levels. The outermost entry indicates the application classloader. For any modules not listed, the standard hierarchy is assumed.

    Note: JSP classloaders are not included in this definition scheme. JSPs are always loaded into a classloader that is a child of the classloader associated with the Web module to which it belongs.

    For more information on the DTD elements, refer to Enterprise Application Deployment Descriptor Elements.

    The following is an example of a classloader declaration (defined in the classloader-structure element in weblogic-application.xml):

    Listing 4-3 Example Classloader Declaration

    ejb1.jar web3.war web1.war ejb3.jar web2.war web4.war ejb2.jar The organization of the nesting indicates the classloader hierarchy. The above stanza leads to a hierarchy shown in the following diagram.

  • 21

    21© 2003 BEA Systems, Inc.

    標準以及自訂的ClassLoaderHierarchy

    Classloader 階層現在僅限於3個層次。

    User-Defined Classloader Restrictions.Servlet Reloading DisabledNesting DepthModule TypesDuplicate EntriesInterfacesCall-by-Value SemanticsIn-Flight WorkDevelopment Use Only

  • 22

    22© 2003 BEA Systems, Inc.

    應用程式生命週期事件 (Application lifecycle events )

    針對在部署期間所發生的事務提供較佳的控制, extend抽象類別weblogic.j2ee.ApplicationLifeCycleListener

    這個類別提供方法去實現發生下列的事件時能夠作用InitializationPreparationActivationUpdate

    增進部署的效能和反饋快速的模組部署作業從weblogic.Deployer與管理介面得到部署作業額外的反饋由新的JMX Notification與filter類別(DeploymentNotification與DeploymentNotificationFilter)來提供反饋

    deployment/concepts.html#applifeeventsApplication Lifecycle EventsApplication lifecycle listener events provide handles on which developers can control behavior

    during deployment, undeployment, and redeployment. This section discusses how you can use the application lifecycle listener events.

    Four application lifecycle events are provided with WebLogic Server, which can be used to extend listener, shutdown, and startup classes. These include:

    • Listeners—attachable to any event. Possible methods for Listeners are: public voidpreStart(ApplicationLifecycleEvent evt) {}

    • The preStart event is the beginning of the prepare phase, or the start of the application deployment process.) public void postStart(ApplicationLifecycleEvent evt) {}

    • The postStart event is the end of the activate phase, or the end of the application deployment process. The application is deployed. public void preStop(ApplicationLifecycleEvent evt) {}

    • The preStop event is the beginning of the deactivate phase, or the start of the application removal or undeployment process. public void postStop(ApplicationLifecycleEvent evt) {}

    • The postStop event is end of the remove phase, or the end of the application removal orundeployment process.

    • Shutdown—attachable to preStop and postStop events. • Startup—attachable to preStart and postStart events. Note: For Startup and Shutdown classes, you only implement a main{} method. If you

    implement any of the methods provided for Listeners, they are ignored.

    Note: No remove{} method is provided in the ApplicationLifecycleListener, since the events are only fired at startup time during deployment (prestart and poststart) and shutdown duringundeployment (prestop and poststop).

    Registering Events in application.xmlIn order to use these events, you must register them in the application.xml deployment

    descriptor. See "Application Deployment Descriptor Elements."

  • 23

    23© 2003 BEA Systems, Inc.

    新的JDBC設定與管理功能

    JDBC assistant

    Advanced options

    Connection leak profiling

    Custom monitoring options

    Verbose management feature

    較佳的JDBC設定與管理監控

  • 24

    24© 2003 BEA Systems, Inc.

    新的JDBC設定與管理功能

    較佳的JDBC設定與管理監控

  • 25

    25© 2003 BEA Systems, Inc.

    訊息型錄

    訊息型錄是用來作為WebLogic Server國際化(i18n)與本地化(l10n)的一部份。

    訊息型錄基於瀏覽器喜好語言而包含不同的翻譯。

    訊息型錄可以從edocs.bea.com獲得HTML的文件

    可以用錯誤代碼來搜尋

    Mesaage ID

    訊息型錄

    訊息型錄是用來作為WebLogic Server國際化(i18n)與本地化(l10n)的一部份。

    訊息型錄基於瀏覽器喜好語言而包含不同的翻譯。

    訊息型錄可以從edocs.bea.com獲得HTML的文件

    可以用錯誤代碼來搜尋

    你可以延伸加以設定自己的訊息

    http://e-docs.bea.com/wls/docs81/i18n/MssgCats.html

  • 26

    26© 2003 BEA Systems, Inc.

    訊息型錄可以用錯誤代碼來搜尋

    訊息型錄

    訊息型錄是用來作為WebLogic Server國際化(i18n)與本地化(l10n)的一部份。

    訊息型錄基於瀏覽器喜好語言而包含不同的翻譯。

    訊息型錄可以從edocs.bea.com獲得HTML的文件

    可以用錯誤代碼來搜尋

    你可以延伸加以設定自己的訊息

    http://e-docs.bea.com/wls/docs81/i18n/MssgCats.html

  • 27

    27© 2003 BEA Systems, Inc.

    伺服器喜好策略

    對Java客戶端的負載平衡有新的喜好策略

    3種新的負載平衡機制

    減少客戶端與伺服器實例開啟IP Socket的數量

    策略可以適用於EJB或其他RMI物件以及JMS 客戶端。

    新的策略考量客戶端的既有伺服器端連線保持伺服器的喜好

    cluster/load_balancing.html#1035134cluster/load_balancing.html#1008605

    WebLogic Server 8.1 introduces three new load balancing algorithms for RMI objects that provide server affinity. Server affinity turns off load balancing for external client connections: instead, the client considers its existing connections to WebLogic server instances when choosing the server instance on which to access an object. If an object is configured for server affinity, the client-side stub attempts to choose a server instance to which it is already connected, and continues to use the same server instance for method calls. All stubs on that client attempt to use that server instance. If the server instance becomes unavailable, the stubs fail over, if possible, to a server instance to which the client is already connected.

    The purpose of server affinity is to minimize the number IP sockets opened between external Java clients and server instances in a cluster. WebLogic Server accomplishes this by causing method calls on objects to "stick" to an existing connection, instead of being load balanced among the available server instances. With server affinity algorithms, the less costly server-to-server connections are still load-balanced according to the configured load balancing algorithm—load balancing is disabled only for external client connections.

    Server affinity is used in combination with one of the standard load balancing methods: round-robin, weight-based, or random, providing a total of six alternatives for load balancing objects:

    • round-robin—round robin load balancing is used for both internal and external connections. • weight-based—weight-based load balancing is used for both internal and external connections. • random—random load balancing is used for both internal and external connections. • round-robin-affinity—server affinity governs connections between external Java clients and

    server instances; round robin load balancing is used for connections between server instances.

    • weight-based-affinity—server affinity governs connections between external Java clients and server instances; weight-based load balancing is used for connections between server instances.

    • random-affinity—server affinity governs connections between external Java clients and server instances; random load balancing is used for connections between server instances.

  • 28

    28© 2003 BEA Systems, Inc.

    新的Security功能JKS and Sun JCE

    新的Security功能

    JKS and Sun JCE

    以JKS (Java Key Store)作為憑證與金鑰的貯藏處

    WebLogic Server 8.1加進了Sun Java Cryptography Extension (JCE) 套件的支援

    JCE提供一個框架用來使用強固暗碼,金鑰產生,協議的加密與信息驗證的編碼演算法

  • 29

    29© 2003 BEA Systems, Inc.

    新的Web Application 功能針對JSP字串處理與JSP編譯時間的效能增進對於init方法的安全性原則weblogic.xml新的元素宣告一個原則名稱用以執行servlet的init 方法

    Servlet Filter 類別重載FileServlet File 排序選項HTTP 1.1 Byte-Range

    Web Application FeaturesWebLogic Server 8.1 includes the following new Web Application features and changes.

    Performance ImprovementsPerformance is improved for JSP string handling as well as JSP compilation time.

    Security Principle for init MethodUse the new init-as-principal-name element in weblogic.xml to declare a principle name for

    running a servlet's init method. See Developing Web Applications for WebLogic Server.

    Allow Access to WEB-INF on forward/includeYou can now call one servlet from inside another servlet. This is accomplished using either a

    forward or an include request from within the original servlet. Should you forward to a secondservlet, all future action takes place according to the second servlet, as with any forward. Including a second servlet allows you to gather data from a source already accessed by another servlet without having to rewrite all the code. See Dispatching Requests to Another Resource in Programming WebLogic HTTP Servlets.

    Integrated jspc Functionality into appcThe appc compiler now incorporates the functionality of jspc. You can use appc to compile and

    generate both EJBs and JSPs for deployment. See appc and jspc Compilers in Developing Web Applications for WebLogic Server.

    Class Reloading for Servlet FiltersWhen responding to a request for a servlet, WebLogic Server checks the time stamp of the

    servlet class file prior to applying any filters associated with the servlet, and compares it to the servlet instance in memory. If a newer version of the servlet class is found, WebLogic Server re-loads the servlet class before any filtering takes place. You can configure the interval at which WebLogic Server checks the timestamp using the Server Reload attribute. See Servlet Development Tips in Programing WebLogic HTTP Servlets.

    FileServlet File Sorting OptionsWebLogic Server introduces new weblogic.xml deployment descriptors to provide sorting options

    for directory listings. The new element, index-directory-sort-by has valid sorting styles of NAME, LAST_MODIFIED, and SIZE.

  • 30

    30© 2003 BEA Systems, Inc.

    新的 weblogic.Admin 功能

  • 31

    31© 2003 BEA Systems, Inc.

    新的 weblogic.Admin 功能

  • 32

    32© 2003 BEA Systems, Inc.

    使用jRockit作為WebLogic Server 8.1 Java Virtual Machine的優點專為伺服器所設計

    專為伺服器所設計,能夠對於thread與IO作最佳的控制

  • 33

    33© 2003 BEA Systems, Inc.

    使用jRockit作為WebLogic Server 8.1 Java Virtual Machine的優點Adaptive performance optimization and parallel garbage collector

    Concurrent garbage collection

    Parallel garbage collection

  • 34

    34© 2003 BEA Systems, Inc.

    Server Hangs 和Server Crash的處理

    Kill –3 jvm_pid (Unix)Ctrl + Break (Windows)

    JVM core_dump

    Unix: kill –3 jvm_pidWindows: Ctrl + Break

    根據thread dump 與JVM core dump判斷hang 或crash的原因由何種事件引起。

  • 35

    © 2003 BEA Systems, Inc.

    Thank You!

    光臨 ask.bea.com搜尋 BEA 所有軟體的訊息