Sunday, January 30, 2011

Good advise for methodically learning or systematically reviewing Java technologies

There are tons of technical literature introducing Java technologies and offering advise on how to learn this large set of technology. However, this short article from RoseIndia offers simple, straight forward, and very helpful explanation and advise.

It is way easier to come up with a long and complex description of Java. However, it is the ACME of the ART to explain a complex matter in simple and concise language. Enjoy the following from http://www.roseindia.com/.

"What should be my learning path:

Learn Core Java - The Core Java Technology is the foundation of Java Platform of JSE. It is used in all classes of Java programming from desktop to Java Enterprise Edition. This include Java APIs, Java Application, JVM, JavaBeans, JavaScript, JSP etc.

Learn JSP - JSP technology assists developers in generating HTML, XML web pages. It uses Java code and some predefined actions while creating web content. This helps in the creation of JSP tag libraries that acts as extensions to HTML and XML tags.

Learn Servlets - In a Java Platform, Servlets assists developers in adding content to a web server. Servlets with Java server pages acts as a competitor to various dynamic web content technologies like CGI, ASP.NET, JavaScript etc.

Learn about Tomcat and other servers - Developed by Apache Software Foundation Tomcat is a Java based web application server used to run Servlet and JSP. It is not merely limited to application server and provides an open platform to develop extensible web and content management service.

Learn Open Source technologies (Struts, Hibernate, Spring) - Basically in Java there are three open source technologies known as frameworks; these are Spring, Hibernate and Struts. These open source application frameworks solves many problems related to JSE and J2EE, and helps in effective development of web application.

Learn EJB - Enterprise Java Beans are a part of J2EE and also a server sided component used mostly in large projects. It helps in easy and rapid development of distributed, transactional and small application based on Java technology.

Learn about Database Management System - It is a software designed to manage and run a database. Generally, it is used in company back office work, accounting, customer support system and several other purposes."

Saturday, January 29, 2011

Class Loaders - what are these (please scroll down and loo for those highted in red)

ClassLoader - Search Order

1 - JDK Extension - sun.misc.Launcher$ExtClassLoader
Classes
Classpath
file:/C:/Program Files (x86)/IBM/WebSphere/AppServer/java/jre/lib/ext/CmpCrmf.jar
file:/C:/Program Files (x86)/IBM/WebSphere/AppServer/java/jre/lib/ext/dnsns.jar
file:/C:/Program Files (x86)/IBM/WebSphere/AppServer/java/jre/lib/ext/dtfj-interface.jar
file:/C:/Program Files (x86)/IBM/WebSphere/AppServer/java/jre/lib/ext/dtfj.jar
file:/C:/Program Files (x86)/IBM/WebSphere/AppServer/java/jre/lib/ext/dtfjview.jar
file:/C:/Program Files (x86)/IBM/WebSphere/AppServer/java/jre/lib/ext/gskikm.jar
file:/C:/Program Files (x86)/IBM/WebSphere/AppServer/java/jre/lib/ext/healthcenter.jar
file:/C:/Program Files (x86)/IBM/WebSphere/AppServer/java/jre/lib/ext/ibmcmsprovider.jar
file:/C:/Program Files (x86)/IBM/WebSphere/AppServer/java/jre/lib/ext/ibmjcefips.jar
file:/C:/Program Files (x86)/IBM/WebSphere/AppServer/java/jre/lib/ext/ibmjceprovider.jar
file:/C:/Program Files (x86)/IBM/WebSphere/AppServer/java/jre/lib/ext/ibmkeycert.jar
file:/C:/Program Files (x86)/IBM/WebSphere/AppServer/java/jre/lib/ext/IBMKeyManagementServer.jar
file:/C:/Program Files (x86)/IBM/WebSphere/AppServer/java/jre/lib/ext/ibmpkcs11impl.jar
file:/C:/Program Files (x86)/IBM/WebSphere/AppServer/java/jre/lib/ext/ibmsaslprovider.jar
file:/C:/Program Files (x86)/IBM/WebSphere/AppServer/java/jre/lib/ext/ibmspnego.jar
file:/C:/Program Files (x86)/IBM/WebSphere/AppServer/java/jre/lib/ext/ibmxmlencprovider.jar
file:/C:/Program Files (x86)/IBM/WebSphere/AppServer/java/jre/lib/ext/iwsorbutil.jar
file:/C:/Program Files (x86)/IBM/WebSphere/AppServer/java/jre/lib/ext/jaccess.jar
file:/C:/Program Files (x86)/IBM/WebSphere/AppServer/java/jre/lib/ext/JavaDiagnosticsCollector.jar
file:/C:/Program Files (x86)/IBM/WebSphere/AppServer/java/jre/lib/ext/JawBridge.jar
file:/C:/Program Files (x86)/IBM/WebSphere/AppServer/java/jre/lib/ext/jdmpview.jar
file:/C:/Program Files (x86)/IBM/WebSphere/AppServer/java/jre/lib/ext/localedata.jar
file:/C:/Program Files (x86)/IBM/WebSphere/AppServer/java/jre/lib/ext/PD.jar
file:/C:/Program Files (x86)/IBM/WebSphere/AppServer/java/jre/lib/ext/xmlencfw.jar

2 - JDK Application - sun.misc.Launcher$AppClassLoader
Classes
Classpath
file:/C:/Program Files (x86)/IBM/WebSphere/AppServer/profiles/AppSrv02/properties/
file:/C:/Program Files (x86)/IBM/WebSphere/AppServer/properties/
file:/C:/Program Files (x86)/IBM/WebSphere/AppServer/lib/startup.jar
file:/C:/Program Files (x86)/IBM/WebSphere/AppServer/lib/bootstrap.jar
file:/C:/Program Files (x86)/IBM/WebSphere/AppServer/lib/jsf-nls.jar
file:/C:/Program Files (x86)/IBM/WebSphere/AppServer/lib/lmproxy.jar
file:/C:/Program Files (x86)/IBM/WebSphere/AppServer/lib/urlprotocols.jar
file:/C:/Program Files (x86)/IBM/WebSphere/AppServer/deploytool/itp/batchboot.jar
file:/C:/Program Files (x86)/IBM/WebSphere/AppServer/deploytool/itp/batch2.jar
file:/C:/Program Files (x86)/IBM/WebSphere/AppServer/java/lib/tools.jar

3 - OSGI - org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader
Classes
Classpath

4 - Extension - com.ibm.ws.bootstrap.ExtClassLoader
Classes
Classpath
file:/C:/Program Files (x86)/IBM/WebSphere/AppServer/java/lib/
file:/C:/Program Files (x86)/IBM/WebSphere/AppServer/java/lib/dt.jar
file:/C:/Program Files (x86)/IBM/WebSphere/AppServer/java/lib/htmlconverter.jar
file:/C:/Program Files (x86)/IBM/WebSphere/AppServer/java/lib/ibmorbtools.jar
file:/C:/Program Files (x86)/IBM/WebSphere/AppServer/java/lib/jconsole.jar
file:/C:/Program Files (x86)/IBM/WebSphere/AppServer/java/lib/tools.jar
file:/C:/Program Files (x86)/IBM/WebSphere/AppServer/profiles/AppSrv02/classes
file:/C:/Program Files (x86)/IBM/WebSphere/AppServer/classes
file:/C:/Program Files (x86)/IBM/WebSphere/AppServer/lib/
file:/C:/Program Files (x86)/IBM/WebSphere/AppServer/lib/EJBCommandTarget.jar
file:/C:/Program Files (x86)/IBM/WebSphere/AppServer/lib/IVTClient.jar
file:/C:/Program Files (x86)/IBM/WebSphere/AppServer/lib/OTiSConvertTime.jar
file:/C:/Program Files (x86)/IBM/WebSphere/AppServer/lib/activation-impl.jar
file:/C:/Program Files (x86)/IBM/WebSphere/AppServer/lib/aspectjrt.jar
file:/C:/Program Files (x86)/IBM/WebSphere/AppServer/lib/bootstrap.jar
file:/C:/Program Files (x86)/IBM/WebSphere/AppServer/lib/bsf-engines.jar
file:/C:/Program Files (x86)/IBM/WebSphere/AppServer/lib/commandlineutils.jar
file:/C:/Program Files (x86)/IBM/WebSphere/AppServer/lib/commons-discovery.jar
file:/C:/Program Files (x86)/IBM/WebSphere/AppServer/lib/databeans.jar
file:/C:/Program Files (x86)/IBM/WebSphere/AppServer/lib/ffdcSupport.jar
file:/C:/Program Files (x86)/IBM/WebSphere/AppServer/lib/htmlshell.jar
file:/C:/Program Files (x86)/IBM/WebSphere/AppServer/lib/installver.jar
file:/C:/Program Files (x86)/IBM/WebSphere/AppServer/lib/iscdeploy.jar
file:/C:/Program Files (x86)/IBM/WebSphere/AppServer/lib/ivblogbr.jar
file:/C:/Program Files (x86)/IBM/WebSphere/AppServer/lib/j2ee.jar
file:/C:/Program Files (x86)/IBM/WebSphere/AppServer/lib/jNative2ascii.jar
file:/C:/Program Files (x86)/IBM/WebSphere/AppServer/lib/jacl.jar
file:/C:/Program Files (x86)/IBM/WebSphere/AppServer/lib/jrom.jar
file:/C:/Program Files (x86)/IBM/WebSphere/AppServer/lib/launchclient.jar
file:/C:/Program Files (x86)/IBM/WebSphere/AppServer/lib/lmproxy.jar
file:/C:/Program Files (x86)/IBM/WebSphere/AppServer/lib/mail-impl.jar
file:/C:/Program Files (x86)/IBM/WebSphere/AppServer/lib/openwebbeans.jar
file:/C:/Program Files (x86)/IBM/WebSphere/AppServer/lib/pc-appext.jar
file:/C:/Program Files (x86)/IBM/WebSphere/AppServer/lib/pmirm4arm.jar
file:/C:/Program Files (x86)/IBM/WebSphere/AppServer/lib/rrd-appext.jar
file:/C:/Program Files (x86)/IBM/WebSphere/AppServer/lib/rsadbutils.jar
file:/C:/Program Files (x86)/IBM/WebSphere/AppServer/lib/rsahelpers.jar
file:/C:/Program Files (x86)/IBM/WebSphere/AppServer/lib/serviceadapter.jar
file:/C:/Program Files (x86)/IBM/WebSphere/AppServer/lib/setup.jar
file:/C:/Program Files (x86)/IBM/WebSphere/AppServer/lib/startup.jar
file:/C:/Program Files (x86)/IBM/WebSphere/AppServer/lib/tcljava.jar
file:/C:/Program Files (x86)/IBM/WebSphere/AppServer/lib/urlprotocols.jar
file:/C:/Program Files (x86)/IBM/WebSphere/AppServer/lib/wses_dynaedge.jar
file:/C:/Program Files (x86)/IBM/WebSphere/AppServer/lib/wsif-compatb.jar
file:/C:/Program Files (x86)/IBM/WebSphere/AppServer/installedChannels
file:/C:/Program Files (x86)/IBM/WebSphere/AppServer/web/help
file:/C:/Program Files (x86)/IBM/WebSphere/AppServer/deploytool/itp/plugins/com.ibm.etools.ejbdeploy/runtime/
file:/C:/Program Files (x86)/IBM/WebSphere/AppServer/deploytool/itp/plugins/com.ibm.etools.ejbdeploy/runtime/batch.jar
file:/C:/Program Files (x86)/IBM/WebSphere/AppServer/deploytool/itp/plugins/com.ibm.etools.ejbdeploy/runtime/ejbdeploy.jar
file:/C:/Program Files (x86)/IBM/WebSphere/AppServer/deploytool/itp/plugins/com.ibm.etools.ejbdeploy/runtime/ejbmapvalidate.jar
file:/C:/Program Files (x86)/IBM/WebSphere/AppServer/derby/lib/derby.jar
file:/C:/Program Files (x86)/IBM/WebSphere/AppServer/installedConnectors/sib.api.jmsra.rar/
file:/C:/Program Files (x86)/IBM/WebSphere/AppServer/installedConnectors/wmq.jmsra.rar/
file:/C:/Program Files (x86)/IBM/WebSphere/AppServer/installedConnectors/wmq.jmsra.rar/com.ibm.mq.commonservices.jar
file:/C:/Program Files(x86)/IBM/WebSphere/AppServer/installedConnectors/wmq.jmsra.rar/com.ibm.mq.connector.jar
file:/C:/Program Files (x86)/IBM/WebSphere/AppServer/installedConnectors/wmq.jmsra.rar/com.ibm.mq.headers.jar
file:/C:/Program Files (x86)/IBM/WebSphere/AppServer/installedConnectors/wmq.jmsra.rar/com.ibm.mq.jar
file:/C:/Program Files (x86)/IBM/WebSphere/AppServer/installedConnectors/wmq.jmsra.rar/com.ibm.mq.jmqi.jar
file:/C:/Program Files (x86)/IBM/WebSphere/AppServer/installedConnectors/wmq.jmsra.rar/com.ibm.mq.jmqi.local.jar
file:/C:/Program Files (x86)/IBM/WebSphere/AppServer/installedConnectors/wmq.jmsra.rar/com.ibm.mq.jmqi.remote.jar
file:/C:/Program Files (x86)/IBM/WebSphere/AppServer/installedConnectors/wmq.jmsra.rar/com.ibm.mq.jmqi.system.jar
file:/C:/Program Files (x86)/IBM/WebSphere/AppServer/installedConnectors/wmq.jmsra.rar/com.ibm.mq.jms.admin.jar
file:/C:/Program Files (x86)/IBM/WebSphere/AppServer/installedConnectors/wmq.jmsra.rar/com.ibm.mq.pcf.jar
file:/C:/Program Files (x86)/IBM/WebSphere/AppServer/installedConnectors/wmq.jmsra.rar/com.ibm.mqjms.jar
file:/C:/Program Files (x86)/IBM/WebSphere/AppServer/installedConnectors/wmq.jmsra.rar/com.ibm.msg.client.commonservices.j2se.jar
file:/C:/Program Files (x86)/IBM/WebSphere/AppServer/installedConnectors/wmq.jmsra.rar/com.ibm.msg.client.commonservices.jar
file:/C:/Program Files (x86)/IBM/WebSphere/AppServer/installedConnectors/wmq.jmsra.rar/com.ibm.msg.client.jms.internal.jar
file:/C:/Program Files (x86)/IBM/WebSphere/AppServer/installedConnectors/wmq.jmsra.rar/com.ibm.msg.client.jms.jar
file:/C:/Program Files (x86)/IBM/WebSphere/AppServer/installedConnectors/wmq.jmsra.rar/com.ibm.msg.client.matchspace.jar
file:/C:/Program Files (x86)/IBM/WebSphere/AppServer/installedConnectors/wmq.jmsra.rar/com.ibm.msg.client.provider.jar
file:/C:/Program Files (x86)/IBM/WebSphere/AppServer/installedConnectors/wmq.jmsra.rar/com.ibm.msg.client.ref.jar
file:/C:/Program Files (x86)/IBM/WebSphere/AppServer/installedConnectors/wmq.jmsra.rar/com.ibm.msg.client.wmq.common.jar
file:/C:/Program Files (x86)/IBM/WebSphere/AppServer/installedConnectors/wmq.jmsra.rar/com.ibm.msg.client.wmq.factories.jar
file:/C:/Program Files (x86)/IBM/WebSphere/AppServer/installedConnectors/wmq.jmsra.rar/com.ibm.msg.client.wmq.jar
file:/C:/Program Files (x86)/IBM/WebSphere/AppServer/installedConnectors/wmq.jmsra.rar/com.ibm.msg.client.wmq.v6.jar
file:/C:/Program Files (x86)/IBM/WebSphere/AppServer/installedConnectors/wmq.jmsra.rar/dhbcore.jar

5 - WAS Protection Class Loader - com.ibm.ws.classloader.ProtectionClassLoader
Classes
Classpath

6 - Module - com.ibm.ws.classloader.CompoundClassLoader
Classes
Classpath
file:/C:/Program Files (x86)/IBM/WebSphere/AppServer/profiles/AppSrv02/installedApps/DF-02Node01Cell/DefaultApplication.ear/Increment.jar

7 - Module - com.ibm.ws.classloader.CompoundClassLoader

Keep WAS Admin Console from being timed out

The default time out value is 30 minutes inactivity. Then, you have to log in again. If you do not like this, you can change this. Tow ways.

1) Use this red book (by the way, an outstanding book in contents, perhaps the best that I have seen. Of course, some English sentences are too long and could be more crispy. The program is on page 142. For those who do not write jython daily, you have to be aware that jython is indension sensitive. You may lose indension while doing copy and paste. The program works fine. I have tested it.

2) You can use what Jeff shares on his blog. This does not involve writing and running a jython through wsamdin. You modify the files directly (now let's be careful if you are dealing with production!)

On Windows Platform - run as administrator use the shell and wsadmin

You may get "Access is denided" message when trying to launch a comand from the DOS shell. Before you dive into troubleshooting on security, try to start the shell "Run as administrator".

Right click on the cmd icon and choose "Run as administrator".

Annotation - Part of A Java Trend to Simplicity

Annotation is part of the new features in support of the general trend of Java Technology to become simpler and easier to use.

This is my simplifed understanding of annotation. Let me know if I am off the mark.
  • Developer embeds declarative "notes" in Java code ->
  • The compliler or the JVM generate related code (both at compile time or run time) ->
  • The application obtains a desired behaviors or results
This is the quote from one technical author: "Simply speaking, annotation is a mechanism for associating a meta-tag with program elements and allowing the compiler or the VM to extract program behaviors from these annotated elements and generate interdependent codes when necessary".

This is the definition from Wiki: "An annotation, in the Java computer programming language, is a special form of syntactic metadata that can be added to Java source code.[1] Classes, methods, variables, parameters and packages may be annotated. Unlike Javadoc tags, Java annotations can be reflective in that they can be embedded in class files generated by the compiler and may be retained by the Java VM to be made retrievable at run-time".

Friday, January 28, 2011

Good articles on JVM tuning - nursery size and tenured size

Three VERY good articles on JVM tuning, especially on nursery size and tenured size.
Young generation (nursery) size is set by: -Xmn (-Xmns/-Xmnx)
Old generation (tenured) sized is set by: -Xmo (-Xmos/-Xmox)
Of course, you have to use Xgpolicy:gencon t0 take advantage of generational garbage collection.

Article 1 - large cache option - short article
Article 2 - IBM JDK 1.5 and Runtime Diagnostic Guide - long, but comprehensive
Article 3 - IBM JVM GC policies - short but sweet
If you have no time to read articles, this IBM presentation (IBM JVM internals) offers good information as well.

BTW, I have one chapter in my WebSphere engineering book that is dedicated to technical training, hiring considerations, and the technical skills needed to be a good WebSphere system administrator, WebSphere consultant, or WebSphere support manager.

Thursday, January 27, 2011

wsadmin - the default with WebSphere Application Sever 8 (Beta)

You have to specify to wsadmin interface that you want to work with jython or you will get jacl. If you are unaware of this, for a while, you run into syntact errors - that can be frustrating.

The right command:
wsadmin -lang jython

Then, the more Java like jython code will start to work.
AdminControl.getNode()

Simple stuff, but can throw you off for 15 minutes if you do not use wsadmin daily.

Of course, you can modify wsadmin.properties file with the following:
com.ibm.ws.scripting.defaultLang=jython

Wednesday, January 26, 2011

Job Manager and Adminstrative Agent article

This is a good article on Job Manager and Administrative Agent.

Some points that I find interesting.
  1. Job Manager intends to overcome the limitation of Deployment Manager over geographical deployment.
  2. Adminstrative agent used with Job Manager provides centralized administration.

A good use of Job Manager and Administrative Agent can be getting time consuming deployment or changes done with a tight SYSMOD window for a very large system deployed across several data centers.

JVM name in WebSphere Application Server 8 (Beta)

Sometimes in a hurry, you forget that for Job Manager, Administrative Agent, and Deployment Manager, you have to differnet names for the JVM, for example, in starting and stopping. It might help just using a consistent name, maybe server1 or server2.

Application Server: server1 or server2 or server3
Adminstrative Agent: AdminAgent
Deployment Manager: Dmgr
Job Manager: JobMgr

Remove an application server profile - WebSphere Application Server 8 (beta)

I used the following to remove an application server profile (the install did not go well). Then, the system became unstable. I had to reinstall the whole package.

manageprofiles.sh -listProfiles
manageprofiles.sh -profileName -delete appsrv01

I am not sure if this is the right way to remove an application server profile.

If you forget your WAS Admin Console password

First, you can use wsadmin.
  • \bin\wsadmin -conntype NONE
  • securityoff
  • Then, recycle or start server.
Secondly, you can find the security.xml file
  • Make a copy of the file
  • Find the first "enabled" string and change the "true" string to "false".
  • Then, restart the server without the username and password.
Both work well.

Monday, January 24, 2011

Some thoughts on WAS security

Here are some thoughts on best practices on WAS security
  1. PKI certificates are architecturally cleaner to be installed at local load balancer such as F5 BIGIP (SL Termination is the ability for a load balancer to establish a secure tunnel with the client thus in most cases replacing the requirement for the web server to perform SSL).
  2. Single Sign on as part of Web Access Management is better handled at Web Server layer by Siteminder. Though WebSphere provides this SSO capability, this is a more streamlined design in architecture and also it allows the best in class specialized solution such as Siteminder to play a critical function.
Both of the above have the benefit letting WebSphere Application Server does what it does best - providing an execution environment for JEE applications.

Sunday, January 23, 2011

The One to Many Relationship in WebSphere Application Server

There are some important "One to One" or "One to Many" relationships in WebSphere Application Server.
  • Node agent to application servers
  • Deployment manager to node agents
  • Administrative agents to stand alone application servers
  • Job manager to deployment mangers
  • Job manager to administrative agents
  • Business Level Application (BLA) and application artifacts such as ear files that it contained
  • Application server cluster and messaging enginers (a 1X1 relationship also holds)

The 1To1 relationships in WebSphere Application Server

There are some interesting 1To1 relationships in WebSphere.
  • Node and node agent
  • Enterprise application name and the containing application server
  • Enterprise application name and the containing node
  • Enterprise application name and the containing cluster
  • Enterprise application name and the containing cell
  • Enterprise application and the ear file that it contains
  • Name server and application server
  • Deployment manager and cell
  • Application server and message engine (EM)
  • Application server cluster and message engine (EM) ("1 to Many: Relationship also holds after the adding of the cluster into the SIBus)
  • Stateful session bean and client
  • Stateless session bean and client
  • Point-to-Point messaging (provide and consumer)

Saturday, January 22, 2011

Ubuntu - Change root password to gain root access

The following changes the root user password and allows you to "su root".

sudo passwd root

IBM HTTP Server 7 challenge

I got the root cause of the following problem - for IHS now, you are supposed to manage the web server from the WAS admin console and there is not a web server admin console to pull up.
---------------------------------------------------------------------------------------------------------------------
I cannot bring up IHS admin console. The URL is right. The port is right. Below is what I got.

"Forbidden

You don't have permission to access / on this server."
I have tried to modify httpd.confi (). It did not help. I also played on file security settings with no results. I did look at admin.conf file as well. No clue!

I modified httpd.conf and changed - the original was "Group nobody". This is an unrelated change in terms of the above mentioned error message.

User nobody
Group nogroup

Miscellaneous notes on install and environment setup working on WAS 8 (Beta)

A less troublesome install process could be:
  1. a design - a topology however rough is better than none - this will help to decide on the installation of different WebSphere objects
  2. a plan - steps to take - this should include careful notes on security
  3. security - root or non-root - think through, make a choice, and document detail
    • A primary Administrative Security ID to represent WebSphere servers in LDAP
    • A top level WebSphere administrative ID in LDAP server for which WebSphere system administrators are "leaves"
    • An OS Level root ID or root privilege for your security ID to install the server
    • An OS level administrative ID that you can "su" to to perform daily administration (you should the file systems for WebSphere to this ID, for example in LINUX: chown -R WASOP:WASOP /opt
  4. Then, your life is easier - do the usual getting the binary, decompress, launchpad (if not using the silent install or scripted automation. You will need some kind of XWindow server running on your workstation)
  5. create profiles (./pmt.sh or scripted automation)
Installing LINUX:

When installing LINUX or doing anything to the hard drive, backup your data, and make a repair CD or DVD. Anything that can go wrong will go wrong. I had to use my repair CD today twice! LINUX seems sensitive to unexpected power failures. Also, it seems that no vendors like the idea to use an external drive to boot the system.

Backup your stuff, for example, clone your drive, but be extremely carefully with ddrescue or anything that appreciates the power of recursive algorithm. Always make sure that the target is the right one. Check it twice if not three times and make sure. Do not ever skip the first command below!
sudo lshw -C disk
sudo ddrescue -v /dev/sda /dev/sdb  

If the system complains about input files, use the following
sudo ddrescue -v --force /dev/sda /dev/sdb 

Thursday, January 13, 2011

IBM online documentation - WAS 8 (Beta)

The IBM online documentation on WAS 8 (Beta) is very helpful and well written.

One minor improvement needed on the article about application virtual host: "To view this administrative console page, click Applications > Application Types > WebSphere enterprise applications > application_name > Virtual hosts." This gives people the impression that Virtual Hosts is a tap. Actually, it is under the Web Modul Properties section. It took me quite some time to find this out. Please let me know if I am wrong about this.

Overall, it is good and informative document.

Federation and Cluster Creation Problem - WAS 8 (Beta)

After federating two nodes into the cell, the JVM instances running on these notes have lost their applications (not intended). I did choose including the applications when adding notes. The the nodes, node agents, and application severs added are all validated after federation. I am working on resolving this.

Problem resolved: I installed the same applications onto more than one JVM in the same cell - this was what went wrong.

I created a cluster in the cell and added three members using an existing JVM as an template. I removed the applications from the other JVM instances. Then, I deployed the applications into the three members of the cluster.

I did a full re-sychnonization and bounced the cluster. The cluster, the Dmgr, the node agents, and the JVM instances were all runing cleanly. The applications started cleanly and were running fine.

Either the application is running from the cluster in the cell or on the app servers under the Dmgr, not from both. This is the application to the containing cell in a 1X1 relationship.

Wednesday, January 12, 2011

Federate nodes into a cell - WAS 8 (Beta)

The federation process was not too hard to follow, but still I made three mistakes.

1) I provided the wrong OS password for the Dmgr. It took a while to figure this out. After providing the right password, the process started as a service.
2) I did not start the node agent after creating the profile (when the system did not start the node agent). I used "startNode" program to start the node agent and then, the node agent, node, and the server all started. The program is in the bin directory of the application server. For example, c:/program files (x86)/IBM/WebSphere/AppServer/AppSrv03/bin
3) I did not check the "Include applications" radio button when I want to an app server keep the apps. The node agent should be started automatically. Chances are the initiation process times out due to resource challenges.

Here is the federation process, assuming that you have already created the application server(s) to federate into the cell that has been created (When you created a cell, a deployment manager and an application server are created as well by default. You will need to start the node agent for the application by invoking startNode program. The profile creation process did not start the node agent). Before you start, make sure that the application servers that you want to federate are running.

1. Launching Dmgr admin console
2. System administration -> Node -> Add node -> Managed node
3. Provide host name, the SOAP port number of the application server to federate, and the user names and passwords for the application serrver and Dmgr
4) Check "Include applications" unless you do not want to bring over the applications
5) Provide OS level user name and password to run the node agent as a serivce
6) Click on OK button and the federation may take a while
7) Start the node agent by issuing command "startNode" when the current directory is the bin directory of the application server
8) Verify the federation by doing the following

a. look at the addNode log file in the logs directory of the application server
b. verify by using Dmgr admin console to see if the node agent has been started, if yes, start the application server
c. use the browser to browse using the HTTP port of the application server and launch the default appliations to verify the federation

Tuesday, January 4, 2011

Installing WebSphere Application Server 8 (Beta)

Installing WebSphere Application Server 8 (Beta) was smooth. I was expecting some challenges, but encounted none.
1) First download the software. It seems that no matter what you choose to download, you will have another chance to make more choice when you launch the installer.
2) Unzip the files into your temp folder.
3) Launch the IBM Installation Manager in the temp folder (install.exe).
4) Now, you may get a chance to provide your IBM ID and password and make choices between IBM HTTP Server 8, IBM WebSphere Application Sever 8, IBM WebSphere Application Server Network Deployment 8. You want to choose WebSphere Customization Tools as well.
5) Follow the prompts of the installer and install the sofware that you want.
6) Use the WebSphere Customization Tools to launch Profile Management Tool and create your server(s).
7) Check the logs files to see if the installation is clean.
8) Use the First Steps GUI to verify the installation.
9) Launch the Admin Console that uses the same ports as WAS 7 (9080 or 9043) to verify the applications are running as a way to verify installation.
10) Use "hello", "snoop" and "hitcount" to verify installation.

Install IBM WebSphere MQ 7.0.1

I have found the following useful installing IBM MQ 7.0.1.
1) You will need WebSphere Eclipse Platform 3.3 and it is right in the Prereqs/IES folder in your download.
2) These tips are for installing MQ 7.0.1 on ubuntu, but they are helpful in general.