??xml version="1.0" encoding="utf-8" standalone="yes"?>亚洲一区二区三区播放在线,亚洲国产精品激情在线观看 ,久久精品国产亚洲77777http://www.tkk7.com/jjshcc/category/46905.html桑巴葡语译工作室是q州市最专业葡萄牙语译机构-www.puyufanyi.com-Ƣ迎LJava,As400,Mainframe的猎头eric_cc#qq.ccom(?换成@)zh-cnMon, 09 Mar 2015 23:47:26 GMTMon, 09 Mar 2015 23:47:26 GMT60WAS(linux-64)部v异常Qno such provider: SunJSSEhttp://www.tkk7.com/jjshcc/archive/2015/03/08/423301.htmlEric_jiangEric_jiangSun, 08 Mar 2015 06:02:00 GMThttp://www.tkk7.com/jjshcc/archive/2015/03/08/423301.htmlhttp://www.tkk7.com/jjshcc/comments/423301.htmlhttp://www.tkk7.com/jjshcc/archive/2015/03/08/423301.html#Feedback0http://www.tkk7.com/jjshcc/comments/commentRss/423301.htmlhttp://www.tkk7.com/jjshcc/services/trackbacks/423301.html首先QWAS用IBM JSSEQ不支持Sun JSSEQ有文档说明?br style="word-wrap: break-word; margin: 0px; padding: 0px; word-break: break-all; list-style-type: none; line-height: normal;" />http://www-01.ibm.com/support/docview.wss?uid=swg21418924

然后Q你要检?nbsp;
1Q?WAS\java\jre\lib\security\java.security, 看看secrity provider list里是否有Sun JSSE

# List of providers and their preference orders (see above):
#
#security.provider.1=com.ibm.crypto.fips.provider.IBMJCEFIPS
security.provider.1=com.ibm.crypto.provider.IBMJCE
security.provider.2=com.ibm.jsse.IBMJSSEProvider
security.provider.3=com.ibm.jsse2.IBMJSSEProvider2
security.provider.4=com.ibm.security.jgss.IBMJGSSProvider
security.provider.5=com.ibm.security.cert.IBMCertPath
security.provider.6=com.ibm.crypto.pkcs11impl.provider.IBMPKCS11Impl
security.provider.7=com.ibm.security.cmskeystore.CMSProvider
security.provider.8=com.ibm.security.jgss.mech.spnego.IBMSPNEGO
security.provider.9=com.ibm.security.sasl.IBMSASL
security.provider.10=com.ibm.xml.crypto.IBMXMLCryptoProvider
security.provider.11=com.ibm.xml.enc.IBMXMLEncProvider
security.provider.12=org.apache.harmony.security.provider.PolicyProvider

2Q?c\径里是否有Sun JSSE 的jar?br style="word-wrap: break-word; margin: 0px; padding: 0px; word-break: break-all; list-style-type: none; line-height: normal;" />
3Q你的代码里是否有调用Sun JSSE provider

Eric_jiang 2015-03-08 14:02 发表评论
]]>
AIX q_上基?IBM JDK ?Java 应用内存泄漏分析http://www.tkk7.com/jjshcc/archive/2014/05/13/413619.htmlEric_jiangEric_jiangTue, 13 May 2014 11:08:00 GMThttp://www.tkk7.com/jjshcc/archive/2014/05/13/413619.htmlhttp://www.tkk7.com/jjshcc/comments/413619.htmlhttp://www.tkk7.com/jjshcc/archive/2014/05/13/413619.html#Feedback0http://www.tkk7.com/jjshcc/comments/commentRss/413619.htmlhttp://www.tkk7.com/jjshcc/services/trackbacks/413619.html阅读全文

Eric_jiang 2014-05-13 19:08 发表评论
]]>
如何打开websphere Portal6的日志跟t?/title><link>http://www.tkk7.com/jjshcc/archive/2014/05/13/413617.html</link><dc:creator>Eric_jiang</dc:creator><author>Eric_jiang</author><pubDate>Tue, 13 May 2014 11:03:00 GMT</pubDate><guid>http://www.tkk7.com/jjshcc/archive/2014/05/13/413617.html</guid><wfw:comment>http://www.tkk7.com/jjshcc/comments/413617.html</wfw:comment><comments>http://www.tkk7.com/jjshcc/archive/2014/05/13/413617.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.tkk7.com/jjshcc/comments/commentRss/413617.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/jjshcc/services/trackbacks/413617.html</trackback:ping><description><![CDATA[<div><div>q入</div><div>[install directory]/profiles/wp_profile/config/cells/[cell name]/nodes/[node name]/servers/server1/目录Q?/div><div>~辑server.xmlQ寻找startupTrace  Specification元素Q将其值改为:*=info:com.ibm.ws.webcontainer.*=all:com.ibm.wsspi.webcontainer.*=all:HTTPChannel=all:GenericBNF=all</div><div>重启WebsphereQ通过览器访问一下websphereQ然后到websphere的日志目录[install directory]/profiles/wp_profile/logs/server1下,可以看到跟t日志文件trace.log</div></div><img src ="http://www.tkk7.com/jjshcc/aggbug/413617.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/jjshcc/" target="_blank">Eric_jiang</a> 2014-05-13 19:03 <a href="http://www.tkk7.com/jjshcc/archive/2014/05/13/413617.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>权威支持: 选择正确?WebSphere 诊断工具http://www.tkk7.com/jjshcc/archive/2014/05/13/413615.htmlEric_jiangEric_jiangTue, 13 May 2014 10:48:00 GMThttp://www.tkk7.com/jjshcc/archive/2014/05/13/413615.htmlhttp://www.tkk7.com/jjshcc/comments/413615.htmlhttp://www.tkk7.com/jjshcc/archive/2014/05/13/413615.html#Feedback0http://www.tkk7.com/jjshcc/comments/commentRss/413615.htmlhttp://www.tkk7.com/jjshcc/services/trackbacks/413615.html

在每个专栏中Q支持权威将讨论 IBM Technical Support 的可用于 WebSphere 产品的资源、工具和其他元素Q以及一些可以进一步增强您?IBM 支持体验的技术和新思想?/em>

最新快?/h2>

按照惯例Q我们将首先提供关于整个 WebSphere® C֌的一些重要新闻:

  • IBM Support Assistant ?4.0.1 ? 刚刚发布。部分主要增强功能包括代理服务器的自动配|、改q的DQ以及一个重要的新工PMedia ViewerQ此工具使得从诸?IBM Education Assistant {来源下载丰富的内容q在 IBM Support Assistant 中在U或ȝ查看该内容变得非常容易?/li>
  • IBM Support Assistant Version 4 中发布或更新?a cmimpressionsent="1">几个新工?/a>Q包括:
    • Assist On Site
    • IBM Thread and Monitor Dump Analyzer
    • IBM Monitoring and Diagnostic Tools for Java™ - Dump Analyzer 的新版本
    • ?Memory Dump Diagnostic for Java (MDD4J) 的新更新Q此更新仍处于测试版本阶D,但是我们正在向公开发布版迈q?/li>
    • Visual Configuration Explorer (VCE) 的新更新?/li>

    通过q些更新Q要?IBM Support Assistant Version 3 UL?Version 4 的所有问题确定工具都已完成了转换?/p>

  • IBM Guided Activity Assistant 团队l箋扩展此工h提供的内容:
  • q发布了?alphaWorks 中的几个工具的更斎ͼ包括Q?
  • 对于感兴的读者,WebSphere Application Server V7.0 公开试计划正在全力q行中?a cmimpressionsent="1">讉K此站?/a>以了解有关下一个版本的 WebSphere Application Server 的新d信息?/li>
  • 我们在以前的几篇文章中推荐过?WebSphere Support Technical Exchange pd正在Ҏ?#8220;Open Mic”形式q行试验Q在q种形式中,某个特定技术领域的公认专家接受问题ƈL与受众进行的讨论Q而不是主要集中于已准备好的演C文Eѝ这U新形式的第一期暂定于 8 ?7 日进行,届时q将有关?WebSphere Application Server 安全性的研讨会。请回访 WebSphere Support Technical Exchange |站以了解更新和更多的研讨会?/li>
  • 我们以前曑֜本专栏中提到q?strong>知识集锦Q在 IBM Support |站上创建相x档的集合Q和特色文档Q收集用于每个单?IBM 产品中的支持的最常见信息Q。将q两个概늛l合Q?a cmimpressionsent="1">现在可以使用新的知识集锦Q从而得完全在单个位置查找许多 WebSphere 产品的所有可用特色文档页面变得非常容易?/li>
  • 本专栏的热心读者可能对U皮?Running IBM WebSphere Application Server on System p and AIX Optimization and Best Practices 非常感兴,该红皮书目前以公p案的形式提供?/li>

l箋x与支持相关的各个|站以及本专栏,以获得有x们所到的其他工L新闻?/p>

接下来让我们l箋今天的主?#8230;…


回页?/a>

“再多一个工hp叫?#8221;

我们在与 WebSphere 产品用户q行有关问题定的交谈时Q遇到的一个常见问题是“我现在应该用哪个工P”本专栏自从开始以来,已描qC如何以及何时使用许多问题定工具Q但是如果像q样一ơ一个地介绍工具Q跟t每个可用的工具会充满了挑战,要确定哪个工h适合于Q何给定的情Ş更不用说了。由于更q大? IBM WebSphere Support C֌是相当动态的工具开发h员社一事实Q问题变得进一步复杂化Q这意味着可用的工具集始终变化不定Q针对相似的问题Q某一天用的最佛_具可能在几个月后已经不一样了?/p>

我们的希望在于,本文ؓ您阐明某些目前可用的主要问题定工具。您在下面扑ֈ单的参考表|其中在单个地ҎCZ您在?WebSphere Support 合作时可能遇到的最常见问题定工具Q特别是有关 IBM WebSphere Application Server ?Java 虚拟机(Java Virtual MachineQJVMQ的工具。这些表格ƈ不详,所提供的信息在性质上是不完的——因ؓ在本文发表之后,工具l发展改q,q且不同的h以不同的方式评价各个工兗然而,不管您最l用的工具是什么,此信息都可作为有价值的初始参考点。如果您y发现q种Ҏ很成功,请告诉我们,以便我们能够Z后的专栏计划定期的更新?/p>


回页?/a>

我们选择的工?/h2>

在接触到具体的表g前,查一下我们在l合q些信息时用的指导原则是有帮助的:

下面几个部分中的工具表格按照它们所用于的构件进行组l:

每个表格后面是每个工兯q文档中对每个工具的描qͼ以及每个工具的一般特征的大致l分?/p>


回页?/a>

用于 JVM 生成的信息的工具

此类构g包括Q?/p>

  • Verbose Garbage Collection (verboseGC) 日志也许是最常见?JVM 诊断cd。它昄了整?JVM 生存期间Q各个垃圑֛收周期的序。它作ؓ定问题时的一初始的辅助工具Q常常具有不可估量的价|用于和诊断反常的内存分配问题,例如内存泄漏、碎片,以及? GC 有关的性能问题{等?/p>

  • U程转储也是一U极为常见的 JVM 诊断cd。线E{储(也称?javacoreQ可以根据管理员的请求触发,或者在 JVM 中遇到某U特D情冉|自动触发。线E{储是一个文本文Ӟ其中包含 JVM 状态的关键斚w的一个相对较短的快照。该快照最常用的部分是 JVM 中当前活动线E的列表Q线E{储也因此而得名。线E{储最常见的用途是诊断 JVM 中出现挂赗变慢、崩溃或 CPU 占用率过高的原因?

  • 堆{?/strong>是也可由 JVM 生成的另一UŞ式的转储Q可以按需生成Q也可以在满特D条件时自动生成。通常Q堆转储通常是一个非常大的文Ӟ其中包含当前 JVM 堆中所有对象的一个列表。它用于在出现内存不的情况下执行深入分析?/p>

  • pȝ堆或核心?/strong>是开销最大的堆,但也是最完整的堆。它是一个巨大的二进制文Ӟ反映?JVM q程的全部内容:每一? Java 对象及其字段、每一个线E、每个内存区域,{等。系l{储的最初用途是在其他类型的转储不或无法生成时Q帮助诊断崩溃、挂h复杂的内存分配问题。不q,׃pȝ转储非常完整Q它也能用来获取有关 WebSphere Application Server q行时当前状态的多方面信息,甚至有关在该q行时中执行的应用程序的信息?

q里的有些构件的名称和类型特定于 IBM JDKQ其他供应商?JDK 可能产生怼的文件。有兌些类型的构g的进一步详l信息,请参?#8220;权威支持”专栏用于实际故障诊断的功能和工具?/p>

?1. 用于 JVM 生成的信息的工具
构gcd 问题cd 典型输入 可用的工?/th>
Verbose Garbage Collection 日志 (verbosegGC)
  • 内存泄漏
  • 内存不情况
  • 诸如 native_stdout.log {?JVM 日志文g中的 verbosegc 语句
  1. IBM Monitoring and Diagnostic Tools for Java - Garbage Collection and Memory Visualizer (GCMV)
  2. IBM Pattern Modeling and Analysis Tool for Java Garbage Collector (PMAT)
  3. Diagnostic Tool for Java Garbage Collector
Java 转储/javacore
  • 崩溃、挂赗性能瓉、JVM 意外l止
  • javacore.*.txt
  • javacorePID.*.txt
  1. IBM Thread and Monitor Dump Analyzer (TMDA)
  2. Thread Analyzer
U程
  • 锁分?/li>
  • 到运行的 JVM 的连?/li>
  1. IBM Lock Analyzer for Java
堆{?/td>
  • 内存泄漏
  • 内存不情况
  • IBM 可移植堆转储 (heapdump.phd)
  • IBM 文本堆{?(heapdump.txt)
  • HPROF 堆{储格?(hprof.txt)
  1. Memory Dump Diagnostic For Java (MDD4J)
  2. HeapAnalyzer
  3. Heaproots
pȝ或核心{?/td>
  • pȝ状况的一般分析;异常;pȝ状态的深入分析?/li>
  • Ҏ情况Q意外崩溃?/li>
  • 文g名:与操作系l相养ICZ包括 core.dmp、user.dmp 或者只?#8220;core”Q?/li>
  • 在将该文件用作分析的输入之前Q必M?jextract 工具处理该文Ӟ从而?core.dmp.zip 文gQIBM JVM 5.0 及更高版本)?core.sdff 文g (IBM JVM 1.4.2)?/li>
  • 注意Q仅适用?IBM JVM?/li>
  1. IBM Monitoring and Diagnostic Tools for Java - Dump Analyzer 及其?WebSphere Application Server modules for Dump Analyzer 中的扩展

工具描述

用于 VerboseGC 分析Q?/p>

  1. IBM Monitoring and Diagnostic Tools for Java - Garbage Collection and Memory Visualizer (GCMV)
    一个详l的 GC 数据可视化器Q用于分析ƈl制所?IBM 详细 GC 日志——Xtgc 输出Qƈ且可扩展到分析和l制其他形式的输入)。它提供了广泛的详细 GC 数据值的囑Ş昄Qƈ处理 optthruput、optavgpause ?gencon GC 模式。它h原始日志、表格式数据和图表视图,q且可以数据保存到 jpeg ?.csv 文gQ用于导出到电子表格Q?/p>

    请参?IBM Support Assistant 中的完整描述?
    输入Qverbosegc 日志
    输出Q图形表CŞ式、html、jpeg ?csv 文g
    支持Q此工具?IBM 提供支持Q目前是用于其所在领域的主要工具?/p>

  2. IBM Pattern Modeling and Analysis Tool (PMAT) for Java Garbage Collector
    分析 IBM 详细 GC 跟踪Q分?Java 堆用情况,q基?Java 堆用情늚模式建模提供重要配置。此工具先于上面?IBM Monitoring and Diagnostic Tools for Java - Garbage Collection and Memory Visualizer (1)Qƈ提供了一个可能相当有用的不同透视图?/p>

    请参?IBM Support Assistant ?alphaWorks 中的完整描述?
    输入Qverbosegc 日志
    输出Qverbosegc 日志的图形或表格表示形式
    其他功能Q关?JVM 参数的一般徏?
    支持Q技术预览版Q按原样提供?/p>

  3. Diagnostic Tool for Java Garbage Collector
    通过d详细垃圾回收的输出,q生文本和囑Ş可视化表CŞ式及相关l计信息Q从而帮助检查运行在 JVM 下的应用E序的垃圑֛收特征?

    请参?alphaWorks 中的完整描述?
    输入Qverbosegc
    输出Q文本和囑Ş可视化表CŞ?
    支持Q按原样提供的工兗?/p>

用于 Java 转储/javacoreQ?/p>

  1. IBM Thread and Monitor Dump Analyzer (TMDA)
    分析一个或多个 Java U程转储?javacoreQƈ诊断监视器锁和线E活动,以便定挂v、死锁和资源争用或监视器瓉的根源?/p>

    请参?IBM Support Assistant ?alphaWorks 中的完整描述?
    输入Q用于显C相关线E历史记录的单个或多?javacore
    输出Q基?GUI 的视?
    其他信息Q关?Analysis of hangs, deadlocks, and resource contention or monitor bottlenecks using IBM Thread and Monitor Dump Analyzer for Java Technology 的网l广?
    支持Q技术预览版Q按原样提供Q但是是该领域的主要工具?/p>

  2. ThreadAnalyzer
    提供 Java U程转储?javacore 的分析,例如来自 WebSphere Application Server 的{储或 javacore。可以在不同的别分析线E用情况,从高U图形视囑ּ始,然后深入到各个线E的详细记录。如果线E{储中存在M死锁QThreadAnalyzer 检ƈ报告它们。此工具先于上面?IBM Thread and Monitor Dump Analyzer 工具 (4)Q但是其功能已集成到后者之中,后者正在成领域的主要工兗?

    请参?IBM Support Assistant 中的完整描述?
    输入QJava U程转储/javacore
    输出Q线E的囑Ş视图、加载多个线E{储以昄U程历史记录的能?
    支持Q技术预览版Q按原样提供Q但是是该领域的主要工具。此工具可能会逐步淘汰Q请可能?IBM Thread and Monitor Dump Analyzer?/p>

用于U程Q?/p>

  1. IBM Lock Analyzer for Java
    旨在对动态应用程序执行锁分析Q以便突出具有可能媄响性能的锁争用的线E。此工具׃个包l成Q?

    • W一个包与^台相养Iq提供到 JVM 的连接,以便攉有关正在q行的应用程序的锁统计信息。这个包在运行时随同要监视的应用E序一赯行加载?
    • W二个包与^台无养Iq提供了囑Ş用户界面?

    该图形用L面连接到q_包,q提供所需的控制和分析以确定性能p糕的锁?/p>

    请参?alphaWorks 中的完整描述?
    输入Q从 JVM 攉的统计信?
    输出Q锁的图形视?
    支持Q按原样提供的工兗?/p>

用于堆{储:

  1. Memory Dump Diagnostic for Java (MDD4J)
    分析正在q行 WebSphere Application Server 或Q何其他独?Java 应用E序?JVM 中常见格式的内存转储Q堆转储Q。内存{储分析旨在确?Java 堆中可能是内存泄露根源的数据l构。该分析q确定应用程序的 Java 堆占用空间的主要肇事者和它们的所属关pR此工具能够分析从遇? OutOfMemoryError 问题的生产环境应用程序服务器中获得的非常大的内存转储Q将需?2 GB 或更多的 RAMQ。MDD4J 扩展了下面较旧的 IBM HeapAnalyzer (8) 的功能,管两个工具的用L面完全不同?/p>

    请参?IBM Support Assistant 中的完整描述?
    输入Q来自虚拟机 (JVM) 的内存{储(堆{储)
    输出Q交互式报告Q其中显CZ要的内存泄露可疑之处Q以及有兌些泄露的详细信息?
    其他功能Q操作单个{储。有些版本提供了多个转储的比较分析?
    支持Q此工具?IBM 提供支持Q目前是用于其所在领域的主要工具。在本文~写之际QIBM Support Assistant 中的最新版本ؓ Beta 版?/p>

  2. HeapAnalyzer
    HeapAnalyzer d单个 Java 内存转储Q堆转储Q,q您能够浏览{储以查看其内宏V此工具是上面的 Memory Dump Diagnostic for Java (MDD4J) 工具(7) 的前w,后者现在包含前者的大多数功能。当ӞHeapAnalyzer 中的原始树浏览功能比?MDD4J 中更加灵zR另一斚wQHeapAnalyzer ~Z MDD4J 中的某些更完善的泄露嫌疑算法,q且不支持多个{储的比较分析?/p>

    请参?alphaWorks 中的完整描述?
    输入Q单?java 堆{?
    输出Q可疑对象的囑Ş视图和堆览?
    支持Q按原样提供的工兗?/p>

  3. HeapRoots
    HeapRoots d Java 堆{储文件ƈ提供用于分析数据的命令。这些命令对数据q行法Q或查询有关该数据的信息。HeapRoots 提供了命令行交互式界面,您可以在其中输入命oq获取结果?

    请参?alphaWorks 中的完整描述?
    输入Q堆转储文g
    输出Q可疑对象的囑Ş视图和堆览?
    支持Q按原样提供的工兗?/p>

用于pȝ/核心转储Q?/p>

  1. IBM Monitoring and Diagnostic Tools for Java - Dump Analyzer
    一个可扩展的工hӞ它读?IBM JVM 产生的系l{储或核心文gQƈ针对该{储运行各U各L分析模块以诊断常见问题,或提供有兌 JVM 和当前运行在?JVM 中的M中间件或应用E序的内部状态的深入信息。目前,提供了用于对诸如死锁、挂赗崩溃、内存情늭常见 JVM 问题执行基本分析功能的模块。作为对该基本工L补充QWebSphere Applicationi Server Modules for Dump Analyzer 提供了附加的模块Q可昄 JVM 中的 WebSphere Application Server q行时的一般状态,以及有关多个 WebSphere Application Server 子系l的详细信息?/p>

    请参?IBM Support Assistant 中的完整描述?
    输入Q由 JVM 附带?jextract 工具q行预处理的格式化系l{?
    输出Q显CZ个报告,其中包含由指定的分析模块提取的信息,q包含有x在问题的观察l果的简短摘要,以及一个提供深入信息的详细信息部分?
    其他功能Q提供交互式模式以手动检查{储的内容。得用戯够编写自q新的专门分析模块q将模块d到该工具?
    支持Q此工具?IBM 提供支持Q目前是用于其所在领域的主要工具?/p>


回页?/a>

用于日志和跟t文件的工具

用于q些cd的构件的zd包括Q?/p>

  • 日志记录通常用于在日志文件中记录您希望跟t的重要事g。日志记录用于指C:

    • 重要的状态更改;例如Q当某个服务启动或停止的时候?/li>
    • 警告Q例如,当您正在写入的磁盘空间不的时候?/li>
    • 错误Q例如,当您的代码由于预期的服务不可用而不再能够l执行的时候?

    日志记录通常是始l启用的Q因此日志记录代码必MU相当小Q这通常是您应该注意的重要事V?

  • 跟踪通常用于记录在调试代码问题时可能有用的Q何信息。跟t通常用于指示调用了哪些方法、向Ҏ传入了哪些数据(或从Ҏq回了什么|以及对代码边界之外的其他Ҏ的调用返回了什么数据。跟t事件体U可能比较大Q因此只有在诊断问题时启用。由于跟t事件的内容极ؓ详细Q而且是技术信息,因此l常只对~写应用E序的h有h倹{打开跟踪的情况下Q应该能够了解在代码中可能出现的M问题?

?2. 用于日志和跟t文件的工具
构gcd 问题cd 典型输入 可用的工?/th>
来自多个产品的日志文?/td>
  • 一般日志分析:扫描一个或多个日志文gQ以查找初始症状和常见问题;参照症状目录q行一般分析?/li>
  • 需要在多个日志文g之间兌信息的复杂问题?/li>
  • 来自 IBMQ包?WebSphere、Information Management、Rational® ? TivoliQ和其他软g供应商的q泛日志文g?/li>
  • 对特定于操作pȝ的日志文件的支持QAIX®、z/OS®、RedHat、Sun™Q。对W三Ҏ志的支持Q包? Oracle、Apache、Microsoft® SQL Server、SAP、Siebel {等Q?/li>
  • CZ包括Q来? WebSphereQ:Activity.log、SystemOut.log、SystemErr.log、http_plugin.log?/li>
  1. Log Analyzer
WebSphere 跟踪Q一般)
  • WebSphere 跟踪的一般分析,用于q泛的深层问题?/li>
  • trace.log
  1. Trace Analyzer for WebSphere Application Server
WebSphere Application Server 跟踪?HTTP 插g跟踪
  • 定pȝ响应斚w的gq?/li>
  • http_plugin.log、trace.log
  1. IBM Trace and Request Analyzer for WebSphere Application Server
WebSphere Application Server 跟踪Q连接工P
  • 定q接池管理中的问题(泄露Q?/li>
  • trace.log
  1. Database Connection Pool Analyzer for IBM WebSphere Application Server
JVM verboseGC 跟踪
  • 内存泄漏
  • 内存不情况
  • native_stdout.log
  1. IBM Monitoring and Diagnostic Tools for Java - Garbage Collection and Memory Visualizer (GCMV)
  2. IBM Pattern Modeling and Analysis Tool for Java Garbage Collector (PMAT)
  3. Diagnostic Tool for Java Garbage Collector

工具描述

  1. Log AnalyzerQ以及相关的 Symptom EditorQ?/strong>
    一个图形用L面,提供用于览、分析和兌多个产品产生的日志的单个联络炏V此工具是更q泛?IBM 自主计算zd的一部分?/p>

    请参?IBM Support Assistant 中的完整描述?
    输入Q来?IBM 和其他供应商推出的许多Y件品的多个日志文g
    输出Q基?GUI 的视囑֒日志文g兌
    其他功能Q能够保存配|以帮助其他支持工程师进行进一步的分析。提供了配套?Symptom Editor 工具来创建您自己的症状数据库?
    支持Q目前是其所在领域的主要工具?/p>

  2. Trace Analyzer for WebSphere Application Server
    一个高度交互式的实用工P使您能够详细览、检查和搜烦 WebSphere Application Server 中的复杂跟踪文g?/p>

    请参?alphaWorks 中的完整描述?
    输入QWebSphere Application Server trace.logQ如果启用了高日志记录Q则q支持更多的输入
    输出Q功能强大的囑Ş视图Q带{选器和搜索视?
    其他功能Q能够保存配|以帮助其他支持工程师进行进一步的分析
    支持Q按原样提供Q但目前是其所在领域的主要工具?/p>

  3. IBM Trace and Request Analyzer for WebSphere Application Server
    帮助查找非正常gq、系l运行缓慢或pȝ表现为挂L后又恢复的情늚Ҏ。此工具?WebSphere Application Server ?HTTP 插g中的跟踪文gQ通过q些文g定各个hQƈ扑և特定操作需要花长时间完成的区域Q从而帮助您查跟t中的可疑区域,以确定是否存在问题。用h时将此工具与上面? Trace Analyzer for WebSphere Application Server (12) 搞؜淆,但事实上它们是完全不同的。此工具严格地集中于可能自动地扑և性能问题和gq,?Trace Analyzer 是通用工具Q主要用于手动检查跟t?/p>

    请参?alphaWorks 中的完整描述?
    输入QHTTP 服务器日?(http_plugin.log) ?WebSphere Application Server 跟踪日志 (trace.log)
    输出Q表格分析视?
    支持Q按原样提供Q但目前是其所在领域的主要工具?/p>

  4. Database Connection Pool Analyzer for IBM WebSphere Application Server
    采用启发式分析引擎来帮助您解决与 Java Database Connectivity (JDBC) q接池相关的问题Qƈ诊断 JDBC q接泄露。此工具分析 JDBC q接池管理器跟踪Qƈ提供以下功能Q?/p>

    • JDBC 数据源分析?/li>
    • JDBC q接池配|分析?/li>
    • JDBC q接图表视图?/li>
    • getConnection Ҏ?Java 堆栈跟踪视图?/li>

    有关使用此工具分析连接池问题所需要的 WebSphere Application Server 跟踪讄Q请参阅 MustGather 信息?/p>

    请参?alphaWorks 中的完整描述?
    输入QJDBC 跟踪日志
    输出Q日志的表格和图形分?
    支持Q按原样提供Q但目前是该领域的主要工兗?/p>


回页?/a>

用于静态配|文件和相关信息的工?/h2>

?3. 与静态配|相关的文g
构gcd 问题cd 典型输入 可用的工?/th>
来自多个产品的配|文?/td>
  • 一般配|问?/li>
  • 许多 IBM 产品中的各种配置文gQ通常?*.xmlQ,包括 WebSphere Application Server、WebSphere MQ, DB2® UDB、Tivoli Directory Server {等?/li>
  • 有时这些文件收集到一个称?VCE 可移植收集器 JAR 的文件中?/li>
  1. Visual Configuration Explorer
WebSphere Application Server http 插g配置文g
  • http 插g问题Q请求无响应、负载^衡不正确{等Q?/li>
  • Plugin-cfg.xml、http_plugin.log
  1. IBM Web Server Plug-in Analyzer for WebSphere Application Server
WebSphere Application Server 配置Q从q行时中dQ无直接可见的文Ӟ
  • WebSphere Application Server 中的配置错误?/li>
  • 在管理控制台中,选择 Troubleshooting => Configuration Validation?/li>
  1. WebSphere Application Server 理控制C?Configuration Validator
WebSphere Application Server cd载器配置Q从q行时中dQ无直接可见的文Ӟ
  • cd载问题:cL扑ֈ、加载的cM正确Q等{?/li>
  • 在管理控制台中,选择 Troubleshooting => Class loader viewer?
  1. WebSphere Application Server 理控制C?Classloader Viewer
WebSphere 产品安装
  • 被破坏的安装
  • 直接从Y件安装中d输入。还使用“sys.inv”文gQ其中包含该安装的以前快照?
  1. WebSphere Install Verification Utility (IVU / (installver)
多个产品配置和运行时|络状?/td>
  • 端口冲突
  • d产品配置文g和运行时|络状态?/li>
  1. IBM Port Scanning Tool

工具描述

  1. Visual Configuration Explorer (VCE)
    提供一U可视化、探索和分析不同来源的配|信息的ҎQ例?WebSphere Application Server、WebSphere MQ ?DB2。此工具允许您:

    • 比较相同q行时环境的不同快照?/li>
    • 创徏图表Q采用图形格式显C配|信息,包括配置元素之间的主要关pR?/li>
    • 讉K详细的配|属性?/li>
    • 在配|内和跨配置搜烦属性?/li>
    • 比较配置?/li>
    • 在不同的产品的配|信息之间徏立联pR?/li>
    • 保存和恢复工作?
    • 在问题确定工作中与其他hq行协作?/li>
    • 在独立环境或客户?服务器环境中工作?/li>

    请参?IBM Support Assistant 中的完整描述?
    输入Q从 VCE 附带?VCE q程攉器工具中产生?JAR 文g
    输出Q配|的囑Ş描述。配|的差异报告Q保存ؓ XML 格式Q?
    其他功能Q能够保存配|,以帮助其他支持工E师q行q一步的分析。提供了配套?Symptom Editor 工具来创建您自己的症状数据库?
    支持Q技术预览版Q但它是其所在领域的主要工具?/p>

  2. IBM Web Server Plug-in Analyzer for WebSphere Application Server
    帮助发现?WebSphere Application Server ?HTTP 插glg相关的潜在问题。此工具同时分析插g配置和对应的跟踪文gQ然后应用模式识别算法,以便向用户发出有兛_能的不一致性的警报。此工具提供配置和跟t文件中? HTTP q回代码列表、URI 和可用集的囑Ş表示形式Q以及服务器拓扑?/p>

    请参?alphaWorks 中的完整描述?
    输入QWebSphere 插g日志文g (http_plugin.log) ?WebSphere Application Server 跟踪文g (trace.log)?
    输出Q显C? plugin-cfg.xml 文g?trace.log 分析中的集群和成员拓扑的可视映射?
    支持Q按原样提供Q但目前是其所在领域中的主要工兗?/p>

  3. Configuration Validator
    此工h WebSphere 理控制台的一部分Q它帮助定和查? WebSphere Application Server 中的当前配置中存在的问题?/p>

    请参?WebSphere Application Server 信息中心的完整描q?
    输入Q操? WebSphere Application Server 的某个运行实例,可通过理控制台进行访问?
    输出Q配|问题的表格视图Q单独的错误、警告选项Q管理控制台中可用的信息Q?
    支持Q包括ؓ WebSphere Application Server 的一部分Q服从与M品相同的支持程?/p>

  4. Classloader Viewer
    提供 WebSphere Application Server 的某个实例中当前zd的所有类加蝲器和它们已加载的所有类的详l清单。这可以帮助诊断一pd与类加蝲相关的问题,例如未能加蝲所需的类、加载了某个cȝ意外版本、多个类之间的可见性问题,{等?/p>

    请参?WebSphere Application Server 信息中心的完整描q?
    输入Q操? WebSphere Application Server 的某个运行实例,可通过理控制台进行访问?
    输出QWebSphere Application Server 理控制C的树形细分视图;可保存到文g以便以后分析?
    支持Q包括ؓ WebSphere Application Server 的一部分Q服从与M品相同的支持程?/p>

  5. Install Verification Utility (IVU)
    作ؓ一个在 WebSphere Application Server 中可用的名ؓ“installver”的程序来交付Q此E序Ҏ成当?WebSphere Application Server 安装的文件执行校验和Qƈ校验和?WebSphere Application Server 附带或在该工具以前的执行q程中生成的参考文件做比较。此工具帮助被破坏的安装,例如Q可能安装了修改或修补程序然后却遗忘了?/p>

    请参?WebSphere Application Server 信息中心的完整描q?
    输入QWebSphere Application Server 文gQ?verifyinstallver.bat ?.sh q行该工兗?
    输出Q指C成功的文g查的消息?
    支持Q包括ؓ WebSphere Application Server 的一部分Q服从与M品相同的支持程?/p>

  6. IBM Port Scanning Tool
    在品的安装、配|或Ȁz过E中扫描可用的端口,以帮助防止端口冲H?/p>

    请参?IBM Support Assistant 中的完整描述?
    输入Q要查的端口可?
    输出Q列ZQ何正在用的端口和Q何可能的冲突的报?
    支持Q技术预览版Q但目前是其所在领域的主要工具?/p>


回页?/a>

ȝ

我们对用?WebSphere 产品的一些最帔R到的问题定工具的概q到此就l束了,q提供了一些帮助您定何时最适合使用每个工具的信息。但愿此信息帮助您q速和可能高效地启动问题解决d。请CQIBM 提供的工具集在不断地发展和增加,因此务必定期查有x个工L最C息,q从问题定工作的前沿返回到本专栏以了解更多新闻?/p>

Eric_jiang 2014-05-13 18:48 发表评论
]]>WAS6.1 cd载问?http://www.tkk7.com/jjshcc/archive/2014/03/04/410577.htmlEric_jiangEric_jiangTue, 04 Mar 2014 03:10:00 GMThttp://www.tkk7.com/jjshcc/archive/2014/03/04/410577.htmlhttp://www.tkk7.com/jjshcc/comments/410577.htmlhttp://www.tkk7.com/jjshcc/archive/2014/03/04/410577.html#Feedback0http://www.tkk7.com/jjshcc/comments/commentRss/410577.htmlhttp://www.tkk7.com/jjshcc/services/trackbacks/410577.html

如果仍然使用~省的类加蝲{略:PARENT_FIRST,  ׃BSF自n加蝲c,D使用org.eclipse.osgi.framework.internal.core.BundleLoader装蝲器来装蝲Q在q个装蝲器别,g发现不了JavaScriptEnginec,实际上JavaScriptEngine和BSFManager同在一个包中?/p>

一个可行的解决Ҏ是,该baf.jar(JavaScriptEnginecL在jar?拯到jre/lib/ext目录下,则org.eclipse.osgi.framework.internal.core.BundleLoaderc装载器一定能扑ֈQ因JDK加蝲序在org.eclipse.osgi.framework.internal.core.BundleLoader之先?/p>

然而,pȝ理员处于安全的考虑Q不同意在jre下放|bsf.jar包。看来只得另M法。通过阅读下面的文章,理解WAS6.1的加载方式,可知创徏应用E序׃n库可以解册一问题。参考:在应用程序服务器U别使用׃n?/strong>。注意:在应用程序别用共享库q不能解册个问题,如果该类没有使用自己的ClassLoader则应可行?/p>

详细操作步骤Q?/p>

1、打开WAS6.1控制収ͼ创徏׃n?/p>



2、在应用E序服务器别用共享库


新徏c装载器Q注意,q里?nbsp;cd装入且是先用应用程序装载器 选项

保存

c装载器创徏完成

新徏׃n库的引用

选择已经配置好的׃n?br />

q是配置完的样子





以下为参考文?br />

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

 

理解WAS 6.1的类加蝲Q?Q?/h2>

2008-12-3

  12Q?Q?步骤2Q添加一个EJB模块和工具JAR

  下面Q往应用E序中添加一个EJBQ它也依赖VersionChecker JAR文g。在此,在EAR的根目录d一个VersionCheckerV2.jar文g。在q个JAR文g中的VersionCheckerc返回了Version 2.0。ؓ了保证扩展类加蝲中的工具JAR可用Q在EJB模块的manifest文g中添加一个引用,如例12-8Q?/p>

  ?2-8更新EJB模块的MANIFEST.MF文g

  Manifest-Version: 1.0

  Class-Path: VersionCheckerV2.jar

  现在的结果是Q有一个Web模块Q在它的WEB-INF/classes目录下面有一个servletQ在WEB-INF/lib目录下面有VersionCheckerV1.jar文g。还有一个EJB模块引用了EAR根目录下面的VersionCheckerV2.jar工具JAR。你期望Web模块装入VersionCheckercL件的版本是什么?是WEB-INF/lib下的Version 1.0q是工具JAR下面的Version 2.0Q测试结果如?2-9Q?/p>

  ?2-9cd载例2

  VersionChecker called from Servlet

  VersionChecker is v2.0.

  Loaded bycom.ibm.ws.classloader.CompoundClassLoader@26282628

Local ClassPath:

  C:\WebSphere\AppServer\profiles\AppSrv02\installedApps\kcgg1d8Node02Cel

l\ClassloaderExample.ear\ClassloaderExampleEJB.jar;C:\WebSphere\AppServ

er\profiles\AppSrv02\installedApps\kcgg1d8Node02Cell\ClassloaderExample

.ear\VersionCheckerV2.jar

Delegation Mode: PARENT_FIRST

VersionChecker called from EJB

VersionChecker is v2.0.

Loaded bycom.ibm.ws.classloader.CompoundClassLoader@26282628

  Local ClassPath:

  C:\WebSphere\AppServer\profiles\AppSrv02\installedApps\kcgg1d8Node02Cel l\ClassloaderExample.ear\ClassloaderExampleEJB.jar;C:\WebSphere\AppServ

er\profiles\AppSrv02\installedApps\kcgg1d8Node02Cell\ClassloaderExample

.ear\VersionCheckerV2.jar

  Delegation Mode: PARENT_FIRST

  正如所看到的,当同时调用EJB模块和Web模块QVersionChecker是Version 2.0。当Ӟ原因是:WARcd载器请求委托给了父cd载器而不是他自己Q所以工具JARp同一个类加蝲器加载,而无需考虑h是来自于servletq是EJB?/p>

  12Q?Q?步骤 3Q改变WARcd载的委托模式

  现在是否希望Web模块使用WEB-INF/lib目录下面的VersionCheckerV1.jar文gQؓ了这个目的,需要先类加蝲委托模式从parent first改ؓparent last?br /> 
  讄委托模式为PARENT_LASTQ用如下步骤:

  1. 在向导栏选择Enterprise ApplicationsQ?/p>

  2. 选择ClassloaderExample应用E序Q?/p>

  3. 在模块部分选择Manage modules Q?/p>

  4. 选择ClassloaderExampleWeb模块Q?/p>

  5. 类加蝲序修改成应用程序类加蝲优先(PARENT_LAST)。记住,q个条目应该UCؓWARcd载优先,参见 “cd?委托模式”Q?/p>

  6. 单击OK.

  7. 保存配置Q?/p>

  8. 重新启动应用E序?/p>

  WEB-INF/lib下的VersionCheckerV1q回version of 1.0。可以在?2-10中看刎ͼ

  ?2-10cd载例3

  VersionChecker called from Servlet

  VersionChecker is v1.0.

  Loaded bycom.ibm.ws.classloader.CompoundClassLoader@4d404d40

  Local ClassPath:

  C:\WebSphere\AppServer\profiles\AppSrv02\installedApps\kcgg1d8Node02Cel

l\ClassloaderExample.ear\ClassloaderExampleWeb.war\WEB-INF\classes;C:\W

  ebSphere\AppServer\profiles\AppSrv02\installedApps\kcgg1d8Node02Cell\Cl

assloaderExample.ear\ClassloaderExampleWeb.war\WEB-INF\lib\VersionCheck

  erV1.jar;C:\WebSphere\AppServer\profiles\AppSrv02\installedApps\kcgg1d8

  Node02Cell\ClassloaderExample.ear\ClassloaderExampleWeb.war

  Delegation Mode: PARENT_LAST

  VersionChecker called from EJB

  VersionChecker is v2.0.

  Loaded bycom.ibm.ws.classloader.CompoundClassLoader@37f437f4

  Local ClassPath:

  C:\WebSphere\AppServer\profiles\AppSrv02\installedApps\kcgg1d8Node02Cel

  l\ClassloaderExample.ear\ClassloaderExampleEJB.jar;C:\WebSphere\AppServ

  er\profiles\AppSrv02\installedApps \kcgg1d8Node02Cell\ClassloaderExample

.ear\VersionCheckerV2.jar

  Delegation Mode: PARENT_FIRST

  如果你用类加蝲器的搜烦功能Q搜?VersionChecker*Q会得到?2-9Q?/p>

  ?2-9cd载查看器搜烦功能

  ?2-11昄源代?/p>

  ?2-11cd载查看器搜烦功能

  WAS Module Compound Class Loader (WAR class loader):

  file: / C: / WebSphere / AppServer / profiles / AppSrv02 /

  installedApps / kcgg1d8Node02Cell / ClassloaderExample.ear /

  ClassloaderExampleWeb.war / WEB-INF / lib / VersionCheckerV1.jar

  WAS Module Jar Class Loader (Application class loader):

  file: / C: / WebSphere / AppServer / profiles / AppSrv02 /

  installedApps / kcgg1d8Node02Cell / ClassloaderExample.ear /

  VersionCheckerV2.jar

  12Q?Q?步骤4Q用共享库׃n工具JAR

  在此之前Q只有一个应用程序用VersionCheckerV2.jar文g。是否希望多个应用程序能够共享它Q当Ӟ你可以在每个EAR文g中把q个文g打包q去。但是如果需要修改这个工具JARQ那需要重新部|所有的应用E序。ؓ了避免这个麻烦,你可以用共享库全局׃nq个JAR文g?/p>

  ׃n库可以定义在单元、节炏V应用程序服务器和集。一旦你定义了共享库Q必d它跟应用E序服务器的cd载器或者单独的Web模块兌h。根据共享库指派的目的地不同QWebSphere会用匹配的cd载器加蝲׃n库?/p>

  只要愿意Q可以定义多个共享库。也可以为应用程序、Web模块或者应用程序服务器指派多个׃n库?/p>

  在应用程序别用共享库

  定义一个名为VersionCheckerV2_SharedLib的共享库Qƈ把它跟ClassloaderTest应用E序兌hQ步骤如下:

  1. 在管理控制台Q选择Environment→Shared LibrariesQ?/p>

  2. 选择׃n库的作用域,比如单元Q单击NewQ?/p>

  3. 如图12-10Q?/p>

  ?2-10׃n库配|?/p>

  –Name: 输入VersionCheckerV2_SharedLibQ?/p>

  –Class path: 输入c\径中的条目,每个条目之间用回车隔开。如果提供绝对\径,是用WebSphere环境变量Q比?FRAMEWORK_JARS%/VersionCheckerV2.jarQ确定你已经定义了一个和׃n库相同作用域的变量?/p>

  –Native library path: 输入JNI代码使用的DLLs?so文g列表?/p>

  4. 单击OKQ?/p>

  5.选择Applications → Enterprise ApplicationsQ?/p>

  6. 选择应用E序ClassloadersExample Q?/p>

  7. 在引用选项Q选择Shared library references Q?/p>

  8. 在应用程序列选择ClassloaderExample Q?/p>

  9. 单击Reference shared librariesQ?/p>

  10. 选择VersionCheckerV2_SharedLibQ单?gt;>按钮选中的移动到Selected列,如下?2-11Q?/p>

  ?2-11指定一个共享库

  11.单击OK Q?/p>

  12.ClassloaderExample应用E序׃n库配|窗口如下图12-12Q?/p>

  ?2-12共享库指派l应用程序ClassloaderExample

  13.单击OKQ保存配|?/p>

  如果我们现在从EAR文g的根目录VersionCheckerV2.jar删除Q在EJB模块的manifest文g中也把引用删除,重新启动应用服务器,看到?2-12的结果。记住,Web模块的类加蝲序依然是应用程序类加蝲优先(PARENT_LAST)?/p>

  ?2-12cd载例4

  VersionChecker called from Servlet

  VersionChecker is v1.0.

  Loaded bycom.ibm.ws.classloader.CompoundClassLoader@2e602e60

  Local ClassPath:

  C:\WebSphere\AppServer\profiles\AppSrv02\installedApps\kcgg1d8Node02Cel

l\ClassloaderExample.ear\ClassloaderExampleWeb.war\WEB-INF\classes;C:\W

  ebSphere\AppServer\profiles\AppSrv02\installedApps\kcgg1d8Node02Cell\Cl

  assloaderExample.ear\ClassloaderExampleWeb.war\WEB-INF\lib\VersionCheck

  erV1.jar;C:\WebSphere\AppServer\profiles\AppSrv02\installedApps\kcgg1d8
 
  Node02Cell\ClassloaderExample.ear\ClassloaderExampleWeb.war

  Delegation Mode: PARENT_LAST

  VersionChecker called from EJB

  VersionChecker is v2.0.

  Loaded bycom.ibm.ws.classloader.CompoundClassLoader@19141914

Local ClassPath:

  C:\WebSphere\AppServer\profiles\AppSrv02\installedApps\kcgg1d8Node02Cel

l\ClassloaderExample.ear\ClassloaderExampleEJB.jar;C:\henrik\VersionChe

ckerV2.jar

  Delegation Mode: PARENT_FIRST

  正如预料的,׃Web模块的委托模式,当servlet需要VersionCheckerc,VersionCheckerV1.jar文g被加载。当EJB需要VersionChecker的类的时候,׃从指向C:\henrik\VersionCheckerV2.jar的共享库中加载它。如果你希望Web模块也用共享库Q只需要将cd载顺序恢复成~省|Web模块的类加蝲是父cd载优先?/p>

  在应用程序服务器U别使用׃n?/strong>

  ׃n库也可以跟应用程序服务器兌h。在q个服务器上的部|的所有应用程序都能够看到׃n库的代码列表。要把共享库跟应用程序服务器兌hQ首先要为应用程序服务器创徏一个附加的cd载器Q步骤如下:

  1. 选择应用E序服务器;

  2. 在应用程序基l构部分Q展开Java and Process ManagementQ选择Class loaderQ?/p>

  3. 选择NewQؓq个cd载器选择cd载顺序,父类加蝲优先(PARENT_FIRST)或者应用程序类加蝲优先(PARENT_LAST)Q单击ApplyQ?/p>

  4. 单击刚刚创徏的类加蝲器;

  5. 单击Shared library referencesQ?/p>

  6. 单击AddQ选择希望跟应用程序服务器兌的库。重复选择操作Q将多个库跟q个cd载器兌。比如选择VersionCheckerV2_SharedLib条目Q?/p>

  7. 单击OKQ?/p>

  8. 保存配置Q?/p>

  9. 重新启动应用E序服务器,修改才会生效?/p>

  VersionCheckerV2׃n库跟应用E序服务器关联v来,得C12-13的结果?/p>

  ?2-13cd载例5

  VersionChecker called from Servlet

  VersionChecker is v1.0.

  Loaded bycom.ibm.ws.classloader.CompoundClassLoader@40c240c2

  Local ClassPath:

  C:\WebSphere\AppServer\profiles\AppSrv02\installedApps\kcgg1d8Node02Cel

l\ClassloaderExample.ear\ClassloaderExampleWeb.war\WEB-INF\classes;C:\W

ebSphere\AppServer\profiles\AppSrv02\installedApps\kcgg1d8Node02Cell\Cl

assloaderExample.ear\ClassloaderExampleWeb.war\WEB-INF\lib\VersionCheck

erV1.jar;C:\WebSphere\AppServer\profiles\AppSrv02\installedApps\kcgg1d8

Node02Cell\ClassloaderExample.ear\ClassloaderExampleWeb.war

VersionChecker called from EJB

VersionChecker is v2.0.

  Loaded bycom.ibm.ws.classloader.ExtJarClassLoader@7dee7dee

  Local ClassPath: C:\henrik\VersionCheckerV2.jar

  Delegation Mode: PARENT_FIRST

  我们定义的新的名为ExtJarClassLoadercd载器Q在EJB模块hӞ它装入VersionCheckerV2.jar文g。由于委托模式,WARcd载器l箋装入自己的version?/p>

  12Q?cd载器问题诊断

  JVM 5.0提供了一些配|,可以让我们查看详l的c装入,比如JVM参数 -verbose:dynload?Dibm.cl.verbose=<name>?/p>

  在实际开发过E中Q如果用不当,会出现很多类加蝲相关的问题。当遇到cd载问题时Q可以查看WAS的相x志,在日志中出现如下异常Q可以认为是cd载器出现了问题:

  ClassCastException

  ClassNotFoundException

  NoClassDefFoundError

  NoSuchMethodError

  IllegalArgumentException

  UnsatisfiedLinkError

  VerifyError

  关于问题诊断Q将在下一文章《WAS 6.1cd载问题诊断》详l阐q?/p>

  ȝ

  本文针对WAS6.1版本Q详l介l了cd载的概念以及如何客户化,q过几个例子向大家讲qC影响cd载的选项的用。虽然WAS 6.1允许Ҏ需要修改类加蝲{略Q比如将父类优先Ҏ应用E序优先Q但是不推荐q么使用。笔者曾l就遇到因ؓ修改{略Q导致应用程序无法启动。原因是WAS?的组件和应用E序使用的某些类是一致的Q加载策略选择不正,׃Dcd载错误?/p>



Eric_jiang 2014-03-04 11:10 发表评论
]]>
XMLAccesshttp://www.tkk7.com/jjshcc/archive/2011/11/25/364812.htmlEric_jiangEric_jiangFri, 25 Nov 2011 05:13:00 GMThttp://www.tkk7.com/jjshcc/archive/2011/11/25/364812.htmlhttp://www.tkk7.com/jjshcc/comments/364812.htmlhttp://www.tkk7.com/jjshcc/archive/2011/11/25/364812.html#Feedback0http://www.tkk7.com/jjshcc/comments/commentRss/364812.htmlhttp://www.tkk7.com/jjshcc/services/trackbacks/364812.htmlAs a WebSphere AppServer or PortalServer administrator, your world can be a constant learning curve as new applications come along that utilize different aspects of the IBM middleware platforms. You may, for example, have mastered the art of deploying portal configurations using full or partial portal exports. This is convenient and easy to do. However, it may not give you the flexibility required for that new upcoming portal application that is being conceived in the minds of your company's Java developers. Luckily for you, XMLAccess is quite flexible.

Assuming you are familiar with the basic concepts of XMLAccess, the following refinements to the process should be straightforward. Instead of taking a full export from your production environment, suppose you wish to only export the portlets? In XMLAccess, the portlet is represented by the object type "web-app." Naturally you could generate an export of the portlets using the following XML (which is included in the samples shipped with Portal):


<?xml version="1.0" encoding="UTF-8"?>
<request xmlns:xsi="    <portal action="locate">
        <web-app action="export"
          objectid="*"/>
    </portal>
</request>
By importing this xml file, we direct the portal to export only the web-app object called '*' which is a wildcard for all web-apps. The command would be as follows:


xmlaccess.bat -in C:\temp\export_all_portlets.xml -user wpsadmin -pwd wpsadminpwd -url
http://portal.example.com/wps/config -out C:\temp\outputfile_all_portlets.xml

Right, so very easy. However, this sort of thing is useful only if we already have a portal configured with all of the portlets. If we're exporting all "web-app" objects, this assumes we have some to export in the first place. Suppose you have 50 new portlets that all need to be installed, but you have no existing portal that has all of them in place. Are you going to use the portal admin interface and click-click-click your way through installing 50 portlets, assigning permissions, creating pages, putting the portlets on the pages, etc. etc. etc.? Probably not - at least, I know I wouldn't.

How can we use XMLAccess to build a portal configuration if we are deploying portal elements for the very first time? This task won't involve exporting a config from somewhere, since we don't have things configured in any environment yet. Instead we're going to construct our XML files from scratch and import them into a blank portal in order to build our configuration.

The various XML files referred to from this point forward are printed at the end of this article.

The Blank Portal
When installing WPS, it is often desirable to deploy the portal without the sample pages and labels and portlets; it is simply too much clutter. To install a blank portal, use the following command when invoking the installation program:


install.bat -W installPortlets Sequence.active="false"

Proceed through the portal install sequence as you normally would. When complete, start the portal and go the portal home page. You should now see the blank portal.

Before continuing, be sure to have all of your necessary files in place. That is, if you are installing a theme, place the folder containing the theme on the PortalServer in the correct location. The same goes for skins, portlet WARs, etc.

Theme folders go into:
C:\WebSphere\AppServer\installedApps\<nodename>\wps.ear\wps.war\themes\html\

Skin folders go into:
C:\WebSphere\AppServer\installedApps\<nodename>\wps.ear\wps.war\skins\html\

By default, portlet WAR files need to be placed in:
C:\WebSphere\PortalServer\installableApps

With our blank portal installed, and with our component files in place, let's begin constructing our new portal. We'll start with the skins and themes.

Install Skins and Themes
The XML to install the theme will of course include the standard XML header for WPS 5.1. After that, we will do the required locate action on the "portal" object. After this we will instruct XMLAccess to perform an "update" on our skin with the parameters that we specify as show in Listing 1.

The skin object we specified includes the objectid, uniquename, and resourceroot parameters. Objectid will be the skin's referential id within the portal database. For ease of use, we also have a uniquename specified for this skin so that we can easily refer to the skin from this point forward. The resourceroot indicates the case-sensitive folder name of our skin that we placed in the skins\html\ directory.

Let's save this file as import_skins.xml. Once we import this file, we will have installed the skins into our portal:


xmlaccess.bat -in C:\temp\import_skins.xml -user wpsadmin -pwd  wpsadminpwd -url http://portal.example.com/wps/config

To install our themes, we need an XML file with similar information 

 

Since a theme has default and allowed skins assigned to it, we first have to find these skins before we can assign them to the theme. So we do a 'locate' on our two skins that were added in Listing 1. Once we find them, we perform an "update" on the theme object.

The update uses defaultskinref to define the default skin for the theme. For the first theme, we used Skin_A as the default skin. The objectid and uniquename for the theme are defined (and can be different, as indicated). The resourceroot is the case-sensitive folder name of the themes\html\ directory.

Notice that in addition to defining the default skin for each theme, we can also define the other skins that can be used with this theme. Notice that for Theme_Blue we are using Skin_A as the default, but we allow Skin_A as well as Skin_B. This is defined in the <allowed-skin skin="..."> section. Notice that for Theme_Green we are using Skin_B as the default and we only allow that skin. After all, Skin_A is red. Mixing a red skin with a green theme is just plain ugly.

Now let's save the xml file as import_themes.xml and import our themes into the portal configuration:


xmlaccess.bat -in C:\temp\import_themes.xml -user wpsadmin -pwd wpsadminpwd -url http://portal.example.com/wps/config
Install Portlets
We have our themes and skins imported, now let's put those pesky portlets in place.

Constructing the XML file for portlet install is a little trickier. It involves knowing some key information about the portlets. This information is found in the portlet.xml and web.xml inside the portlet.war file. For this step Winzip is especially useful, as you will need to be able to open the portlet WAR file (see Listing 3). You may also be able to get this info from the portlet developer. After all, he can see this info in his portal toolkit inside WebSphere Studio. However, developers being as busy as they usually are, good luck extracting this info from them.

Okay. This is slightly more complex. Here we have 3 portlets that we're installing. You can see we're locating the portal (of course), and then we do an update on object "web-app" which represents the WAR file.

The next parameter is the web-app uid parameter. The uid must match the uid attribute of portlet-app in portlet.xml in the portlet WAR file.

Following the uid, we have to specify the location of the portlet WAR file. When we transferred our portlet WARs to the server, we placed them in C:\WebSphere\PortalServer\installableApps. To refer to this location, we can use the $server_root$ variable which gets set when the XMLAccess interface is invoked.

Next, we have to perform an update on the portlet-app object. This represents the portlet application and is the parent of all the portlets contained within. The next parameter is the portlet-app uid parameter. The uid must match the uid attribute of concrete-portlet-app in portlet.xml in the portlet WAR file.

Finally we have the update to be performed on each portlet in the portlet application. In this example we only have one portlet in each WAR file, but we could potentially have several in each one. If this were the case, we'd have multiple "portal" objects defined within the "portal-app" object. We give the portlet an objectid and we define the name. The portlet name parameter must match the content of the portlet-name subtag of concrete-portlet in portlet.xml in the portlet WAR file.

So let's go ahead and save the xml file as import_portlets.xml and execute:


xmlaccess.bat -in C:\temp\import_portlets.xml -user wpsadmin -pwd wpsadminpwd -url http://portal.example.com/wps/config

 

 

We should now have deployed skins, themes, and portlets. Let's create a page and drop some portlets on it.

Create Pages
This is very straightforward. We need pages on which to place our portlets. Pages and labels are represented in the XML files as "content-node." Seems pretty logical if you think about it. A node of content. A content-node. Brilliant.

Our XML will look like Listing 4. Think of it logically. We first locate the resources we need (themes, portlets) and then we create our pages using those resources. Piece of cake. In this example, we'll create a label in the Content Root called Home (Content Root is the highest node of the content hierarchy. It exists by default). Hanging off this label is a single page called Welcome. On this Welcome page is single row containing our portlet, PortletCharlie.

You can see that we start off by locating the necessary resources - first the theme, Theme_Blue and then the portlet, PortletCharlie. Finally we have to locate the Content Root.

The next step in the process is to create the Home label. We give it an objectid and a uniquename. We define the content-parentref to be this label's immediate parent. In our case, this is the objectid of Content Root. Because we're creating a label at this point and not a page, we can assign a theme to the label. So we define themeref to be Theme_Blue.

Once created, we must immediately "locate" the new label before it can be used in the rest of the XML file. Next, we want to create the page called Welcome that is on the label called Home. You can see the values we use to define this page. With a page, however, we can also define the columns and rows containers that compose the structure of a portal page. Within these containers, we place the portlets.

The rows and columns on the page are defined in the "component" section in that page. In this example, within the page definition for the content-node Welcome, we define a component with an orientation of "H," which stands for horizontal, which is therefore a row. Setting the orientation to "V" would of course create a column. Rows can contain columns and vice versa. Tweaking these settings is how you could create an incredibly complex nested row/column page structure, if you so chose.

There are other parameters you can tinker with. Changing "ordinal" will change the order in which this content-node appears (since we only have one content-node at this level, it doesn't matter, but if we had a whole row of pages on the toolbar, we could order them using the ordinal parameter). Setting the "active" parameter to false would de-activate this content-node; and on and on...


<component action="update" active="true"  objectid="container1" ordinal="-1" orientation="H"  type="container" width="300">
 <portletinstance   action="update" handle=""  objectid="portletinstance1"portletref="Portlet_Charlie"></portletinstance>
</component>
Inside the component definition for the row on our page, you can see that we have put a portletinstance object with portletref set to Portlet_Charlie. This value must match the uid of the portlet that you wish to put in this container.

So here it is. Let's save this file as import_pages.xml and execute:


xmlaccess.bat -in C:\temp\import_pages.xml -user wpsadmin -pwd wpsadminpwd -url http://portal.example.com/wps/config
Once our import is complete, fire up a browser and go check out your brand new portal! Wunderbar! You should see your label with a page that has a portlet on it. Experiment.

Of course you can also go further and assign permissions to your objects using XML, or you could create XML files to remove portlets but leave the pages and so forth and so on.

Make liberal use of the example files in C:\WebSphere\PortalServer\doc\xml-samples, or the InfoCenter documents regarding XML Access. These pages are currently located at http://publib.boulder.ibm.com/infocenter/wp51help/topic/com.ibm.wp.ent.doc/wps/admxmlai.html.

 




Eric_jiang 2011-11-25 13:13 发表评论
]]>
从JKS文g中读取密?http://www.tkk7.com/jjshcc/archive/2011/11/24/364703.htmlEric_jiangEric_jiangThu, 24 Nov 2011 03:36:00 GMThttp://www.tkk7.com/jjshcc/archive/2011/11/24/364703.htmlJKS文g是一个java中的密钥理库,里面可以攑֐U密钥文ӞJKS文g的生成这里暂且不_q里主要是关注如何从JKS文g中将已有的密钥读取出来?/p>

 

下面是两个javadJKS文g中密钥的Ҏ

当然在看懂下面两个方法之前要对JKS文g的结构有所了解Q?/p>

JKS文g好像一个仓库,里面可以攑־多的东西Q这里只存放一cM西就是密钥,仓库当然会有一把锁Q防范别人随便ؕ拿,q个是JKS文g的密码。里面存攄密钥也各有不同,每个密钥都有一个名字(在下面叫别名Q,一cd密钥对,一cd公钥Q一cdU钥Q密钥对是包含公钥和私钥的。这里的公钥只要你能q入仓库你就可以随便查看拿走Q私钥则是有密码的,只允许有权限的h查看拿走。所以在下面d密钥时也有点细微的不同之处Q对于读取公钥只需要知道JKS文gQ仓库)的密码就可以了,但是在读取私钥时则必LU钥的密码也是你必要有权限,在下面你会发玎ͼ在读取私钥时多了一个参敎ͼ对应的就是私钥的密码?/p>




import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.security.KeyStore;
import java.security.KeyStoreException;
import java.security.NoSuchAlgorithmException;
import java.security.PrivateKey;
import java.security.PublicKey;
import java.security.UnrecoverableKeyException;
import java.security.cert.CertificateException;

import javax.security.cert.Certificate;

public class JKSTesting {
 
public static PublicKey getPublicKey(String keyStoreFile,
   String storeFilePass, String keyAlias) 
{

  
// d密钥是所要用到的工具c?/span>
  KeyStore ks;

  
// 公钥cL对应的类
  PublicKey pubkey = null;
  
try {

   
// 得到实例对象
   ks = KeyStore.getInstance("JKS");
   FileInputStream fin;
   
try {

    
// dJKS文g
    fin = new FileInputStream(keyStoreFile);
    
try {
     
// d公钥
     ks.load(fin, storeFilePass.toCharArray());
     java.security.cert.Certificate cert 
= ks
       .getCertificate(keyAlias);
     pubkey 
= cert.getPublicKey();
    }
 catch (NoSuchAlgorithmException e) {
     e.printStackTrace();
    }
 catch (CertificateException e) {
     e.printStackTrace();
    }
 catch (IOException e) {
     e.printStackTrace();
    }

   }
 catch (FileNotFoundException e) {
    e.printStackTrace();
   }

  }
 catch (KeyStoreException e) {
   e.printStackTrace();
  }

  
return pubkey;
 }


 
/**
  * 得到U钥
  * 
  * 
@param keyStoreFile
  *            U钥文g
  * 
@param storeFilePass
  *            U钥文g的密?br />  * 
@param keyAlias
  *            别名
  * 
@param keyAliasPass
  *            密码
  * 
@return
  
*/

 
public static PrivateKey getPrivateKey(String keyStoreFile,
   String storeFilePass, String keyAlias, String keyAliasPass) 
{
  KeyStore ks;
  PrivateKey prikey 
= null;
  
try {
   ks 
= KeyStore.getInstance("JKS");
   FileInputStream fin;
   
try {
    fin 
= new FileInputStream(keyStoreFile);
    
try {
     
try {
      ks.load(fin, storeFilePass.toCharArray());
      
// 先打开文g
      prikey = (PrivateKey) ks.getKey(keyAlias, keyAliasPass
        .toCharArray());
      
// 通过别名和密码得到私?/span>
     }
 catch (UnrecoverableKeyException e) {
      e.printStackTrace();
     }
 catch (CertificateException e) {
      e.printStackTrace();
     }
 catch (IOException e) {
      e.printStackTrace();
     }

    }
 catch (NoSuchAlgorithmException e) {
     e.printStackTrace();
    }

   }
 catch (FileNotFoundException e) {
    e.printStackTrace();
   }

  }
 catch (KeyStoreException e) {
   e.printStackTrace();
  }

  
return prikey;
 }


 
public static void main(String[] args) {
  PublicKey publicKey;
  PrivateKey privateKey;
  
  publicKey
=getPublicKey("C:\\aaa.jks","AAAAAAAA""ibmwebspheremq");
  privateKey
=getPrivateKey("C:\\aaa.jks","AAAAAAAA""ibmwebspheremq","AAAAAAAA");
  
  System.out.println(publicKey.toString());
  System.out.println(privateKey.toString());
 }

}



 



Eric_jiang 2011-11-24 11:36 发表评论
]]>
Portlet eventshttp://www.tkk7.com/jjshcc/archive/2011/11/10/363427.htmlEric_jiangEric_jiangThu, 10 Nov 2011 07:10:00 GMThttp://www.tkk7.com/jjshcc/archive/2011/11/10/363427.htmlhttp://www.tkk7.com/jjshcc/comments/363427.htmlhttp://www.tkk7.com/jjshcc/archive/2011/11/10/363427.html#Feedback0http://www.tkk7.com/jjshcc/comments/commentRss/363427.htmlhttp://www.tkk7.com/jjshcc/services/trackbacks/363427.htmlPortlet events contain information about an event to which a portlet might need to respond. For example, when a user clicks a link or button, this generates an action event. To receive notification of the event, the portlet must have an event listener implemented within the portlet class.

    Action events: generated when an HTTP request is received by the portlet container that is associated with an action, such as when the user clicks a link.
    Message events: generated when another portlet within the portlet application sends a message.

A portlet has a different processing and rendering sequence than a servlet. A servlet does all of its processing in the service() method. A portlet, on the other hand, uses a two phase processing that is split between an event phase and a render phase. This split is necessary to accommodate communication between portlets before rendering output in the service stage. The event phase is guaranteed to complete before a portlet is called to render.

During the event phase, the portlet implements an ActionListener interface. The ActionListener interface provides the actionPerformed() method, to which an ActionEvent object is passed. When a user clicks on a link or a submit button, an ActionEvent can be generated. The portlet action can be obtained from the ActionEvent, which describes the triggering event. When the actionPerformed() method is invoked, a response object is not available because this is not a rendering step. All state changes should be handled during action processing.

Portlets should use the render phase only to render portlet output. The service() method is not only called following the actionPerformed() processing when a user clicks on a link or button in a portlet, but is also called when the portal page is refreshed. Thus, given a page with two portlets, A and B, when the user clicks on a link in portlet A, actionPerformed() and doView() is called for portlet A, but only the doView() method is called for portlet B. Once the content generation phase has started, no further events will be delivered. For example, messages cannot be sent from within the beginPage(), service() and endPage() methods. The resulting message event would not be delivered and essentially discarded.

The event listener is implemented directly in the portlet class. The listener can access the PortletRequest from the event and respond using the PortletRequest or PortletSession attributes.
Action events

An ActionEvent is sent to the portlet when an HTTP request is received that is associated with a portlet action. To receive action events, the portlet class must implement the ActionListener interface and a portlet action. A portlet action can be one of the following types:

    Simple portlet action String
    PortletAction object

These actions are explained below. See Using persistence for code examples that show how to add a portlet action and create an ActionListener .

Simple portlet action String
    Actions created as simple actions can be executed multiple times, enabling a user's back button to work. Links created with simple portlet actions are represented in the URL rather than in the session. Therefore, portlets with simple actions can be placed on an anonymous page where no session exists. Simple portlet actions are associated with action events by using the getActionString() method.

    PortletURI.addAction(String simpleAction);
    String ActionEvent.getActionString();

    Simple portlet actions are not available in the Portlet API prior to WebSphere Portal Version 4.2. A portlet can determine if the portal server it is running on supports simple actions or not by checking the Portlet API version. The version of the Portlet API on servers that support simple actions has changed from 1.1 to 1.2. Here is example code that illustrates how to check for simple action support:

       if ( (portletContext.getMajorVersion() <= 1 ) && (portletContext.getMinorVersion() <= 1) )
       {
         // cannot use simple actions
       } else {
         // simple action support is present on this server
       }
        

    Note: Some portlets should be designed so that their actions are not executed every time a user refreshes their browser. In this case, set the following parameter and value either as an <init-param/> or <config-param/> in the appropriate descriptor.

    com.ibm.wps.portlet.action.redirect = true

    This allows the page and portlet to be reloaded without the action parameters in the URL.
PortletAction object
    The PortletAction object has been deprecated in favor of simple portlet action strings. It is maintained in the Portlet API to support existing portlets that use PortletActions. You should always use simple portlet actions instead of PortletAction objects.

Message events

IBM portlets that either implement the PortletMessage interface or extend the DefaultPortletMessage class can send information to other portlets on the page. Portlets receiving the message must implement the MessageListener interface and an object with the type PortletMessage. However, it is recommended that you use the property broker service for interportlet communication. See Cooperative portlets for more information.

Message events can be sent from one portlet to others if the recipient portlets are members of the same portlet application and are placed on the same page as the sending portlet. Additionally, a DefaultPortletMessage can cross portlet application boundaries and may be send to all portlets on a page. A MessageEvent can be sent actively to other portlets only when the portlet is in the event processing cycle of the portlet container, otherwise an exception is thrown. There are two different types of messages:

    Single addressed messages: Messages sent to a specific portlet by specifying the portlet name on the send() method.
    Broadcast messages: Messages sent to all portlets on the page.

Message events are useful when changes in one portlet should be reflected in another one. An object with the type PortletMessage has to be implemented which is passed via the MessageEvent. The portlet receiving the message must implement the MessageListener interface and an object with the type PortletMessage.


Eric_jiang 2011-11-10 15:10 发表评论
]]>
Http Session and PortletSession http://www.tkk7.com/jjshcc/archive/2011/11/09/363284.htmlEric_jiangEric_jiangWed, 09 Nov 2011 04:02:00 GMThttp://www.tkk7.com/jjshcc/archive/2011/11/09/363284.htmlhttp://www.tkk7.com/jjshcc/comments/363284.htmlhttp://www.tkk7.com/jjshcc/archive/2011/11/09/363284.html#Feedback0http://www.tkk7.com/jjshcc/comments/commentRss/363284.htmlhttp://www.tkk7.com/jjshcc/services/trackbacks/363284.htmlWhen the user initially accesses a portlet, a PortletSession is created. The portlet
session stores transient data associated with an individual use of the portlet.

The PortletSession object extends from HttpSession and serves much the same
purpose. The PortletSession is intended to represent an ongoing conversation between the client and the portlet. To this end, the PortletSession can be used to store information needed between requests. The PortletSession is intended to store data between requests, not between portlets. As such, data stored in the session by one portlet is not accessible by another. The PortletSession is retrieved from the request object.

Well both Portlets and Servlets are loaded using the same classloader.So it's a plain fact that session can be made available in both the contexts.

As far as the portlets are concerned,
The PortletSession is namespaced :
1) PORTLET_SCOPE : Only available to the particular portlet.
2) APPLICATION_SCOPE: Available to all Portlets and also available in Servlets/JSP etc

So, if you really want to share sessions among Servlets and Portlets...
1) Define the scope of the session attributes as APPLICATION_SCOPE in Portlets....
2) Access the session attributes defined or set in servlets by specifying APPLICATION_SCOPE.. else you will get null.

As far as retrieving the PortletSession from HttpRequest is concerned.. You can get them via the APIs available..
For JSR168 Struts Portlets we have WpsStrutsUtil package that will return you the PortletSession...



Eric_jiang 2011-11-09 12:02 发表评论
]]>
How Do You Control WebSphere Application Serverhttp://www.tkk7.com/jjshcc/archive/2011/10/10/360372.htmlEric_jiangEric_jiangMon, 10 Oct 2011 04:17:00 GMThttp://www.tkk7.com/jjshcc/archive/2011/10/10/360372.htmlhttp://www.tkk7.com/jjshcc/comments/360372.htmlhttp://www.tkk7.com/jjshcc/archive/2011/10/10/360372.html#Feedback0http://www.tkk7.com/jjshcc/comments/commentRss/360372.htmlhttp://www.tkk7.com/jjshcc/services/trackbacks/360372.htmlAll application servers have an Admin Service. The Admin Service does just what the name implies. In most application servers, the admin service does a really good job of system administration for one application server. When you try to run five or ten application servers in parallel, things get flakey. WebSphere Application Server is really a network of servers connected by a network of management. This is what IBM means by "network deployment" or the initials ND. At any moment, some servers will be running, some servers will be stopped, and some servers will be in some in between state. Large, distributed networks are like that. If the network is large enough -- we are talking tens of thousands of computers spread across several continents -- just knowing what is running on any given part of your network becomes a chore. The admin service for WebSphere Application Server is meant to control everything in an extended network of thousands of servers. It is possible to control a network that large from one laptop computer located anywhere in the world. Everything means

configuration -- the way the internal parts of WebSphere Application Server come to life when we start them
control -- the way those internal parts behave after we start them
monitoring -- reports and alerts we get
In order to understand how IBM administers the large network of servers that compose WebSphere Application Server, you have to understand some terms

profile
cell
node
server

IBM goes to great lengths to separate the actual code that executes from the settings that configure and control how that code behaves. Anything information that influences the way WebSphere Application Server behaves is isolated in something that IBM calls a profile. There is one profile for every node in the network of servers that we call WebSphere Application Server. Every time you create a profile, you have created a node. That node and the servers it contains might stand alone or it might be part of a collection of nodes that IBM calls a cell.

A node contains a collection of application servers and web servers that all happen to live on the same physical computer. One physical computer can contain many nodes as long as it has enough memory and enough CPU to power all the servers in all the nodes it contains. Every server in a node is guaranteed to live on the same physical computer.

An application server in the network of servers and services that we call WebSphere Application Server is Java Enterprise Edition platform code running on a Java Virtual Machine. That code produces dynamic content. This article describes how WebSphere Application Server produces dynamic content. Each application server has its own separate Java Virtual Machine. Sometimes, application servers are just called servers. Notice that any one application server is just a very small part of the product we call WebSphere Application Server. In the competing products, that application server is the entire product. Notice the difference in scale

A web server is a computer program that serves up static content. Sometimes, web servers are just called servers.

A cell is a collection on nodes. All the nodes could be on the same physical computer, but more likely, they will be on a network of physical computers

Configuration determines how all the application servers, web servers, message queues, and various internal services of WebSphere Application Server come to life. The configuration information that system administrators are allowed to modify is stored in a collection of XML files and properties files in the config directory of a profile.

XML files and properties files in the config directory of a profile define how the various servers and services in a node come to life. But those configuration files only get read once. They get read when a server or service is initializing. The moment initialization is complete, the XML files and the properties files are ignored. The only way to get a server to pay attention to changes you make in an XML file or a properties file is to stop the server and then start it again.

A network of JMX beans called MBeans control the way the network servers and services behave once they are running. Those same JMX beans also monitor the behavior of the servers and services while they execute.

Two kinds of specialized application servers enable us to configure, control, and monitor the behavior of the distributed network of servers and services that IBM calls WebSphere Application Server

deployment manager
node agent
A deployment manager is an application server that runs exactly one application -- an application that manages the configuration and behavior of an entire cell. There is only one deployment manager in any cell. The deployment manager holds the official configuration records for every server and service in the entire distributed network that is part of a cell. When a deployment manager orders a node agent to change the configuration of its servers and services to match this master record, we say the deployment manager has performed a synchronization. Deployment managers only talk to node agents

A node agent controls, configures and monitors all the servers and services in a node. Node agents talk to a deployment manager and node agents talk to the servers in their node. They relay administrative traffic from the deployment manager to the individual servers in their node. They relay status from the servers in their node to the deployment manager.

MBeans do several things

They simple pieces of Java code that can represent an application, a service, a server, or almost anything else in your enterprise.
They can report the status of anything in the enterprise
They can generate alerts concerning anything in the enterprise
They can be created automatically by WebSphere Application Server on behalf of anything installed in a cell
This thing we call WebSphere's admin service is really a network consisting of the various MBeans, the node agents, and the deployment manager. There are three fairly thin facades to the admin service

a web browser based graphic user interface called the admin console
a command line shell called wsadmin. This shell has a very powerful scripting language
any JMX clients that you might choose to write
If you have never used WebSphere Application Server before, the web browser based admin console is a very good way to learn basic setup and administration. There are limits to what you can do from the admin console. Depending on what you want to do, navigation can either be very easy or very hard. The admin console page that allows you to change JVM heap size is burried deep in the navigation tree of each server. If you want to change heap size for ten servers, you must navigate that tree for each of your ten servers. That can be a lot of tedious mouse clicks.

Once you know what you are doing, wsadmin becomes more attractive than the admin console for many administrative tasks. For one thing, the script language of wsadmin allows you to automate tasks. Once your network reaches a certain size, the admin console becomes a source of errors because of the large number of mouse clicks you must make and the amount of text entry you must provide. Again, the script language provides ways to automate tasks

The most powerful way to control the network of servers and services we call WebSphere Application Server is to write a JMX client. JMX clients have complete unfettered access to the entire admin service and everything that happens across the entire network.


Eric_jiang 2011-10-10 12:17 发表评论
]]>
Portlet里面实现面的蟩?q传递参?/title><link>http://www.tkk7.com/jjshcc/archive/2011/06/02/351601.html</link><dc:creator>Eric_jiang</dc:creator><author>Eric_jiang</author><pubDate>Thu, 02 Jun 2011 06:52:00 GMT</pubDate><guid>http://www.tkk7.com/jjshcc/archive/2011/06/02/351601.html</guid><wfw:comment>http://www.tkk7.com/jjshcc/comments/351601.html</wfw:comment><comments>http://www.tkk7.com/jjshcc/archive/2011/06/02/351601.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.tkk7.com/jjshcc/comments/commentRss/351601.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/jjshcc/services/trackbacks/351601.html</trackback:ping><description><![CDATA[<div><strong>问题:<br /></strong>我要在同一个portlet里面实现面的蟩?q传递参?该怎么做呢 <br /> 比如说jsp文g为A.jsp和B.jsp,java文g为portlet.java, <br />  <br /> 我在A.jsp里面q样? <br /> PortletURI   url=portletResponse.createURI(); <br /> url.addPatameter("index ", " "+index);(index为int?x要传递的参数) <br /> <a href="<%=url%>">Go to B.jsp当我点击此链接后,portlet.java中的doview()被调?而我怎样在doView()中获取这个index参数?然后做一些处?转到B.jsp面? <br /><br /><strong>{?<br /><br /></strong>portlet分响应动作和呈现两个阶段Q最好不要在doview里处理逻辑。你可以<a href="<portletAPI:createURI><portletAPI:URIAction name='<%=actionString%>'/><portletAPI:URIParameter   name= "index "   value= "1 "/> </portletAPI:createURI> "> go to b.jsp </a> Q在portlet的actionPerformed函数里相应该hQ而doView()军_include哪个jsp。另外如果是弹出Q可以用 <a href= " <%=response.encodeURL( "/jsp/html/b.jsp?index=1 ")%> "   target= "_blank "> open   b.jsp </a> ?<br />其中actionString是你自己定义的动作名Uͼ例如 "com.directAction "Q而第二种方式好像也可以直接{到b面Q去掉targetQ不q不推荐q样做)Q?<br /><br />public   void   actionPerformed(ActionEvent   event)   throws   PortletException{ <br />        String   actionString      =   event.getActionString(); <br />        PortletRequest   request   =   event.getRequest(); <br />        if(actionString.equals(someaciton)){ <br />                  //do   something <br />        } <br />}</div> <img src ="http://www.tkk7.com/jjshcc/aggbug/351601.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/jjshcc/" target="_blank">Eric_jiang</a> 2011-06-02 14:52 <a href="http://www.tkk7.com/jjshcc/archive/2011/06/02/351601.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>WebSphere Application Server V6.1试用版for Windowshttp://www.tkk7.com/jjshcc/archive/2011/05/24/350908.htmlEric_jiangEric_jiangTue, 24 May 2011 04:11:00 GMThttp://www.tkk7.com/jjshcc/archive/2011/05/24/350908.htmlhttp://www.tkk7.com/jjshcc/comments/350908.htmlhttp://www.tkk7.com/jjshcc/archive/2011/05/24/350908.html#Feedback0http://www.tkk7.com/jjshcc/comments/commentRss/350908.htmlhttp://www.tkk7.com/jjshcc/services/trackbacks/350908.htmlWebSphere Application Server Base Trial for Windows Base Trial
English U.S.
2007-12-06

WebSphere Application Server V6.1 for Windows
was.cd.6100.trial.base.windows.ia32.zip  (518.6MB)

以下下蝲均需IBM 官方账号登陆

IBM Download directorQ?/p>

Download director is required when downloading Common Criteria certified products.

https://www14.software.ibm.com/webapp/iwm/web/reg/download.do?source=was60&S_TACT=109BH33W&lang=en_US&S_PKG=win61&cp=UTF-8&&&&dlmethod=dd

HTTP 下蝲Q?/p>

https://www6.software.ibm.com/sdfdl/v2/regs2/was60/was61/Xa.2/Xb.XZT0eQtlFEAtKGXnBl9SUC_lc7t2gur7TkGfwVu9dg/Xc.was61/was.cd.6100.trial.base.windows.ia32.zip/Xd./Xf.LPr.D1vk/Xg.5528606/Xi.was60/XY.regsrvs/XZ.3FTPmw76Xk9MVyoZYj0pxpNV5xA/was.cd.6100.trial.base.windows.ia32.zip



Eric_jiang 2011-05-24 12:11 发表评论
]]>
使用IBM RAD和Websphere Portal Server开发部|一个基于JSR 168 的地址薄Portlet http://www.tkk7.com/jjshcc/archive/2011/05/13/350193.htmlEric_jiangEric_jiangFri, 13 May 2011 10:14:00 GMThttp://www.tkk7.com/jjshcc/archive/2011/05/13/350193.htmlhttp://www.tkk7.com/jjshcc/comments/350193.htmlhttp://www.tkk7.com/jjshcc/archive/2011/05/13/350193.html#Feedback2http://www.tkk7.com/jjshcc/comments/commentRss/350193.htmlhttp://www.tkk7.com/jjshcc/services/trackbacks/350193.html 

本文假设读者对WEB和portal及portlet有基本的了解?/p>

 

一、开发环?/p>

RAD 7.5 + Websphere Portal Server 7.0

二、开发目?/p>

开发一个地址薄,用来记录姓名和地址?/p>

三、开发过E?/p>

1.         创徏一个portlet目

选择File->New->Portlet ProjectQ弹出如下所C的对话框:


  输入或选择以上信息后,单击Next按钮Q弹出如下所C的界面Q?/p>

 

为简便v见,只选择了view和edit两个模式。l点击Next按钮弹出如下界面Q?/p>

 

 取消W一个复选按钮的默认选择Q点击Finish按钮完成目的创建?/p>

目创徏完成后,目中会生成如下4个关键文Ӟ

AddressBookPortlet.java是portlet的处理文Ӟ

AddressBookPortletEdit.jsp对应portlet的编辑状态;

AddressBookPortletView.jsp对应portlet的视囄态;

portlet.xml是portlet的部|描q文件?/p>


2.         增加姓名地址信息

修改~辑模式所对应的AddressBookPortletEdit.jsp文gQ提供用戯入界面?/p>

 
修改AddressBookPortlet.java中的processActionҎQ?br />

 ~辑界面提交的姓名和地址作ؓ名称/值对的Ş式保存在PortletPreferences对象中?/p>

response.setPortletMode(PortletMode.VIEW)表示处理完edit模式后迁Udview模式以显C最新的地址信息?/p>

3.         昄地址薄中的名U地址信息

׃名称/地址信息已经保存在PortletPreferences对象中,因此只需要从该对象中取出所有的名称/地址信息q显C出来即可。修改AddressBookPortletView.jspQ?/p>


4.         部v

启动PortServerQ可能需要较长的旉?/p>

选中服务器WebSphere Portal V7.0 at localhostQ弹出如下所C的菜单Q?/p>

 
点击Add and Remove Projects…Q弹出如下所C的界面Q?/p>

 

AddressBookPortletEARd到右边列表框中。点击Finish按钮完成部v?/p>

5.  q行

从浏览器地址栏输入URLQ?a href="http://localhost:10039/wps/myportal">http://localhost:10039/wps/myportalQ输入用户名和密码后q入如下所C的界面Q?/p>

 
点击该portlet所在页面右上角处(用蓝色椭圆标ZQ,弹出菜单Q如下图所C:

 

点击个性化菜单条,弹出增加地址界面Q?/p>

 

输入姓名和地址Q点M存按钮,则蟩转到昄面Q?/p>

 

xQ一个具有地址功能的portlet开发部|完成,在以后的portal面中就可以使用该portlet了?/p>

 http://www.puyufanyi.com/

 



Eric_jiang 2011-05-13 18:14 发表评论
]]>
վ֩ģ壺 av| ɫɫWWW| ˾ƷԻ79ren| վ߹ۿ| οŮվѴȫ| ޹Ʒ˾þ| ҹɫ˽ӰԺվ| ձѹۿ| þҹ޾Ʒ| 131ŮƵ| gayվ| ޾Ʒר2| ɫһƵ| Ʒ޲Ʒһ| һþƵ| ղһ| Ʒһ24Ƶ| ޾ƷþþþþĻ| žžƷѹƬ| ۺϼС˵| av벻߹ۿ| 㽶߹ۿ| ŷŮƵ| һ| þþƷһ| aaһƬѹۿ| ɫƵۿһ| պƷAƬ| ѻɫַվ| лGAYƬվWWW| ԰߹ۿ޻ɫһƬ| һ| ¶ѿ| ȫԼƵ| ˳ɼƵ߹ۿ| һƷ| Ƶ| պƷƵ| ɫ߹ۿַ| AVӰԺ߹ۿ| ûվɫƵֱ|