tag:blogger.com,1999:blog-67410803974548907832024-02-20T01:42:36.340-08:00All Things WebSphereConcerns and issues relating to all versions of WebSphere Application ServerRohit Kelapurehttp://www.blogger.com/profile/12988550581111360779noreply@blogger.comBlogger195125tag:blogger.com,1999:blog-6741080397454890783.post-61233793100508130112014-08-14T10:50:00.000-07:002014-08-14T10:50:03.386-07:00Farewell to IBM<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
After spending 11 fantastic years at IBM working with many smart people on various components of WebSphere Application Server and later on Bluemix Liberty buildpack my career at IBM comes to a close tomorrow. It was a fun ride which I will never forget. I have lot of respect for IBM and I wish the company well as a stock holder.<br />
<br />
Next week I will start a new professional chapter of my life with Pivotal Services @ EMC working on Cloud Foundry and related PaaS technologies. I still do expect to keep blogging albeit from a different platform. For all practical purposes this blog is now closed. I will not delete the posts since they are still very useful; however my new posts will most likely be about cloud computing and Platform as a Service.<br />
<br />
For my IBM friends who want to reach me, my public gmail address is kelapure at gmail.com and twitter handle is <a href="https://twitter.com/RKela">rkela</a>. You can also reach me via <a href="http://www.linkedin.com/in/rohitkelapure">linkedin</a>.<br />
<br />
Thanks again for all the support and au revoir!</div>
Rohit Kelapurehttp://www.blogger.com/profile/12988550581111360779noreply@blogger.com0tag:blogger.com,1999:blog-6741080397454890783.post-50816453662939551372014-06-21T20:56:00.002-07:002014-06-21T20:57:43.711-07:00Puting your IBM JRE in a zombie state<div dir="ltr" style="text-align: left;" trbidi="on">
Sometimes after a crash or a particularly insidious event the JVM terminates. There could be a number of reasons for this .. OOM, JNI crashes, system exits etc.,<br />
<br />
If you want your JVM to stick around i.e. not exit then use this -Xdump option<br />
<span style="font-family: "Courier New",Courier,monospace;"><b><code>"-Xdump:tool:events=gpf,exec=\"sleep 1d\" -Xdump:what"</code></b></span><br />
<br />
We employ techniques like this in the cloud to keep linux container hosting our app which in this case is the Liberty server + JRE + application bits from disappearing into ether when the JVM terminates.<br />
<br />
For details on how we use this with the Liberty profile in the cloud see <a href="https://developer.ibm.com/bluemix/2014/06/18/collecting-diagnostics-crash-2/">https://developer.ibm.com/bluemix/2014/06/18/collecting-diagnostics-crash-2/</a><br />
<br />
For more detail on how to set -Xdump see<br />
<a href="http://www-01.ibm.com/support/docview.wss?uid=swg21242497">http://www-01.ibm.com/support/docview.wss?uid=swg21242497</a><br />
<br />
Happy Debugging,<br />
Rohit <br />
<br /></div>
Rohit Kelapurehttp://www.blogger.com/profile/12988550581111360779noreply@blogger.com0tag:blogger.com,1999:blog-6741080397454890783.post-25540109363707800592014-06-21T20:46:00.002-07:002014-06-21T20:50:39.170-07:00Liberty Buildpack Cloud Foundry Bluemix presentations from IMPACT 2014 <div dir="ltr" style="text-align: left;" trbidi="on"><br />
<iframe src="//www.slideshare.net/slideshow/embed_code/34246731" width="427" height="356" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" style="border:1px solid #CCC; border-width:1px 1px 0; margin-bottom:5px; max-width: 100%;" allowfullscreen> </iframe> <div style="margin-bottom:5px"><strong> <a href="https://www.slideshare.net/kelapure/1713-deep-diveliberty-buildpack" title="A Deep Dive into the Liberty Buildpack on IBM BlueMix " target="_blank">A Deep Dive into the Liberty Buildpack on IBM BlueMix </a> </strong> from <strong><a href="http://www.slideshare.net/kelapure" target="_blank">kelapure</a></strong> </div><br />
<iframe src="//www.slideshare.net/slideshow/embed_code/34298771" width="427" height="356" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" style="border:1px solid #CCC; border-width:1px 1px 0; margin-bottom:5px; max-width: 100%;" allowfullscreen> </iframe> <div style="margin-bottom:5px"><strong> <a href="https://www.slideshare.net/kelapure/1733-integrating-serviceslibertybuildpack" title="Liberty Buildpack: Designed for Extension - Integrating your services in BlueMix Session # 1733" target="_blank">Liberty Buildpack: Designed for Extension - Integrating your services in BlueMix Session # 1733</a> </strong> from <strong><a href="http://www.slideshare.net/kelapure" target="_blank">kelapure</a></strong> </div><br />
<iframe src="//www.slideshare.net/slideshow/embed_code/34314843" width="427" height="356" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" style="border:1px solid #CCC; border-width:1px 1px 0; margin-bottom:5px; max-width: 100%;" allowfullscreen> </iframe> <div style="margin-bottom:5px"><strong> <a href="https://www.slideshare.net/kelapure/2259-migrate-herokuopenshift-applicationstobluemixpublic" title="Migrate Heroku & OpenShift Applications to IBM BlueMix" target="_blank">Migrate Heroku & OpenShift Applications to IBM BlueMix</a> </strong> from <strong><a href="http://www.slideshare.net/kelapure" target="_blank">kelapure</a></strong> </div><br />
<br />
</div>Rohit Kelapurehttp://www.blogger.com/profile/12988550581111360779noreply@blogger.com0tag:blogger.com,1999:blog-6741080397454890783.post-54703310109511747052013-10-02T22:30:00.002-07:002013-10-02T23:18:44.355-07:00IBM WebSphere Application Server Licensing update<div dir="ltr" style="text-align: left;" trbidi="on"><span style="font-size: medium;">Today IBM announces some license update that will help reduce customers cost . </span><br />
<span style="font-size: medium;">We announced two things:</span><br />
<br />
<span style="font-size: medium;">1- IBM WebSphere Application Server removed the restriction on how many servers one can load balance and failover on Express, Base, Liberty Core.</span><br />
<br />
<span style="font-size: medium;">2- IBM WebSphere Application Server offers new Fixed Term License option</span><br />
</div>Rohit Kelapurehttp://www.blogger.com/profile/12988550581111360779noreply@blogger.com0tag:blogger.com,1999:blog-6741080397454890783.post-62877112502935544492013-10-01T11:48:00.004-07:002013-10-02T23:15:35.994-07:00Deep dive into IBM JDK -Xtrace<h2 class="""heading-1"""><span id="""HXtraceWalkthrough""">-Xtrace Walkthrough</span></h2><span>Thanks to Tom Bitonti for this blog post</span><br />
<div class="""paragraph""">The goal is to generate trace for an IBM WebSphere Application Server process using the extended java command line option "-Xtrace". The trace is to include entry and exit trace for one constructor and for two methods, including a listing of parameter values, and is to include stack trace the constructor and for one of the methods.<div class="""paragraph""">Documentation for the "-Xtrace" java command line option is available here:<div class="""paragraph"""><span class="""nobr"""><a href="http://www.blogger.com/%22http://www.blogger.com/%22http://pic.dhe.ibm.com/infocenter/java7sdk/v7r0/topic/com.ibm.java.lnx.70.doc/diag/tools/tracing.html%22%22">http://pic.dhe.ibm.com/infocenter/java7sdk/v7r0/topic/com.ibm.java.lnx.70.doc/diag/tools/tracing.html</a></span><div class="""paragraph""">Some samples are provided here:<div class="""paragraph"""><span class="""nobr"""><a href="http://www.blogger.com/%22http://www.blogger.com/%22https://www.ibm.com/developerworks/community/blogs/738b7897-cd38-4f24-9f05-48dd69116837/entry/dump_the_stack_trace_information_of_a_method_using_xtrace15?lang=en%22%22">https://www.ibm.com/developerworks/community/blogs/738b7897-cd38-4f24-9f05-48dd69116837/entry/dump_the_stack_trace_information_of_a_method_using_xtrace15?lang=en</a></span><div class="""paragraph""">While specified for Linux JVMs, this documentation applies to other platforms which use an IBM JDK.<div class="""paragraph""">These notes are intended as an addition to the IBM WebSphere Application Server DynaCache Blog:<div class="""paragraph"""><span class="""nobr"""><a href="http://www.blogger.com/%22http://www.blogger.com/%22http://wasdynacache.blogspot.com/2011/07/jvm-xtrace-holy-grail-of-websphere.html%22%22">http://wasdynacache.blogspot.com/2011/07/jvm-xtrace-holy-grail-of-websphere.html</a></span><div class="""paragraph""">Notes:<br />
<ol><li>"-Xtrace", a command line option to JVM's, is not to be confused with "X-Trace", which is a network diagnostic tool (<span class="""nobr"""><a href="http://www.blogger.com/%22http://www.blogger.com/%22http://x-trace.net/wiki/doku.php%22%22">http://x-trace.net/wiki/doku.php</a></span>).</li>
<li>The "jstacktrace" trigger action is available in the IBM JVM since <strong class="""strong""">IBM Java 6 SR5</strong>.</li>
<li>This documentation in for "-Xtrace" in side IBM JVM's. Options for non-IBM JVMs may differ substantially from those described by this documentation.</li>
</ol><h3 class="""heading-1-1"""><span id="""HGoal""">Goal</span></h3><div class="""paragraph""">Generate trace for an IBM WebSphere Application Server process using the extended java command line option "-Xtrace". Include entry and exit trace for one constructor and for two methods, including a listing of parameter values. Include stack trace the constructor and for one of the methods.<div class="""paragraph""">The target constructor is of class:<div class="""paragraph"""><div class="""code"""><pre>org.eclipse.emf.ecore.impl.EClassifierImpl</pre></div><div class="""paragraph""">The target methods are:<div class="""paragraph"""><div class="""code"""><pre>org.eclipse.emf.ecore.impl.ENamedElementImpl.setName
org.eclipse.emf.ecore.sdo.util.SDOUtil.adaptType</pre></div><h3 class="""heading-1-1"""><span id="""HTracingMethodEntryandExit""">Tracing Method Entry and Exit</span></h3><div class="""paragraph""">Using the "-Xtrace" syntax, entry and exit trace is generated using the "methods" option, while stack trace is generated using "trigger" options. Following the "-Xtrace" documentation:<br />
<ul class="""star"""><li>To generate method trace to standard output, "print=mt" must be specified together with method specifications of the target constructor and methods.</li>
<li>The method specification places "/" between package names and between a package name and a class name, with "." between a class name and a method name.</li>
<li>To include parameter values in the trace, the method specifications are specified with a "()" suffix.</li>
<li>A wild card syntax is available, but since specific methods are targetted, this example does not use wild cards.</li>
</ul>Following these guidelines, the target constructor and methods are specified as:<div class="""paragraph"""><div class="""code"""><pre>org/eclipse/emf/ecore/impl/EClassifierImpl.<init>()
org/eclipse/emf/ecore/impl/ENamedElementImpl.setName()
org/eclipse/emf/ecore/sdo/util/SDOUtil.adaptType()</pre></div><div class="""paragraph""">Combining these method specifications with the "print=mt" constant value and with "-Xtrace" and "methods" option generates:<div class="""paragraph"""><div class="""code"""><pre>-Xtrace:print=mt,methods={org/eclipse/emf/ecore/impl/EClassifierImpl.<init>(),org/eclipse/emf/ecore/impl/ENamedElementImpl.setName(),org/eclipse/emf/ecore/sdo/util/SDOUtil.adaptType()}</pre></div><div class="""paragraph""">Notes:<br />
<ol><li>A constructor is specified the same as a method, but using "<init>" as the method name.</li>
<li>No syntax is available to select among multiple constructors for the same class, nor to select among several methods having different parameters.</li>
<li>No syntax is available to restrict a method to invocations on a subclass. In the example, the interest is in "setName" on "EClassifierImpl" instances, but "setName" is implemented on "ENamedElementImpl".</li>
<li>No syntax for selecting static methods or static initialization is currently known.</li>
</ol><h3 class="""heading-1-1"""><span id="""HDisplayingStacks""">Displaying Stacks</span></h3><div class="""paragraph""">Stack trace is generate using the "trigger" option and specifying "jstacktrace" as the trigger action. Combining the method specifications with these options generates:<div class="""paragraph"""><div class="""code"""><pre>-Xtrace:print=mt,trigger=method{org/eclipse/emf/ecore/impl/EClassifierImpl.<init>,jstacktrace}
-Xtrace:print=mt,trigger=method{org/eclipse/emf/ecore/sdo/util/SDOUtil.adaptType,jstacktrace}</pre></div><div class="""paragraph""">For simplicity, the method specifications are presented using two distinct -Xtrace command line stanzas.<br />
<h3 class="""heading-1-1"""><span id="""HCompletedCommandLineOptions""">Completed Command Line Options</span></h3><div class="""paragraph""">The completed command line options are:<div class="""paragraph"""><div class="""code"""><pre>-Xtrace:print=mt,methods={org/eclipse/emf/ecore/impl/EClassifierImpl.<init>(),org/eclipse/emf/ecore/impl/ENamedElementImpl.setName(),org/eclipse/emf/ecore/sdo/util/SDOUtil/adaptType()}
-Xtrace:print=mt,trigger=method{org/eclipse/emf/ecore/impl/EClassifierImpl.init,jstacktrace}
-Xtrace:print=mt,trigger=method{org/eclipse/emf/ecore/sdo/util/SDOUtil/adaptType,jstacktrace}</pre></div><div class="""paragraph""">Notes:<br />
<ol><li>These options may be combined into a single -Xtrace stanza.</li>
<li>The rules for the use of "print=mt" are unclear. Available documentation presents this as required text when outputting to Standard Output.<ol><li>The option "iprint=mt" may also be used when outputting to Standard Output. "iprint=mt" adds indentation to the output.</li>
</ol></li>
<li>To redirect output to a file, the option "output" may be used. This writes to a binary format which must be decoded, for example, using "com.ibm.jvm.format.TraceFormat" which is provided with the JDK. See the linked documentation for additional details on using "output" and on displaying the binary encoded output.</li>
<li>The -Xtrace syntax must be followed <strong class="""strong""">exactly</strong>. Errors in the -Xtrace options can cause the JVM to fail to start. An error will be displayed. The error <strong class="""strong""">might</strong> describe the -Xtrace syntax. The error might indicate that the JVM initialization failed, with no clear tie to the fautly -Xtrace stanza.</li>
</ol><h3 class="""heading-1-1"""><span id="""HSettingtheServerConfiguration""">Setting the Server Configuration </span></h3><div class="""paragraph""">These are specified to the IBM WebSphere Application Server process through the generic JVM arguments attribute, using either the Administrative Console (admin console), or using the Administrative Scripting Client (wsAdmin). This attribute is specified through a "JavaVirtualMachine" entry within a "ProcessDefinition" entry. With no other generic JVM arguments specified, the XML text shows as:<div class="""paragraph"""><div class="""code"""><pre>genericJvmArguments=<span class="""java-quote""">"-Xtrace:print=mt,methods={org/eclipse/emf/ecore/impl/EClassifierImpl.<init>(),org/eclipse/emf/ecore/impl/ENamedElementImpl.setName(),org/eclipse/emf/ecore/sdo/util/SDOUtil.adaptType()} -Xtrace:print=mt,trigger=method{org/eclipse/emf/ecore/impl/EClassifierImpl.<init>,jstacktrace} -Xtrace:print=mt,trigger=method{org/eclipse/emf/ecore/sdo/util/SDOUtil.adaptType,jstacktrace}"</span></pre></div><div class="""paragraph""">For example, the XML text within the JVM entry shows as:<div class="""paragraph"""><div class="""code"""><pre><jvmEntries xmi:id=<span class="""java-quote""">"JavaVirtualMachine_1183122130078"</span>
verboseModeClass=<span class="""java-quote""">"<span class="""java-keyword""">false</span>"</span>
verboseModeGarbageCollection=<span class="""java-quote""">"<span class="""java-keyword""">false</span>"</span>
verboseModeJNI=<span class="""java-quote""">"<span class="""java-keyword""">false</span>"</span>
runHProf=<span class="""java-quote""">"<span class="""java-keyword""">false</span>"</span>
hprofArguments=<span class="""java-quote""">""</span>
debugMode=<span class="""java-quote""">"<span class="""java-keyword""">false</span>"</span>
debugArgs=<span class="""java-quote""">"-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=7782"</span><div class="""paragraph""">genericJvmArguments=<span class="""java-quote""">"-Xtrace:print=mt,methods={org/eclipse/emf/ecore/impl/EClassifierImpl.<init>,org/eclipse/emf/ecore/impl/ENamedElementImpl.setName(),org/eclipse/emf/ecore/sdo/util/SDOUtil.adaptType()} -Xtrace:print=mt,trigger=method{org/eclipse/emf/ecore/impl/EClassifierImpl.init,jstacktrace} -Xtrace:print=mt,trigger=method{org/eclipse/emf/ecore/sdo/util/SDOUtil.adaptType,jstackTrace}"</span>><div class="""paragraph"""><systemProperties xmi:id=<span class="""java-quote""">"Property_1"</span> name=<span class="""java-quote""">"propertyName_1"</span> value=<span class="""java-quote""">"propertyValue_1"</span> required=<span class="""java-quote""">"<span class="""java-keyword""">false</span>"</span>/>
<systemProperties xmi:id=<span class="""java-quote""">"Property_2"</span> name=<span class="""java-quote""">"propertyName_2"</span> value=<span class="""java-quote""">"propertyValue_2"</span> required=<span class="""java-quote""">"<span class="""java-keyword""">true</span>"</span>/><div class="""paragraph"""></jvmEntries></div></div></div></pre></div><div class="""paragraph"""><div class="""clear"""> </div></div></div></div><br />
<br />
Rohit Kelapurehttp://www.blogger.com/profile/12988550581111360779noreply@blogger.com0tag:blogger.com,1999:blog-6741080397454890783.post-5475423785712795682013-09-26T08:40:00.003-07:002013-09-26T10:40:04.811-07:00Cloud Foundry track at SpringOne 2013 Notes<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
The cloud foundry track at <a href="http://springone2gx.com/">SpringOne</a> 2013 had a number of excellent sessions on cloud foundry<br />
<div>
<br /></div>
<div>
<div>
Building Spring Applications on Cloud Foundry<br />
<i><span style="font-size: x-small;">Joshua Long & Andy Piper</span></i></div>
</div>
<div>
<div>
<br /></div>
<div>
Build Your Very Own Private Cloud Foundry<br />
<div style="display: inline !important;">
<i style="font-style: italic;"><span style="font-size: x-small;">Matt Stine</span></i></div>
<i style="font-style: italic;">
</i></div>
</div>
<div>
<div style="display: inline !important;">
<div>
<br /></div>
<div>
Inside Cloud Foundry: An Architectural Review<span style="font-style: italic;"> </span><br />
<i><span style="font-size: x-small;">Christophe Levesque, Scott Motte, & Dekel Tankel</span></i></div>
</div>
</div>
<div>
<div>
<br /></div>
<div>
Free Yourself with CloudFoundry: A Private Cloud Experience<span style="font-style: italic;"> </span><br />
<i><span style="font-size: x-small;">Mike Heath, Shawn Nielsen, & Mike Youngstrom</span></i><span style="font-style: italic;"></span></div>
<div style="font-style: italic;">
<i>
</i></div>
</div>
<div>
<div style="display: inline !important;">
<div>
<br /></div>
<div>
Extending Cloud Foundry with Custom Integration<br />
<i style="font-size: small;">Cornelia Davis & </i><span style="font-size: x-small;">Scott </span><span style="font-size: x-small; font-style: italic;">Frederick</span></div>
</div>
</div>
<div>
<i><br /></i></div>
<div>
<i>I have uploaded the notes taken at these sessions by <b><a href="http://www.linkedin.com/pub/john-mackoy/1/282/813">John Mackoy</a></b> who did an excellent job capturing all the information and subtext provided at these sessions</i></div>
<div>
<i><br /></i></div>
<div>
<i><a href="https://docs.google.com/file/d/0B0WRv31xcRmabHpxb3poU3E4OXc/edit?usp=sharing">https://docs.google.com/file/d/0B0WRv31xcRmabHpxb3poU3E4OXc/edit?usp=sharing</a></i></div>
</div>
Rohit Kelapurehttp://www.blogger.com/profile/12988550581111360779noreply@blogger.com0tag:blogger.com,1999:blog-6741080397454890783.post-19294617198545747542013-09-25T10:27:00.002-07:002013-09-26T10:40:36.699-07:00Liberty and Cloud Foundry - a union made in heaven<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="text-align: justify;">
<br />
Recently I had a chance to visit Santa Clara and participate in the<b> Cloud Foundry platform summit</b>. <a href="http://www.platformcf.com/">http://www.platformcf.com/</a> One of the major announcements in the summit was the adoption of CF as IBMs open PaaS platform. We also introduced and open sourced the Liberty buildpack that allows cloud foundry developers to push their applications to WebSphere Application Server Liberty profile see <a href="http://blog.cloudfoundry.com/2013/09/09/ibm-websphere-liberty-buildpack-contributed-to-cloud-foundry/">http://blog.cloudfoundry.com/2013/09/09/ibm-websphere-liberty-buildpack-contributed-to-cloud-foundry/</a> The blog post does a very nice post of explaining why we chose cloud foundry and specifically why Liberty is such a good fit for deployment of apps in CF. It also provides guidance on future direction for evolution of the buildpack.</div>
<div style="text-align: justify;">
<br /></div>
I have collected a bunch of links that explain the goings-on at the conference. So if you want to get caught up on what happened go to -<br />
<a href="http://www.thisweekincf.com/blog/2013/09/05/this-week-in-cloud-foundry-september-5/">http://www.thisweekincf.com/blog/2013/09/05/this-week-in-cloud-foundry-september-5/</a><br />
<a href="http://osintegrators.com/platformcf-dayone">http://osintegrators.com/platformcf-dayone </a><br />
<a href="http://osintegrators.com/platformcf-daytwo">http://osintegrators.com/platformcf-daytwo</a> <br />
<a href="http://blog.cloudfoundry.com/2013/09/09/ibm-websphere-liberty-buildpack-contributed-to-cloud-foundry/">http://blog.cloudfoundry.com/2013/09/09/ibm-websphere-liberty-buildpack-contributed-to-cloud-foundry/ </a><br />
<a href="http://fbflex.wordpress.com/2013/09/13/springone-2gx-2013-summary/#more-1603">http://fbflex.wordpress.com/2013/09/13/springone-2gx-2013-summary/#more-1603</a> <br />
<br />
All the presentations made at the platform cloud foundry conference can be found here ...<br />
<a href="http://www.slideshare.net/platformcf/">http://www.slideshare.net/platformcf/</a><br />
<iframe allowfullscreen="" frameborder="0" height="356" marginheight="0" marginwidth="0" mozallowfullscreen="" scrolling="no" src="http://www.slideshare.net/slideshow/embed_code/26330738?rel=0" style="border-width: 1px 1px 0; border: 1px solid #CCC; margin-bottom: 5px;" webkitallowfullscreen="" width="427"> </iframe> <br />
<div style="margin-bottom: 5px;">
<strong> <a href="https://www.slideshare.net/platformcf/go-within-cloud-foundry" target="_blank" title="Go Within Cloud Foundry">Go Within Cloud Foundry</a> </strong> from <strong><a href="http://www.slideshare.net/platformcf" target="_blank">Platform CF</a></strong> </div>
<br />
<br />
Comprehensive notes on all the platform cf sessions taken by <a href="http://www.linkedin.com/pub/john-mackoy/1/282/813">John Mackoy</a> can be found here<br />
<iframe src="https://docs.google.com/document/d/183Ndy6Z5n7Odk_SEgVWELvAbQu0mgJeb3QCtpb9dLKM/pub?embedded=true"></iframe><br />
<a href="https://docs.google.com/document/d/183Ndy6Z5n7Odk_SEgVWELvAbQu0mgJeb3QCtpb9dLKM/pub">https://docs.google.com/document/d/183Ndy6Z5n7Odk_SEgVWELvAbQu0mgJeb3QCtpb9dLKM/pub</a><i> </i></div>
Rohit Kelapurehttp://www.blogger.com/profile/12988550581111360779noreply@blogger.com0tag:blogger.com,1999:blog-6741080397454890783.post-27774648128674378892013-07-02T09:28:00.001-07:002013-07-02T12:43:12.868-07:00Getting IBM JDK -Xtrace option to work in the Eclipse IDE<div dir="ltr" style="text-align: left;" trbidi="on">
<i><br /></i>
<i>Courtesy WebSphere Serviceability guru <b style="background-color: lime;">Ann Paungam</b> ...</i><br />
<i><br /></i>
When doing eclipse RCP development with the IBM JDK or simply when you are running eclipse it is necessary to understand the complete stacktrace of a particular exception. In order to make this happen you will need to add the -Xtrace options to the eclipse.ini file of your eclipse client like so<br />
<br />
<span style="font-family: Courier New, Courier, monospace;"><b style="background-color: yellow;">-Xtrace:maximal=mt,methods={org/eclipse/core/runtime/preferences/InstanceScope.getNode},trigger=method{org/eclipse/core/runtime/preferences/InstanceScope.getNode,javadump,,,5}</b></span><br />
<span style="font-family: Courier New, Courier, monospace;"><b style="background-color: yellow;"><br /></b></span>
<span style="font-family: Courier New, Courier, monospace;"><b style="background-color: yellow;">-Xtrace:maximal=mt,methods={org/eclipse/core/runtime/preferences/InstanceScope.InstanceScope},trigger=method{org/eclipse/core/runtime/preferences/InstanceScope.InstanceScope,javadump,,,5}</b></span><br />
<span style="font-family: Courier New, Courier, monospace;"><b style="background-color: yellow;"><br /></b></span>
<span style="font-family: Courier New, Courier, monospace;"><b style="background-color: yellow;">-Xtrace:maximal=mt,methods={org/eclipse/core/resources/ResourcesPlugin.getWorkspace},trigger=method{org/eclipse/core/resources/ResourcesPlugin.getWorkspace,javadump,,,5}</b></span><br />
<br />
<span style="font-family: inherit;">These will capture all java stack traces when InstanceScope.getNode method InstanceScope.InstanceScope constructor and ResourcesPlugin.getWorkspace are called. This will only work with the IBM JDKs or JREs and is extremely useful when developing in eclipse or developing RCP applications for eclipse. </span><br />
<span style="font-family: inherit;"><br /></span>
<div style="text-align: left;">
<span style="font-family: inherit;"><span style="background-color: white; font-size: 16.363636016845703px;">By default, the javacores are generated to the Eclipse Home directory (eg: where the Eclipse.exe is located). The value "5" in the last parameter for the example above is to limit the number of javacores that are generated to just 5. Refer to the official JDK documentation applicable to your release, such as the link below, for the various options that can be used to control your jvm tracing:</span></span></div>
<span style="font-family: inherit;"><span style="background-color: white; font-size: 16.363636016845703px;"><a href="http://publib.boulder.ibm.com/infocenter/javasdk/v1r4m2/index.jsp?topic=%2Fcom.ibm.java.doc.diagnostics.142j9%2Fhtml%2Fjvmtrdrcontrol.html&path=1_5_10_3_1">http://publib.boulder.ibm.com/infocenter/javasdk/v1r4m2/index.jsp?topic=%2Fcom.ibm.java.doc.diagnostics.142j9%2Fhtml%2Fjvmtrdrcontrol.html&path=1_5_10_3_1</a></span></span><br />
</div>
Rohit Kelapurehttp://www.blogger.com/profile/12988550581111360779noreply@blogger.com0tag:blogger.com,1999:blog-6741080397454890783.post-55495802094201081782013-06-04T14:40:00.001-07:002013-06-04T14:51:19.739-07:00DynaCache in WebSphere Application Server Liberty Profile 8.5.5<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<iframe allowfullscreen="" frameborder="0" height="356" marginheight="0" marginwidth="0" mozallowfullscreen="" scrolling="no" src="http://www.slideshare.net/slideshow/embed_code/22451673" style="border-width: 1px 1px 0; border: 1px solid #CCC; margin-bottom: 5px;" webkitallowfullscreen="" width="427"> </iframe> <br />
<div style="margin-bottom: 5px;">
<strong> <a href="http://www.slideshare.net/kelapure/liberty-dynacache-ffwieaste" target="_blank" title="Liberty dynacache ffw_iea_ste">Liberty dynacache ffw_iea_ste</a> </strong> from <strong><a href="http://www.slideshare.net/kelapure" target="_blank">kelapure</a></strong> </div>
<br /></div>
Rohit Kelapurehttp://www.blogger.com/profile/12988550581111360779noreply@blogger.com0tag:blogger.com,1999:blog-6741080397454890783.post-82475096724388181192013-05-02T10:27:00.001-07:002013-05-02T10:31:18.904-07:00IBM WebSphere Application Server V8.5.5 enhanced Liberty profile <div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<div style="text-align: justify;">
Delivers enhanced Liberty profile capabilities and introduces a new lightweight Liberty only offering for Web Profile applications</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<b>Introduces a new Liberty profile-only </b><b>solution. The WebSphere Application Server Liberty Core edition is built to leverage </b><b>the lightweight and dynamic aspects of the Liberty profile. Scoped to the capabilities </b><b>of Web Profile applications, the new edition is ideal for lightweight production </b><b>servers.</b></div>
<br />
<i>Enhancements to the Liberty profile are as follows:</i><br />
<i><br /></i>
• Certification to the JEE 6 Web Profile, providing the assurance that applications leverage standards-compliant programming models<br />
• Additional programming models such as web services that enable the expansion of Liberty profile applications beyond web applications<br />
• New messaging capabilities, including support for JMS and message-driven beans, and a new single server message provider<br />
• Ability to add Liberty features through a new system programming interface, enabling the customization of Liberty profile capabilities to meet your business needs through insertion of custom Liberty features<br />
• Support for the NoSQL database MongoDB, a scalable, well-performing, and easy-to-use document-style NoSQL database<br />
• Enhancement to security support, such as federated repositories, custom user registry, trust association interceptor, password hashing, and encryption of passwords in server configurations, which improves security for Liberty application deployments<br />
• High Performance Extensible Logging (HPEL) for Liberty servers, which enables better administration and serviceability<br />
• New Liberty administration features<br />
• Clustering of server instances<br />
• Support for caching via the WebSphere Web Cache (DynaCache) and distributed caching with WebSphere eXtreme Scale<br />
• Ability to install the entitled WebSphere Application Server edition on developer<br />
machines for development and unit testing purposes•<br />
• WebSphere Application Server V8.5.5 tooling bundles updated with Rational®<br />
Application Developer (RAD) V9 and the WebSphere Application Server Developer<br />
Tools (WDT) V8.5.5<br />
<br />
For details see <a href="http://www.ibm.com/common/ssi/cgi-bin/ssialias?infotype=AN&subtype=CA&appname=gpateam&supplier=897&letternum=ENUS213-137&pdf=yes">http://www.ibm.com/common/ssi/cgi-bin/ssialias?infotype=AN&subtype=CA&appname=gpateam&supplier=897&letternum=ENUS213-137&pdf=yes</a></div>
Rohit Kelapurehttp://www.blogger.com/profile/12988550581111360779noreply@blogger.com0tag:blogger.com,1999:blog-6741080397454890783.post-57114945835288375752013-05-02T10:16:00.000-07:002013-05-02T10:24:36.287-07:00Why should I use WebSphere Application Server core Liberty over Tomcat "kitchen sink" server ?<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<span style="color: red;">Scenario : </span><br />
<div style="text-align: justify;">
<i>A customer started with an 8MB Tomcat runtime for web apps , but by the time the dev teams added in their "stuff" it turned into 60 MB "kitchen sink" type app server.. It includes may jars which one might expect to use to develop modern web apps which is fine because we expect customers to bundle those with the app. BUT it also contains a fairly complete set of jars that comprise a middleware server (web services, jms, ...) </i><br />
<i><br /></i>
<i><b>Why should I choose WebSphere Application Server Liberty over my homegrown tomcat solution</b></i></div>
<br />
Following is a comparison of <a href="http://www-01.ibm.com/common/ssi/ShowDoc.wss?docURL=/common/ssi/rep_ca/7/897/ENUS213-137/index.html&lang=en&request_locale=en">Liberty </a>vs a homegrown Tomcat "kitchen sink" type server.<br />
<br />
<b>Server provisioning:</b><br />
- Liberty, by design, allows you to include only the features you need for your applications .<br />
- Liberty "minify" will subset the runtime for you, based on the configuration of the server<br />
- produces a deployable binary server<br />
- Homegrown is monolithic, will require significant manual effort and testing to figure out how to get back to "right-sized" server environment<br />
-Or customer will need to always deploy the 60MB homegrown server<br />
<br />
- Liberty - configuration changes are dynamic - don't require server restart (i.e. jms, jdbc, vips)<br />
- Homegrown - configuration changes will probably require restart<br />
<br />
- Liberty - all the configuration goes in server.xml (or xml files included by server.xml) at customer's choice<br />
-unique properties can be managed external to the server.xml, which allows customization per environment (Dev, FVT, Prod, ...)<br />
- Homegrown - all the packages added to Tomcat will have their own config method/files<br />
<br />
- Liberty log / trace files are consolidated<br />
- Trace setting are consistent across components<br />
- Homegrown will have logs/traces in multiple locations<br />
- Homegrown components will NOT have trace setting suitable for production debug<br />
<br />
<b>Extensibility:</b><br />
- Liberty runtime can be extended by adding features in an architectural fashion, consistent with IBM developed features<br />
- Can create wrapper for 3rd party libraries which allows configuration of the new "feature" consistent with IBM developed features<br />
- Homegrown only allows ad-hoc integrations of 3rd party jars<br />
<br />
<b>Dynamicity: </b><br />
- Liberty - config changes are dynamic - don't require server restart (i.e. jms, jdbc, vip settings)<br />
- Homegrown, - config changes will probably require restart<br />
<b><br /></b>
<b>Support</b><br />
Liberty is fully supported by IBM<br />
Homegrown? middleware support team + App teams + OSS communities<br />
OSS communities (or public individuals) don't provide formal support. Its based on best effort and interest as determined by the particular community / individual<br />
<br />
<br />
Liberty - In the service stream Liberty has strict backward compatibility requirements<br />
- no regressions on service releases<br />
- new behaviors in service must be intentionally enabled by customer<br />
Homegrown - Open Source communities don't adhere to strict backward compatibility. <br />
<b><br /></b>
<b>Standards:</b><br />
Liberty APIs are primarily based on open standards, allowing flexibility and a wider range of applications to work.<br />
Homegrown - some APIs are based on standards but many are not. (i.e. "stax-2" is not a standard)<br />
<br />
<b>Licensing</b><br />
- Liberty - IBM vet's all the OSS that we deliver and the code we develop.<br />
- Homegrown - due diligence is customers responsibility<br />
<br />
<b>Security differences</b><br />
- Liberty supports hashing/encryption of passwords in config, can be kept in separate property file<br />
- Supports seamless integration with Tivoli and other authentication and authorizaton products.<br />
- Homegrown security is likely to be a hodge podge of custom integration with different vendors.<br />
<b><br /></b>
<b>Application Deployment</b><br />
- Liberty allows automatic "drop in" of new app versions. No server restart required.<br />
- Homegrown - Tomcat allows "drop in" deployment, but most likely the extensions do not<br />
<br />
<b>Central server management</b><br />
Liberty collective will allow customer to build large administrative clusters<br />
- i.e. start, stop, update config sent to LibertyController which updates all servers in the collective<br />
Homegrown - customer would need to develop management framework<br />
<br />
<b>Performance </b><br />
Liberty is significantly better than Tomcat<br />
<br />
<br /></div>
Rohit Kelapurehttp://www.blogger.com/profile/12988550581111360779noreply@blogger.com0tag:blogger.com,1999:blog-6741080397454890783.post-14196262147839854542013-05-02T09:54:00.000-07:002013-05-08T05:32:20.533-07:00Project Icap<div dir="ltr" style="text-align: left;" trbidi="on"><br />
In case you are wondering where I have been all these months. I have taken a new job within IBM as a senior developer working on Cloud based application platform and services.<br />
<br />
We just released Project Icap at IMPACT 2013<br />
See <a href="https://www.ibm.com/developerworks/community/blogs/icap/entry/home?lang=en">https://www.ibm.com/developerworks/community/blogs/icap/entry/home?lang=en</a></div><br />
<iframe src="http://www.slideshare.net/slideshow/embed_code/20798523" width="427" height="356" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" style="border:1px solid #CCC;border-width:1px 1px 0;margin-bottom:5px" allowfullscreen webkitallowfullscreen mozallowfullscreen> </iframe> <div style="margin-bottom:5px"><strong> <a href="http://www.slideshare.net/kelapure/1812-icapv13-0430" title="1812 icap-v1.3 0430" target="_blank">1812 icap-v1.3 0430</a> </strong> from <strong><a href="http://www.slideshare.net/kelapure" target="_blank">kelapure</a></strong> </div>Rohit Kelapurehttp://www.blogger.com/profile/12988550581111360779noreply@blogger.com0tag:blogger.com,1999:blog-6741080397454890783.post-59298097665798037942013-01-08T09:03:00.004-08:002013-01-08T09:03:40.614-08:00HAManager Questions <div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<i><b>Question</b> Should we use dedicated JVMs as HA coordinators. And if so are the recommendations different between WAS versions 7.0, 8.0 and 8.5? </i><br />
Yes.<br />
Recommendations are same across v7 and v85<br />
It is a best practice to configure one or more preferred coordinator processes for each core group. This limits the movement of the coordinator and number of state rebuilds.<br />
Configuring preferred coordinators is a best practice.<br />
Ideally, assign processes that do not host applications and are located on machines with spare capacity as preferred coordinators.<br />
<a href="http://www3.software.ibm.com/ibmdl/pub/software/dw/wes/0710_largetopologies/LargeWebSphereTopologies.pdf">http://www3.software.ibm.com/ibmdl/pub/software/dw/wes/0710_largetopologies/LargeWebSphereTopologies.pdf</a><br />
<div>
<br /></div>
<div>
<div>
<i><b>Question </b></i><i>Should we enable HA for applications that utilize ejb, XA, Websphere MQ, or sibbus? And if so are the recommendations different between WAS versions 7.0, 8.0 and 8.5? What are the benefits of enabling it? Are there any concerns? </i></div>
<div>
<a href="http://pic.dhe.ibm.com/infocenter/wasinfo/v6r1/topic/com.ibm.websphere.nd.doc/info/ae/ae/trun_ha_ham_enable.html">http://pic.dhe.ibm.com/infocenter/wasinfo/v6r1/topic/com.ibm.websphere.nd.doc/info/ae/ae/trun_ha_ham_enable.html</a></div>
<div>
<a href="http://pic.dhe.ibm.com/infocenter/wasinfo/v6r1/topic/com.ibm.websphere.nd.doc/info/ae/ae/crun_ha_ham_required.html">http://pic.dhe.ibm.com/infocenter/wasinfo/v6r1/topic/com.ibm.websphere.nd.doc/info/ae/ae/crun_ha_ham_required.html</a></div>
<div>
<div>
<br /></div>
<div>
The components that use HA services in WAS are </div>
<div>
<ol style="text-align: left;">
<li>EJB workload management</li>
<li>JMS workload management</li>
<li>On-demand configuration routing</li>
<li>Data replication service</li>
<ul>
<li>HTTP Session distribution when using memory to memory replication</li>
<li>Dynamic cache distribution, when using memory to memory replication</li>
<li>Stateful session bean failover, which relies on memory to memory replication</li>
<li>Session Initiation Protocol (SIP)</li>
</ul>
</ol>
</div>
<div>
If you need any of these workload management, replication and routing services then you need to enable HAM on the cluster. The downside to enabling HAM is increased CPU activity across all the cluster JVMs and increase in network chatter due to data replication across JVMs. Logs get filled with HAM membership messages as servers come up and down. Recommendations are same across v7 and v8.5</div>
</div>
</div>
<div>
<br /></div>
<div>
<br /></div>
</div>
Rohit Kelapurehttp://www.blogger.com/profile/12988550581111360779noreply@blogger.com0tag:blogger.com,1999:blog-6741080397454890783.post-2116662444374008882012-11-01T13:45:00.003-07:002012-11-01T13:46:22.652-07:00WebSphere Portal and Content Manager integration with WebSphere eXtreme Scale<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
If you want to configure WebSphere Portal Server to leverage WebSphere eXtreme Scale such that all the dynacache instances offload the cache data to Dynacache please go through the presentation below and the article.<br />
<br />
<iframe frameborder="0" height="400" marginheight="0" marginwidth="0" scrolling="no" src="http://www.slideshare.net/slideshow/embed_code/14987332" width="476"></iframe><br />
<br />
Using WebSphere eXtreme Scale to enhance WebSphere Portal and IBM Web Content Manager performance<br />
<a href="http://www.ibm.com/developerworks/websphere/techjournal/1206_inreach/1206_inreach.html">http://www.ibm.com/developerworks/websphere/techjournal/1206_inreach/1206_inreach.html</a></div>
Rohit Kelapurehttp://www.blogger.com/profile/12988550581111360779noreply@blogger.com0tag:blogger.com,1999:blog-6741080397454890783.post-25575962882312440342012-10-11T10:36:00.007-07:002012-10-11T10:39:45.560-07:00Interruptible Thread Infrastructure - WebSphere Application Server on zOS<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
WebSphere Application Server on zOS in v7 introduced dispatch timeout improvements. This is a long way of saying that on zOS when a thread times out waiting on a connection or reading data from a socket, zOS, WAS and the JDK can nudge the request along. Read more <a href="http://www-03.ibm.com/support/techdocs/atsmastr.nsf/c6192fb3a432612485256d970082de57/3c02b79e79ea32fd8625751a005d7f63/$FILE/WP101374%20-%20WebSphere%20zOS%20V7%20Dispatch%20Timeout%20Improvements.pdf">here</a>. This is also called ITI (Interruptible Thread Infrastructure). We love acronyms in IBM :-) This dispatched thread interruption applies to ALL stalled threads, even those consuming excessive CPU.<br />
<br />
So how does one set up ITI, ? You get ITI by default IF you do NOT have recovery set to session.<br />
<br />
<i>Remove the following JVM custom properties </i><br />
<div style="font-family: "Courier New",Courier,monospace;">
protocol_http_timeout_output_recovery SESSION<br />
protocol_https_timeout_output_recovery SESSION</div>
<i><br /></i>
<i>Add the following properties </i><br />
<span style="font-family: "Courier New",Courier,monospace;">protocol_http_timeout_output_recovery Servant</span><br />
<span style="font-family: "Courier New",Courier,monospace;">protocol_https_timeout_output_recovery Servant</span><br />
<span style="font-family: "Courier New",Courier,monospace;">server_region_stalled_thread_threshold_percent 80</span><br />
<br />
There are also some other cool features like the <b>MODIFY,DISPLAY, THREADS</b> command<br />
<br />
<span style="font-family: "Courier New",Courier,monospace;">MODIFY <server>,DISPLAY,THREADS,TIMEDOUT,DETAILS</server></span><br />
<span style="font-family: "Courier New",Courier,monospace;">MODIFY <server>,DISPLAY,THREADS,AGE=30,DETAILS </server></span><br />
<br />
This command, which offers both a SUMMARY and DETAILS format, displays information about server activity, which you can use for identifying requests that run longer than expected.<br />
<br />
Another favorite runtime monitoring and introspection feature of mine is the <b>Dispatch Progress Monitor</b>. In the flood of trace output from hundreds or thousands of requests, it is difficult to find traces related to the occasional long running request. This is where DPM helps as it can be enabled/disabled at runtime.<br />
<br />
To enable the DPM, enter the MODIFY command, as follows:<br />
<span style="font-family: "Courier New",Courier,monospace;">MODIFY <server>,DPM, xxxx=<interval></interval></server></span><br />
<div style="font-family: "Courier New",Courier,monospace;">
MODIFY <server>,DPM,DUMP_ACTION=JAVACORE</server></div>
default dump action is the TRACEBACK.<br />
<br />
Here is an example with the dump action set to TRACEBACK (and formatted for readability):<br />
<span style="font-size: small;"><span style="font-family: "Courier New",Courier,monospace;">BBOJ0118I: ThreadDetails: ASID = 005B, TCB = 0X008CBE88, Request = fffff503,</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;">Is JVM Blocked = false, Tried to interrupt = false, Given up = false,</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;">Internal Work Thread = false, Hung Reason = Not Hung,</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;">SR Dispatch Time = 2008/05/05 12:15:31.371625,</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;">CTL Receive Time = 2008/05/05 12:15:31.366693,</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;">CTL Queued to WLM Time = 2008/05/05 12:15:31.371328,</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;">Details = , ODI Details = .JVM INTERRUPTIBLE THREAD, Monitor ACTIVE.</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;"> </span></span><br />
<span style="font-size: small;"><span style="font-family: "Courier New",Courier,monospace;">BBOJ0117I: JAVA THREAD STACK TRACEBACK FOR THREAD WebSphere:ORB.thread.pool</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;">t=008cbe88: Dispatch Progress Monitor</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;">Traceback for thread WebSphere:ORB.thread.pool t=008cbe88:</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;">com.ibm.ws390.orb.ClientDelegate.invokeRequestCFW(Native Method)</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;">com.ibm.ws390.orb.ClientDelegate.commonInvoke(ClientDelegate.java:998)</span></span><br />
<br /></div>
Rohit Kelapurehttp://www.blogger.com/profile/12988550581111360779noreply@blogger.com0tag:blogger.com,1999:blog-6741080397454890783.post-87213520667022699612012-10-11T10:07:00.002-07:002012-10-11T10:10:33.732-07:00Servlet filter for updating session attributes<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
Often times developers will put objects in session and modify them without calling javax.servlet.http.HttpSession.setAttribute(String, Object) or javax.servlet.http.HttpSession.removeAttribute(String).<br />
<br />
This is BAD because if session persistence is enabled the session manager does not know that the session is touched and fails to replicate to the persistence store. This persistence store can be another server, a database, a data grid or an appliance.<br />
<br />
To solve this problem I have written a servlet that forces a sync and writes out all the session attributes to the persistence store at the end of the servlet request.<br />
<br />
Take a look and download the src <a href="https://github.com/kelapure/dynacache/blob/master/SessionUpdateFilter.java">here </a>..<br />
If you will also need to add the following <a href="https://github.com/kelapure/dynacache/blob/master/web.xml">filter.xml</a> to your web.xml sorry not everyone is on servlet 3.0 :-) </div>
Rohit Kelapurehttp://www.blogger.com/profile/12988550581111360779noreply@blogger.com0tag:blogger.com,1999:blog-6741080397454890783.post-68400679842957494862012-10-10T10:26:00.003-07:002012-10-10T10:27:51.493-07:00Spring AspectJ vs Contexts and Dependency Injection Java EE6<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<br />
<i><span style="color: red;">The advantage of pointcuts in Spring is that we don’t have to change every individual piece of code we want to be notified about. We simply write the pointcut with a wildcard match. </span></i><span style="color: red;">JEE interceptors seem to be able to be configured using XML instead of annotations</span><br />
<br />
With CDI, Interceptors are defined and configured via annotations (@Interceptor and @InterceptorBinding) and are ONLY enabled via XML. In your case you will ONLY enable the FrameworkUsageInterceptor in the beans.xml file. You will have the following beans,xml in your application<br />
<div>
<br /></div>
<beans<br />
xmlns="http://java.sun.com/xml/ns/javaee"<br />
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"<br />
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee <br />
http://java.sun.com/xml/ns/javaee/beans_1_0.xsd"><br />
<interceptors><br />
<class>com.allstate.audit.FrameworkUsageInterceptor</class><br />
</interceptors><br />
</beans><br />
<br />
<span style="color: red;"><i>The nice thing then about AOP is that we can create some kind of cross cut notification of code use. The advantage of pointcuts in Spring is that we don’t have to change every individual piece of code we want to be notified about. We simply write the pointcut with a wildcard match. </i></span><br />
<br />
This can be done with Java EE CDI by creating a FrameworkLoggingInterceptor that intercepts ALL method invocations and applying the InterceptorBinding (say @FrameworkAudit) dynamically at runtime during application startup to all the application code. <a href="http://www.warski.org/blog/2011/03/timing-interceptor-for-cdiweld/">http://www.warski.org/blog/2011/03/timing-interceptor-for-cdiweld/</a> solves a similar problem and explains how to write a timing interceptor where the interceptor applies to any arbitrary code in the app. Code in the application is agnostic of the timing interceptor. You have to follow a very similar approach for your common framework audit interceptor. CDI extensions will work across application servers since they code to SPIs defined in the Java EE spec.<br />
<br />
You will be writing a CDI extension similar to how you will be writing java advice or a pointcut. the beans advised with AOP need to be annotated with @Service or @Component. The CDI extension does this automatically for you i.e. make all the application classes eligible for interception.<br />
<br />
<span style="color: red;">Another advantage to Spring AOP is that we can use it outside of a JEE container,</span><br />
<br />
CDI container can also be run standalone i.e. outside the container. Currently WAS does not support this client mode; however the CDI spec and other open source projects are all moving in this direction i.e. to define CDI behavior in a client container. see <a href="http://struberg.wordpress.com/2012/03/17/controlling-cdi-containers-in-se-and-ee/">http://struberg.wordpress.com/2012/03/17/controlling-cdi-containers-in-se-and-ee/</a> The reference implementation of CDI called Weld comes with a client container. Please also look at project <a href="http://www.jboss.org/arquillian.html">Arquillian</a> which makes testing with CDI and Java EE easy. My advice would be to stick with Java EE and do integration testing with httpunit or httpclient, You don't need to use arquillian or Weld. A standalone CDI container would have been nice for WAS.<br />
<br />
<div>
<br /></div>
</div>
Rohit Kelapurehttp://www.blogger.com/profile/12988550581111360779noreply@blogger.com0tag:blogger.com,1999:blog-6741080397454890783.post-72613505200550870172012-10-10T09:58:00.000-07:002012-10-10T10:01:32.894-07:00High Performance Extensible Logging (HPEL)<div dir="ltr" style="text-align: left;" trbidi="on">
WebSphere Application Server in WAS v8 introduced a feature called HPEL.<br />
<br />
Why should you chose HPEL over classic logging in WAS<br />
<b>pros:</b><br />
- HPEL allows to use one log format on both distributed and zOS WAS<br />
- HPEL allows you to rotate log files on zOS which could NOT be done with earlier versions of WAS.<br />
- HPEL improves performance by 33% on distributed<br />
- HPEL allows enhanced log and trace filtering by time, logger ids and other criteria<br />
- HPEL has a binary log format which leads to reduced log file sizes<br />
<b>cons:</b><br />
- HPEL has a binary log format which means you have to use a logViewer post processor tool to read the file in text<br />
<br />
Taking all these considerations we can clearly see that HPEL is badass and should be preferred over classic logging in WAS v8 and beyond.<br />
<br />
<br /></div>
Rohit Kelapurehttp://www.blogger.com/profile/12988550581111360779noreply@blogger.com0tag:blogger.com,1999:blog-6741080397454890783.post-73535972447007459892012-10-10T09:51:00.003-07:002012-10-10T09:53:29.262-07:00How to improve RAD performance during publishing of application files<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
Ensure that your projects are single-rooted. Projects that are single-rooted can be directly consumed by WebSphere Application Server. If the project is not single-rooted, it needs to be copied as part of the publishing operation. If a project is not single-rooted, you see a warning message in the Marker's view.<br />
<br />
Minimize the number of Java archives (JARs) in the WEB-INF/lib directories. If the JAR is no longer needed, remove it. If you see that the same jar is repeated in many lib directories, see if it can be moved to a shared directory on the server.<br />
<br />
Start the test server in debug mode. This approach, which allows you to change the code by using the "hot method replace" and directly inserting the code into the running server, eliminates the need to perform a publish. There are cases where the Java virtual machine (JVM) cannot replace a method. In those cases, you get a warning message and then you need to publish the application.<br />
<br />
Use Remote Method Invocation (RMI) as the connection type, because no polling is involved.<br />
<br />
Remove unused applications. Removing unused applications shortens up your server start-up time.<br />
<br />
Turn off your server's security, which improves the start-up time for your server as well as improving your publish times.<br />
<br />
<b>Periodically clean out the server's wstemp and temp directories.</b><br />
<br />
Publish is an expensive operation because of all of the Rational Application Developer code, WebSphere Application Server code, and application code, for example, servlet destruction code, that must be processed. The best publish is no publish. It is best if you are in control of when publishes occur, so we recommend turning off automatic publishes. see figure<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjliHE0GSbel6LdB9_gQOu8YrnDAFLJlb8Q6yPX2aPr-cIsbNx0NLXyfD04cU-qIzv0TeD8aHMk5wrCJV5bdTVZgtFB2nyv37fXySklSJl71zpciRsC08aqaTYHJcODRtiL3RnSVXIFokpE/s1600/donotpublish.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjliHE0GSbel6LdB9_gQOu8YrnDAFLJlb8Q6yPX2aPr-cIsbNx0NLXyfD04cU-qIzv0TeD8aHMk5wrCJV5bdTVZgtFB2nyv37fXySklSJl71zpciRsC08aqaTYHJcODRtiL3RnSVXIFokpE/s1600/donotpublish.png" /></a></div>
<br />
Look at this <a href="http://www.redbooks.ibm.com/redbooks/SG247835/wwhelp/wwhimpl/api.htm?href=axb.htm">appendix </a>of links for faster RAD performance with WebSphere<br />
<ul style="text-align: left;">
<li><span class="Apple-tab-span" style="white-space: pre;"> </span><span style="background-color: yellow;">Better hardware </span></li>
<li><span style="background-color: yellow;"><span class="Apple-tab-span" style="white-space: pre;"> </span>Shared EARs (binary modules)</span></li>
<li><span style="background-color: yellow;"><span class="Apple-tab-span" style="white-space: pre;"> </span>Annotations</span></li>
<li><span style="background-color: yellow;"><span class="Apple-tab-span" style="white-space: pre;"> </span>Publishing</span></li>
<li><span style="background-color: yellow;"><span class="Apple-tab-span" style="white-space: pre;"> </span>Shorter build time by tuning validation</span></li>
<li><span style="background-color: yellow;"><span class="Apple-tab-span" style="white-space: pre;"> </span>Only install what you need</span></li>
<li><span style="background-color: yellow;"><span class="Apple-tab-span" style="white-space: pre;"> </span>No circular dependencies</span></li>
<li><span style="background-color: yellow;"><span class="Apple-tab-span" style="white-space: pre;"> </span>Using a remote test server</span></li>
<li><span style="background-color: yellow;"><span class="Apple-tab-span" style="white-space: pre;"> </span>Tuning your anti-virus program</span></li>
<li><span style="background-color: yellow;"><span class="Apple-tab-span" style="white-space: pre;"> </span>Defragmenting disks </span></li>
</ul>
</div>
Rohit Kelapurehttp://www.blogger.com/profile/12988550581111360779noreply@blogger.com0tag:blogger.com,1999:blog-6741080397454890783.post-69639284040521170932012-10-09T01:53:00.002-07:002012-10-09T02:01:30.210-07:00Golden nuggets of WebSphere Application Server Plugin Configuration<div dir="ltr" style="text-align: left;" trbidi="on">
Set <b style="background-color: white; font-family: arial, sans-serif; font-size: 12.800000190734863px;">LoadBalanceWeight</b><span style="background-color: white; font-family: arial, sans-serif; font-size: 12.800000190734863px;"> to a value other than default say 20. </span><span style="background-color: white; font-family: arial, sans-serif; font-size: 12.800000190734863px;"> I</span><span style="background-color: white; font-family: arial, sans-serif; font-size: 12.800000190734863px;">f there are 3 clones, you might choose the starting LoadBalanceWeights to be: 20, 20, 19. After normalization the weights will be unchanged. It is recommended that a</span><b style="background-color: white; font-family: arial, sans-serif; font-size: 12.800000190734863px;">ll clones have same weight except one clone off by one (for example: 20, 20, 19)</b><br />
<b style="background-color: white; font-family: arial, sans-serif; font-size: 12.800000190734863px;"><br />
</b> <b style="background-color: white; font-family: arial, sans-serif; font-size: 12.800000190734863px;">Set </b><span style="background-color: white; font-family: arial, sans-serif; font-size: 12.800000190734863px;">set </span><b style="background-color: white; font-family: arial, sans-serif; font-size: 12.800000190734863px;">IgnoreAffinityRequests="false".</b><span style="background-color: white; font-family: arial, sans-serif; font-size: 12.800000190734863px;">If using </span><b style="background-color: white; font-family: arial, sans-serif; font-size: 12.800000190734863px;">Round Robin</b><span style="background-color: white; font-family: arial, sans-serif; font-size: 12.800000190734863px;"> for the LoadBalance option, by default the affinity requests do NOT lower the </span><span style="background-color: white; font-family: arial, sans-serif; font-size: 12.800000190734863px;">LoadBalanceWeight</span><span style="background-color: white; font-family: arial, sans-serif; font-size: 12.800000190734863px;"> (IgnoreAffinityRequests="true"). This can cause an uneven distribution across the servers in environments that make use of session affinity. But, If IgnoreAffinityRequests="false" then the weight IS lowered by each affinity request, leading to a more balanced Round Robin environment. When using </span><b style="background-color: white; font-family: arial, sans-serif; font-size: 12.800000190734863px;">Random</b><span style="background-color: white; font-family: arial, sans-serif; font-size: 12.800000190734863px;">, the affinity requests are still handled correctly (sent to same cloneid as before). But new requests are routed randomly, and the LoadBalanceWeight is not used.</span><br />
<span style="background-color: white; font-family: arial, sans-serif; font-size: 12.800000190734863px;"><br />
</span> <span style="background-color: white; font-family: arial, sans-serif; font-size: x-small;"><ServerCluster CloneSeparatorChange="false" GetDWLMTable="true" <b>IgnoreAffinityRequests="false</b>" LoadBalance="Round Robin" Name="wp_cluster" PostBufferSize="64" PostSizeLimit="-1" RemoveSpecialHeaders="true" RetryInterval="60"></span><br />
<br style="background-color: white; font-family: arial, sans-serif; font-size: 14.800000190734863px;" />
<div>
<span style="background-color: white; font-family: arial, sans-serif; font-size: 12.800000190734863px;">Set </span><span style="background-color: white; font-family: arial, sans-serif; font-size: 13px;"><b>GetDWLMTable </b>to "true" </span><span style="background-color: white; font-family: arial, sans-serif; font-size: 12.800000190734863px;">If </span><b style="background-color: white; font-family: arial, sans-serif; font-size: 12.800000190734863px;">Memory-to-Memory (M2M)</b><span style="background-color: white; font-family: arial, sans-serif; font-size: 12.800000190734863px;"> session replication is enabled in WebSphere Application Server.. Memory-to-Memory replication uses partition IDs rather than clone IDs. This can lead to broken session affinity if GetDWLMTable is set to false (which is the default). So it is very important to set GetDWLMTable="true" whenever using M2M in WebSphere Application Server.</span></div>
<div>
<br /></div>
<div>
Read <a href="http://www-01.ibm.com/support/docview.wss?uid=swg21318463">http://www-01.ibm.com/support/docview.wss?uid=swg21318463</a> for more tips ... </div>
<div>
<u><span style="background-color: white; font-family: arial, sans-serif; font-size: 12.800000190734863px;"><br />
</span></u></div>
</div>
Rohit Kelapurehttp://www.blogger.com/profile/12988550581111360779noreply@blogger.com0tag:blogger.com,1999:blog-6741080397454890783.post-1451401345309033352012-09-19T08:58:00.001-07:002012-09-19T09:09:16.189-07:00It's official now - WAS 6.1 extended to 2013<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<br />
<b>Hot off the press</b>: IBM extends the end-of-service date for IBM® WebSphere® Application Server V6.1 from <b>September 30, 2012</b>, to <b>September 30, 2013</b>. This includes the following programs below. IBM will be supporting WAS v6.1 for 7 years since GA date, which is beyond our standard 5 year policy. So, no need to sign the extended support contract!<br />
<br />
5724-J08 6.1.0 IBM WebSphere Application Server<br />
5724-I63 6.1.0 IBM WebSphere Application Server - Express<br />
5724-H88 6.1.0 IBM WebSphere Application Server Network Deployment<br />
5724-H89 6.1.0 IBM WebSphere Application Server for Developers<br />
5724-X89 6.1.0 IBM WebSphere Application Server Hypervisor Edition V6.1 for Novell SLES<br />
5725-A25 6.1.0 IBM WebSphere Application Server Hypervisor Edition V6.1 for AIX<br />
5725-C00 6.1.0 IBM HTTP Server for WebSphere Application Server Hypervisor Edition V6.1 on Novell SLES<br />
5725-C01 6.1.0 IBM HTTP Server for WebSphere Application Server Hypervisor Edition V6.1 on AIX<br />
5655-N01 6.1.0 IBM WebSphere Application Server for z/OS<br />
<div>
<br /></div>
</div>
Rohit Kelapurehttp://www.blogger.com/profile/12988550581111360779noreply@blogger.com0tag:blogger.com,1999:blog-6741080397454890783.post-59990662172993663652012-09-06T08:53:00.001-07:002012-09-06T09:01:58.860-07:00Serviceability gem: WebSphere Application Server hung thread detection and recovery<div dir="ltr" style="text-align: left;" trbidi="on">
<i>Customers often ask me a question that goes like this </i><br />
<div>
<br /></div>
<div>
<div>
<b>Is there a way that hung threads could be manually or automatically killed to prevent the maxed out condition? For instance, once an alarm state is reached, could a script or a person look at the threads, identify "hung" threads, and kill them thus breaking the logjam?</b> As I understand it, if a thread is hung then no data is being sent until the thread process completes. And if the thread dies then the request is simply re-sent by the originating application. So killing a thread will not actually hurt anything. Is this correct? And if so, how would we go about doing that? Trying think outside the box here. If we can't fix this, can we figure out a creative way to prevent it?</div>
</div>
<div>
<br /></div>
<div>
<span style="color: blue;">My response is as follows : Yes there is a way out of the logjam. <b>Prior to WebSphere Application Server 8.5</b> there are two ways to achieve what you are asking for ... </span></div>
<div>
<div>
<br /></div>
<div>
<b>1. <a href="http://wasdynacache.blogspot.com/2012/03/websphere-application-server-jvm.html">http://wasdynacache.blogspot.com/2012/03/websphere-application-server-jvm.html</a></b></div>
<div>
Please read and comment. Disadvantages of this approach are that tit aborts i.e. kills the JVM on the first hung thread which is abrasive since in-flight requests are killed. Please note when you abort a JVM you may leave your system in an inconsistent state since in flight transactions and requests are terminated. </div>
<div>
<br /></div>
<div>
<b>2. Use a java client Thread_Hung event notification program that automatically monitor possibly hung threads and restarts the server via the nodeagent mbean </b><a href="http://www.ibm.com/developerworks/websphere/library/techarticles/0412_kochuba/0412_kochuba.html">http://www.ibm.com/developerworks/websphere/library/techarticles/0412_kochuba/0412_kochuba.html</a> </div>
</div>
<div>
<br /></div>
<div>
By default the hung thread detection threshold is 10 minutes (600 seconds). You may want to <a href="http://pic.dhe.ibm.com/infocenter/wasinfo/v6r1/index.jsp?topic=/com.ibm.websphere.nd.multiplatform.doc/info/ae/ae/ttrb_confighangdet.html">change </a>that to 5 minutes . if you want a super responsive early warning system. Please note that you will need to set <span style="font-family: Courier New, Courier, monospace;">com.ibm.websphere.threadmonitor.false.alarm.threshold to 300. </span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div>
<b>In WebSphere Application Server 8.5 and after </b>you can use the Intelligent Management health monitoring and management subsystem to monitor the application server environment and take action when certain criteria are discovered. see <a href="http://pic.dhe.ibm.com/infocenter/wasinfo/v8r5/topic/com.ibm.websphere.wve.doc/ae/twve_odhealth.html">Configuring Health Management</a> and <a href="http://pic.dhe.ibm.com/infocenter/wasinfo/v8r5/topic/com.ibm.websphere.wve.doc/ae/cwve_hconditionsubex.html?resultof=%22%68%65%61%6c%74%68%22%20%22%70%6f%6c%69%63%79%22%20%22%70%6f%6c%69%63%69%22%20%22%68%75%6e%67%22%20%22%74%68%72%65%61%64%22%20">Custom health condition subexpression builder</a></div>
</div>
Rohit Kelapurehttp://www.blogger.com/profile/12988550581111360779noreply@blogger.com0tag:blogger.com,1999:blog-6741080397454890783.post-26933293784119605172012-08-23T13:54:00.001-07:002012-08-23T14:03:23.110-07:00Serviceability gem: Deadlock in WebSphere application server<div dir="ltr" style="text-align: left;" trbidi="on">
If your application code in WAS is repeatedly running into a deadlock situations and you want to be forewarned, you can use the <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/management/ThreadMXBean.html">ThreadMXBean </a>exposed by the JVM and call these methods<br />
<br />
<span style="font-family: Courier New, Courier, monospace;"><span class="Apple-tab-span" style="white-space: pre;"> </span>java.lang.management.ThreadMXBean.findDeadlockedThreads()</span><br />
<span style="font-family: Courier New, Courier, monospace;"><span class="Apple-tab-span" style="white-space: pre;"> </span>java.lang.management.ThreadMXBean.findMonitorDeadlockedThreads()</span><br />
<div>
<br /></div>
<div>
If either of the two threads returns a non null value programmatically call a system dump and dump whatever other state you need to diagnose the problem. You can view the contents of the system dump in Eclipse Memory Analyzer Tool.</div>
<div>
<br /></div>
<div>
The House MD equivalent for WAS :-) <a href="https://www.ibm.com/developerworks/mydeveloperworks/blogs/kevgrig/?lang=en">Kevin Grigorenko</a> has an application <a href="https://github.com/kelapure/general-java-utils/blob/master/deadlockWatch.war">deadlockWatch.war</a> that you can use to take a javacore, if there is a deadlock in order to capture the state of the system at the time of the deadlock.</div>
<div>
<br /></div>
<div>
There is no way around having to figure out a proper interval which balances catching it versus the overhead of the check. The default in this app is a 5 minute interval (30000 ms) and you can change that with <span style="font-family: Courier New, Courier, monospace;"><b>-Dcom.ibm.deadlockWatch.DeadlockWatcherThread.sleepTime=N </b></span>(where N is in milliseconds). Source code is included in the <a href="https://github.com/kelapure/general-java-utils/blob/master/deadlockWatch.war" target="_blank">application </a>if you'd like to modify it yourself.</div>
</div>
Rohit Kelapurehttp://www.blogger.com/profile/12988550581111360779noreply@blogger.com0tag:blogger.com,1999:blog-6741080397454890783.post-54167023373155910322012-08-23T13:29:00.005-07:002012-08-23T13:31:05.781-07:00Is there a limit to how big an HTTPSession object can be in WebSphere Application Server<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
For memory to memory session persistence you can go as big as you want although anything bigger than 10K is problematic. <br />
<br />
If the sessions are being persisted to the database, then <b>there is a possible limit</b>. If you are using single-row, then if the session size is greater than 2MB - we can not store it and therefore if there is a failover, it will not be retrieved. Using a multi-row schema allows the attributes to be stored in separate rows and so the overall size of the session object can be > 2MB. The smaller the better as far as replicating sessions.<br />
<br />
I would recommend viewing this doc as it has some information about performance for various session sizes for both database and memory to memory replication: <a href="ftp://public.dhe.ibm.com/software/webservers/appserv/was/WASV8_SessionReplication_Performance_v1.0.pdf">ftp://public.dhe.ibm.com/software/webservers/appserv/was/WASV8_SessionReplication_Performance_v1.0.pdf</a><br />
<div>
<br />
<i><span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;">* Credit to WAS Session subject matter expert <b>Robert Goff</b></span></i></div>
</div>
Rohit Kelapurehttp://www.blogger.com/profile/12988550581111360779noreply@blogger.com0tag:blogger.com,1999:blog-6741080397454890783.post-25483522543025491842012-08-23T13:15:00.003-07:002012-08-23T13:19:50.910-07:00Tuning WebSphere Application Server on Linux on System z<div dir="ltr" style="text-align: left;" trbidi="on">
To better utilize, virtualize and optimize your WAS zLinux environment to serve more applications and users please go through the following white papers and best practice documents to squeeze the last bit of performance from WAS on zLinux<br />
<br />
1. <b>Idle WebSphere Tuning Considerations</b><br />
This was a study done specifically on zLinux to help with swapping of JVMs when they are idle<br />
<a href="http://ibm.co/jUcb9M">http://ibm.co/jUcb9M</a><br />
<br />
2. <b>Match 31-bit WebSphere Application Server performance with new features in 64-bit Java on System z</b><br />
<i>Solve 31-bit virtual memory crowding issues without sacrificing performance by using heap compression and large pages</i><br />
<a href="https://www-304.ibm.com/partnerworld/wps/servlet/ContentHandler/whitepaper/systemz/java_websphere/performance">https://www-304.ibm.com/partnerworld/wps/servlet/ContentHandler/whitepaper/systemz/java_websphere/performance</a><br />
<br />
3. <b>Linux on System z, an end-to-end view: from Sizing to Performance Analysis to Capacity Planning</b><br />
<a href="http://www-03.ibm.com/support/techdocs/atsmastr.nsf/WebIndex/WP100908">http://www-03.ibm.com/support/techdocs/atsmastr.nsf/WebIndex/WP100908</a><br />
<br />
4. <b>Architecting z/VM and Linux for WebSphere V7 on System z</b><br />
<a href="http://www-03.ibm.com/support/techdocs/atsmastr.nsf/WebIndex/WP101803">http://www-03.ibm.com/support/techdocs/atsmastr.nsf/WebIndex/WP101803</a><br />
<br />
5. <b>Sharing a WebSphere Application Server V8 installation among many Linux for IBM System z servers</b><br />
<a href="http://www-03.ibm.com/support/techdocs/atsmastr.nsf/WebIndex/WP102145">http://www-03.ibm.com/support/techdocs/atsmastr.nsf/WebIndex/WP102145</a><br />
<br />
<div style="text-align: right;">
<div style="text-align: left;">
<span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"><i>* Thanks to Mike Everett and David Hare, WAS performance experts for providing these links</i></span></div>
</div>
</div>
Rohit Kelapurehttp://www.blogger.com/profile/12988550581111360779noreply@blogger.com0