<?xml version="1.0" encoding="UTF-8"?> <!-- - Application context definition for JPetStore's business layer. - Contains bean references to the transaction manager and to the DAOs in - dataAccessContext-local/jta.xml (see web.xml's "contextConfigLocation"). --> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/aop" xmlns:tx="http://www.springframework.org/schema/tx" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.0.xsd">
使用此Q务来手动生成堆{储。如果用的 Sun Java 虚拟机(JVMQ包含在 HP-UX ?Solaris 操作pȝ上运行的 WebSphere Application ServerQ那么不支持此功能?/p>
在您开始之?
虽然只有在检到内存泄漏时才会生成堆转储Q但是,您必ȝ道,生成堆{储时会严重媄?WebSphere Application Server 的性能Qƈ且时间长达数分钟。因此,在以手动方式生成多个堆{储以便进行内存泄漏分析时Q请保泄漏的对象达到相当数目后才创建另一个堆转储。这P问题定工具p够确定内存泄漏的Ҏ?
关于本Q?
您可能想以手动方式生成堆转储Q以便对内存泄漏q行分析。在 WebSphere Application Server 中的 Java 虚拟机(JVMQ上Q无法自动生成堆转储。由于生成堆转储的成本相当高Q因此,您可能想指定堆{储的生成旉。在 WebSphere Application Server 中的 JVM 上,可以通过?WebSphere Application Server 受管 BeanQMBeanQ这些是Ҏ?Java beanQ执?generateHeapDump 操作来以手动方式生成堆{储?
WebSphere Application Server wsadmin 工具提供q行脚本的能力。您可以使用 wsadmin 工具来管?WebSphere Application Server 安装版本以及配置、应用程序部|和服务器运行时操作。WebSphere Application Server 仅支?Jacl ?Jython 脚本语言。有?wsadmin 工具的更多信息,请参?a cmimpressionsent="1">启动 wsadmin 脚本客户?/a>主题?/p>
存在两种cd的分析机Ӟ单一转储分析和两个{储的比较分析。此工具列示可疑的数据结构和数据cdQƈ在一个基于浏览器的交互式 Web 应用E序中显C内存{储的内容。该工具在具有相似所有权l构的数据类型有效集囑Ş布局中显C占用量分析l果。此工具内存{储的内容昄在用于浏览的交互式树形视图中Q以及分别显C在对象和数据类型的两个表视图中。树形视囑օ许您查找每个对象的所有入局和出局引用Q以及查看每个具有可疑内存泄漏的数据l构中的容器对象位置?/p>
]]>IBM Pattern Modeling and Analysis Tool for Java Garbage Collector发布2.6版,支持Java 6http://www.aygfsteel.com/fastzch/archive/2008/09/01/225977.htmlRobin's Java WorldRobin's Java WorldSun, 31 Aug 2008 16:11:00 GMThttp://www.aygfsteel.com/fastzch/archive/2008/09/01/225977.htmlhttp://www.aygfsteel.com/fastzch/comments/225977.htmlhttp://www.aygfsteel.com/fastzch/archive/2008/09/01/225977.html#Feedback0http://www.aygfsteel.com/fastzch/comments/commentRss/225977.htmlhttp://www.aygfsteel.com/fastzch/services/trackbacks/225977.html本Blog所有内容不得随意{载,版权属于作者所有。如需转蝲请与作者联p(
fastzch@163.com
Q?br />未经许可的{载,本h保留一切法律权益?br />一直以来,发现有某些h完全不尊重我的劳动成果,随意转蝲Q提醒一下那些h心哪天惹上官司?/font>
IBM Pattern Modeling and Analysis Tool for Java Garbage Collector(UGA)Q大名鼎鼎的IBM用来分析JDK GC日志的工P2008q??3日,更新?.6版,增加了对Java 6 GC日志的分析?br /> 我想q也是ؓ了配合Websphere Application Server 7.0的测试版发布Q在我之前的一文章?a href="/fastzch/archive/2008/08/07/220553.html">WebSphere Application Server 7.0 初体?/a>》中曄提到QGCViewerq个工具目前q无法查看其GC的日志,现在不用担心q个问题了,用GA2.6来看吧?br /> 来看看官方的介:
What is Pattern Modeling and Analysis Tool for IBM Java Garbage Collector? Pattern Modeling and Analysis Tool for IBM] Java™ Garbage Collector (PMAT) parses verbose GC trace, analyzes Java heap usage, and recommends key configurations based on pattern modeling of Java heap usage. When the JVM (Java virtual machine) cannot allocate an object from the current heap because of lack of space, a memory allocation fault occurs, and the Garbage Collector is invoked. The first task of the Garbage Collector is to collect all the garbage that is in the heap. This process starts when any thread calls the Garbage Collector either indirectly as a result of allocation failure or directly by a specific call to System.gc(). The first step is to get all the locks needed by the garbage collection process. This step ensures that other threads are not suspended while they are holding critical locks. All other threads are then suspended. Garbage collection can then begin. It occurs in three phases: Mark, Sweep, and Compaction (optional). Verbose GC is a command-line option that one can supply to the JVM at start-up time. The format is: -verbose:gc or -verbosegc. This option switches on a substantial trace of every garbage collection cycle. The format for the generated information is not designed and therefore varies among various platforms and releases. This trace should allow one to see the gross heap usage in every garbage collection cycle. For example, one could monitor the output to see the changes in the free heap space and the total heap space. This information can be used to determine whether garbage collections are taking too long to run; whether too many garbage collections are occurring; and whether the JVM crashed during garbage collection.
WebSphere Platform 7.0.0.0 [ND 7.0.0.0 h0823.03] running with process name starNode01Cell\starNode01\server1 and process id 3388 Detailed IFix information: No Interim Fixes applied to this build Host Operating System is Windows XP, version 5.1 build 2600 Service Pack 2 Java version =1.6.0, Java Compiler = j9jit24, Java VM name = IBM J9 VM
]]>WebSphere也有Licensehttp://www.aygfsteel.com/fastzch/archive/2007/12/19/168797.htmlRobin's Java WorldRobin's Java WorldWed, 19 Dec 2007 08:55:00 GMThttp://www.aygfsteel.com/fastzch/archive/2007/12/19/168797.htmlhttp://www.aygfsteel.com/fastzch/comments/168797.htmlhttp://www.aygfsteel.com/fastzch/archive/2007/12/19/168797.html#Feedback6http://www.aygfsteel.com/fastzch/comments/commentRss/168797.htmlhttp://www.aygfsteel.com/fastzch/services/trackbacks/168797.html上周M参加BEA World 2007Q有q认识了王超大哥Q那可是个Server的牛人,对WAS和WLS都极其精通,光我们谈到BEA的论坛的板块Q王大哥说道,Server版还是有搞头的,呵呵Q然后就开始问大家QWAS有没有LicenseQ我说反正我有正式版Q也有试用版Q每ơ试用版的机器我们都用改旉那一招来解决Q反正在安装日期后的三个月内都能用。大哥却_其实WAS是有License的,在WAS的安装目录下Q有一个was.license的文Ӟ而且可以把这个文件Copy到试用版的机器上去,变成正式版了?br /> 今天我验证了一把这个问题,先停掉WASQ再把系l时间改为正常的旉Q然后Copy License文gQ现在启动WASQ一切正常,再也看不到提CY件将在多天内到期的画面了,原来有此事Q大哥确实是牛h?br />试版本为:WebSphere 6.1 for Windows
之前一直都没做q这斚w的配|,但是觉得说不定什么时候用得着Q就问了配过的同事,自己也在|上找了些资料了解了大概的过E。但是大部分都没有写明是在IHS的哪个版本上作的Q于是想试试在IHS61上面是不是也是同L做法。参考的资料包括Q?br />1.IHS User's Guide中的Chapter 5中的securing communications 2.WebSphere Application Server V6.1 Security Handbook(sg246316).pdf中的7.2?.3 其中7.2介绍了Browser和IHS的SSL配置Q也是我试验的内容;7.3讲的是IHS plugin和WAS的SSL配置?br />3.WebSphere Security Fundamentals(redp3944).pdf W记本上本来有一个WAS61的环境,于是装上IHS和plugin开始试验。可能是太久没有用IHS了,都忘C怎样IHS加到DM的console中进行管理。一开始以为就是把webserver的定义徏h可以了Q一启动׃生了一个FFDCQ打开一看说是没扑ֈwebserver1的定义,详细信息如下Q?br />------Start of DE processing------ = [07-1-26 15:48:29:228 CST] , key = javax.management.MBeanException com.ibm.ws.management.AdminServiceImpl.invoke 679 Exception = javax.management.MBeanException Source = com.ibm.ws.management.AdminServiceImpl.invoke probeid = 679 Stack Dump = javax.management.MBeanException: Exception thrown in RequiredModelMBean while trying to invoke operation launchProcess at javax.management.modelmbean.RequiredModelMBean.invokeMethod(RequiredModelMBean.java:1116) 。。?br />Caused by: com.ibm.websphere.management.exception.AdminException: Server, webserver1, not found. 。。?br />H然记v以前做的时候好像是要运行一个IHS安装q程中自q成的脚本的,试试看。在PLUGIN_HOME\bin扑ֈconfigurewebserver1.bat拯至DM_PROFILE\bin直接执行Qwebserver1的启动停止都OK了?br />接下来开始在本次试验的主要工作: 1、用ikeyman生成CMS key database fileQ虽然好像除了CMS外还有其他的cd但是好像看到某本redbook上说了IHS只能使用CMS的。创Zmykey.kdb后再l运行IHS的机器发一个证书,直接在ikeyman中新{v证书可以了Q创建的证书会出现在个h证书列表中,最后不要忘了{储密码(Stash the password to a fileQ? ihs_610.pdf中描q如下: Create a new key database as follows: 1. Start the IKEYMAN user interface. Refer to Starting the Key Management utility for platform-specific instructions. 2. Click key database file from the main user interface, then click New. Select CMS for the Key database type. IBM HTTP Server does not support database types other than CMS. 3. Enter your password in the Password Prompt dialog box, and confirm the password. Select Stash the password to a file. Click OK. The new key database should display in the IKEYMAN utility with default signer certificates. Ensure that there is a functional, non-expiring signer certificate for each of your personal certificates.
Creating a self-signed certificate It usually takes two to three weeks to get a certificate from a well known certificate authority (CA). While waiting for a certificate to be issued, use IKEYMAN to create a self-signed server certificate to enable SSL sessions between clients and the server. Use this procedure if you act as your own CA for a private Web network. Complete the following steps to create a self-signed certificate: 1. If you have not created the key database, see Creating a new key database for instructions. 2. Start the IKEYMAN user interface. 3. Click Key Database File from the main UI, and then click Open. 4. Enter your key database name in the Open dialog box, or click the key.kdb file, if you use the default. Click OK. 5. In the Password Prompt dialog box, enter your correct password and click OK. 6. Click Personal Certificates in the Key Database content frame, and click the New Self-Signed radio button. 7. Enter the following information in the Password Prompt dialog box: v Key label: Enter a descriptive comment to identify the key and certificate in the database. v Key size: Choose your level of encryptions from the drop-down menu. v Common Name: Enter the fully qualified host name of the Web server as the common name. Example: www.myserver.com. v Organization Name: Enter your organization name. v Optional: Organization Unit v Optional: Locality v Optional: State/Province v Optional: Zip code v Country: Enter a country code. Specify at least two characters. Example: US Certificate request file name, or use the default name. v Validity Period 8. Click OK. 其实在生产环境中应该是创建完key database后将CA发的证书Q如*.cerQ导入,自己做试验的话自{一个就可以了,q不影响配置和实现?br />2、修改http.conf?br />以下是我在http.conf中增加的Q?br /># SSL config LoadModule ibm_ssl_module modules/mod_ibm_ssl.so <IfModule mod_ibm_ssl.c> Listen 443 <VirtualHost *:443> SSLEnable </VirtualHost> </IfModule> SSLDisable KeyFile "C:/IBM/HTTPServer/bin/mykey.kdb" 一开始看到IBM中国的论坛上说NT环境的话load一个XXX.dllQ但是打开IHS_HOME\modules看到了一大堆的soQ而且原来的http.conf中也load了不soQ找redbook上写的应该没错。改完保存重新启动IHSQ一切OK?br />下面开始验证,拿snoop来试一试吧。打开http://...:9080/snoopQ显C正常。试?a href="http://.../snoop">http://.../snoopQ等了半天没出来。troubleshooting的时间到了,很明显request没有被plugin转发lWASQ重新生成插件看看。在DM console中找到“环?-更新全局 Web 服务器插仉|”,更新完之后原来http.conf中的WebSpherePluginConfig指向的文件ƈ没有更新Q难道是插g位置不对Q修改ؓDM_HOME\config\cells\plugin-cfg.xmlQ这回IHSd新的插g了,但是老觉得“更新全局 Web 服务器插仉|”中的全局好像大对劌Ӏ搞了半天没扑֯地方Q更新webserver1的插件应该是在“服务器--Web服务器”中的这回应该没错了Q再试还是老样子。突然想h之前做过的另一个试验给server1加上?0侦听Q动手把IHSҎ81。修改了Listen 0.0.0.0:81和ServerName szd610-286.boshi.com.cn:81两行。奇怪的是原来IHS占着80Qserver1启动时也不会报错。重起webserver1和server1?0?1都正常启动了Qhttp://...:81/snoop和http://.../snoop讉K正常Q访问https://.../snoop出来两个安全警报Q确定后l于看到了snoop?br />
/**//* ** INSTJDBC.SQL ** Installs XA stored procedures used by the JDBC driver */ go use master go dump tran master with no_log go /**//* ** drop procedures if they're already in the database */ sp_dropextendedproc 'xp_jdbc_open' go sp_dropextendedproc 'xp_jdbc_open2' go sp_dropextendedproc 'xp_jdbc_close' go sp_dropextendedproc 'xp_jdbc_close2' go sp_dropextendedproc 'xp_jdbc_start' go sp_dropextendedproc 'xp_jdbc_start2' go sp_dropextendedproc 'xp_jdbc_end' go sp_dropextendedproc 'xp_jdbc_end2' go sp_dropextendedproc 'xp_jdbc_prepare' go sp_dropextendedproc 'xp_jdbc_prepare2' go sp_dropextendedproc 'xp_jdbc_commit' go sp_dropextendedproc 'xp_jdbc_commit2' go sp_dropextendedproc 'xp_jdbc_rollback' go sp_dropextendedproc 'xp_jdbc_rollback2' go sp_dropextendedproc 'xp_jdbc_forget' go sp_dropextendedproc 'xp_jdbc_forget2' go sp_dropextendedproc 'xp_jdbc_recover' go sp_dropextendedproc 'xp_jdbc_recover2' go dump tran master with no_log go /**//* ** add references for the stored procedures */ print 'creating JDBC XA procedures' go sp_addextendedproc 'xp_jdbc_open', 'sqljdbc.dll' go sp_addextendedproc 'xp_jdbc_open2', 'sqljdbc.dll' go sp_addextendedproc 'xp_jdbc_close', 'sqljdbc.dll' go sp_addextendedproc 'xp_jdbc_close2', 'sqljdbc.dll' go sp_addextendedproc 'xp_jdbc_start', 'sqljdbc.dll' go sp_addextendedproc 'xp_jdbc_start2', 'sqljdbc.dll' go sp_addextendedproc 'xp_jdbc_end', 'sqljdbc.dll' go sp_addextendedproc 'xp_jdbc_end2', 'sqljdbc.dll' go sp_addextendedproc 'xp_jdbc_prepare', 'sqljdbc.dll' go sp_addextendedproc 'xp_jdbc_prepare2', 'sqljdbc.dll' go sp_addextendedproc 'xp_jdbc_commit', 'sqljdbc.dll' go sp_addextendedproc 'xp_jdbc_commit2', 'sqljdbc.dll' go sp_addextendedproc 'xp_jdbc_rollback', 'sqljdbc.dll' go sp_addextendedproc 'xp_jdbc_rollback2', 'sqljdbc.dll' go sp_addextendedproc 'xp_jdbc_forget', 'sqljdbc.dll' go sp_addextendedproc 'xp_jdbc_forget2', 'sqljdbc.dll' go sp_addextendedproc 'xp_jdbc_recover', 'sqljdbc.dll' go sp_addextendedproc 'xp_jdbc_recover2', 'sqljdbc.dll' go /**//* ** grant privileges so that all users can enlist in XA transactions */ grant execute on xp_jdbc_open to public go grant execute on xp_jdbc_open2 to public go grant execute on xp_jdbc_close to public go grant execute on xp_jdbc_close2 to public go grant execute on xp_jdbc_start to public go grant execute on xp_jdbc_start2 to public go grant execute on xp_jdbc_end to public go grant execute on xp_jdbc_end2 to public go grant execute on xp_jdbc_prepare to public go grant execute on xp_jdbc_prepare2 to public go grant execute on xp_jdbc_commit to public go grant execute on xp_jdbc_commit2 to public go grant execute on xp_jdbc_rollback to public go grant execute on xp_jdbc_rollback2 to public go grant execute on xp_jdbc_forget to public go grant execute on xp_jdbc_forget2 to public go grant execute on xp_jdbc_recover to public go grant execute on xp_jdbc_recover2 to public go print '' print 'instxa.sql completed successfully.' go dump tran master with no_log go checkpoint go /** *//**/
dep = AdminConfig.getid("/Deployment:isclite/" ) appDep = AdminConfig.list("ApplicationDeployment", dep ) sesMgmt = AdminConfig.list("SessionManager", appDep ) # check if existing sesMgmt there or not, if not then create a new one, if exist then modify it if (sesMgmt ==""): # get applicationConfig to create new SessionManager appConfig = AdminConfig.list("ApplicationConfig", appDep ) if (appConfig ==""): # create a new one appConfig = AdminConfig.create("ApplicationConfig", appDep, []) # then create a new SessionManager using new Application Config just created sesMgmt = AdminConfig.create("SessionManager", appConfig, [] ) else: # create new SessionManager using the existing ApplicationConfig sesMgmt = AdminConfig.create("SessionManager", appConfig, [] ) #endElse #endIf # get tuningParams config id tuningParams = AdminConfig.showAttribute(sesMgmt, "tuningParams" ) if (tuningParams ==""): # create a new tuningParams AdminConfig.create("TuningParams", sesMgmt, [["invalidationTimeout",<timeout value>]] ) else: #modify the existing one AdminConfig.modify(tuningParams, [["invalidationTimeout", <timeout value>]] ) #endElse # saving the configuration changes AdminConfig.save()
]]>Configuration DataSource At WebSphere6http://www.aygfsteel.com/fastzch/archive/2006/12/03/85176.htmlRobin's Java WorldRobin's Java WorldSun, 03 Dec 2006 04:33:00 GMThttp://www.aygfsteel.com/fastzch/archive/2006/12/03/85176.htmlhttp://www.aygfsteel.com/fastzch/comments/85176.htmlhttp://www.aygfsteel.com/fastzch/archive/2006/12/03/85176.html#Feedback6http://www.aygfsteel.com/fastzch/comments/commentRss/85176.htmlhttp://www.aygfsteel.com/fastzch/services/trackbacks/85176.html最q台灣公司做保險項目,服務器采用WebSphere V6Q這是目前最新的版本了,E上的參考資料也不是很多Q有很多同事說在上面配置DB2的數據源不能成功Q我昨天加了下班Q來試著配了一下數據源Q發珑օ實也還很單Q在此拿來與大家分n?/p>
下面以DB2數據庫為范例Q講q其配置步驟Q至於WebSphere的安裝、啟動等均不在此文范圍之內?br />1、啟動服務器Q進入理L台?br />2、進入環境->WebSphere變量Q?br />a置DB2UNIVERSAL_JDBC_DRIVER_PATH項為你的DB2驅動的位|,如D:\project\Web\WEB-INF\libQ主要是后面會用到此環境變量Q當焉里也可以不a置Q後面配|時只能寫死\徑了Q這樣不好Q推荐還是在這里a置一下?br />3、進入資源->JDBC提供者: 選擇你所要配|的服務?單元/點中的某一項,做為你要配置的目標,一般選擇節點,然后點應用。此時你便可以看到服務器/單元/點下所有的JDBC提供者了Q你可以點新Z建立一個新的JDBC提供者。然后填入你惌建立的提供者的名稱Q描qͼ\徑等配置Q如下: 名稱QDB2 Universal JDBC Driver Provider 描述QNon-XA DB2 Universal JDBC Driver-compliant Provider. Datasources created under this provider support only 1-phase commit processing except in the case where driver type 2 is used under WAS z/OS. On WAS z/OS, driver type 2 uses RRS and supports 2-phase commit processing \徑:${DB2UNIVERSAL_JDBC_DRIVER_PATH}/db2jcc.jar ${DB2UNIVERSAL_JDBC_DRIVER_PATH}/db2java.jar ${UNIVERSAL_JDBC_DRIVER_PATH}/db2jcc_license_cu.jar ${DB2UNIVERSAL_JDBC_DRIVER_PATH}/db2jcc_license_cisuz.jar 實現:com.ibm.db2.jcc.DB2ConnectionPoolDataSource 單擊定Q保存上在這些配置?br />5、單擊其它屬性中數據源鏈接,進入數據源配|畫面?br />6、新Z數據源,配置如下Q?br />名稱Qjdbc_db2_117 JNDI名稱Qmydb2test 描述QDB2 Universal Driver Datasource DB2通用數據源屬性: 數據庫名E:redemo 驅動E序型Q? 服務器名Q?0.5.15.117 端口號:5000 注意Q不要選中將此數據源用於容器理持久性(CMPQ,如果你需要這樣做的話,當然也可以選中?br />單擊定按鈕Q保存配|?br />7、打開相關項中J2EE 連接器體pȝ构數據据認証條目鏈接?br />8、新Z個認a條目,配置如下Q?br />別名Qwistron-robinNode02/jdbc_db2_117_admin 用戶標識Qdb2adminQ你的數據n用戶的密| 密碼Q你的數據n用戶的密?br />單擊定Q保存配|?br />9、回到數據源配置畫面Q修改組件管理的認証別名項為剛剛配置這項Qwistron-robinNode02/jdbc_db2_117_adminQ然后點定按鈕Q保存配|?br />10、配|部分就完成,你需要根據WebSphere的提C,保存所有這些配置Q並使服務器生效Q然后進入數據源頁面,怸你剛剛配|的數據源,單擊測試連接按鈕Q測試是否配|成功?/p>