How to detect deadlocks, session and other jmx-console goodies

Link to Console

http://haldevweb01.hq.halw.com/jmx-console/
haldevjbsXX.hq.halw.com/jmx-console/
admin/admin

List of sessions:

jboss.web
host=localhost,path=/,type=Manager
listSessionIds

Looking for a thread deadlock, how to

jboss.system
type=ServerInfo

listThreadCpuUtilization

Look for a thread taking a huge amount of CPU

Such as ajp-haldevjbs04%2F10.194.50.211-8009-3
and go back to type=ServerInfo

listThreadDump
and then search for thread found previously

RTD Performance

From: Fillman, Eric (HAL)
Sent: Friday, June 29, 2012 3:53 PM
To: Thompson, Sonya (HAL); Ruckman, Maurice (HAL)
Subject: Not sure if you'll need this or not...

But in case Therron wants to see if RTD is doing anything, you can run this query and get the total shore excursion and revenue by day.

select DATE_BOOKED, TOTAL_BOOKED, TOTAL_AMOUNT from
(
SELECT to_char(date_booked, 'MM/DD/YYYY, DAY') as DATE_BOOKED,
to_char( COUNT(to_char(date_booked, 'MM/DD/YYYY, DAY')), '999,999' ) as TOTAL_BOOKED,
to_char( sum( amt_price), '$9,999,999.00' ) as TOTAL_AMOUNT
FROM guest_shx
WHERE date_booked > '01-JUN-12'
GROUP BY to_char(date_booked, 'MM/DD/YYYY, DAY')
)
order by DATE_BOOKED

You can change the "where date_booked" as needed to get more days, fewer days, etc.

Thanks.

Eric

Thread deadlock, caused 100% CPU

Refer: http://halpjira01:8080/browse/WITG-100 Guillaume fixed the issue
1550     2d 09h     guillaume     /trunk/     Reintegrate WITG-100_100percentCPUHashmap. Should fix 100% cpu issue on prod. Fix WITG-100.

Don saw this problem happen eventually across all of our servers.

Changed this:
this.alaskaCruiseTourMap = new HashMap<String, AlaskaCruiseTour>();

To this:
this.alaskaCruiseTourMap = new ConcurrentHashMap<String, AlaskaCruiseTour>();

Example to run a jUnit test with Maven

How to run a specific test:

cd ~/workspace/safenet-credit-card-encryption2/hal-parent/hal-ejb
mvn -Dtest=WebCryptographyITCase test

How to run all tests:

cd ~/workspace/safenet-credit-card-encryption2/hal-parent/hal-ejb
mvn test

Credit Card Manifest Triage

From: Harris, Tyrone (HAL)
Sent: Sunday, July 01, 2012 11:28 AM
To: Ruckman, Maurice (HAL)
Subject: cc manifest info

FYI
This is where our jobs place the cc file
\itnasresonline_prdcreditcard

This is where Fidelio process backs up the file
\halautomatescheduleResOnlineGetResOnlineFilesARCHIVE20126_Jun30_Sat

Installing Netbeans on Ubuntu 12.04 VirtualBox

Text Version of this post: Installing Netbeans on Ubuntu 12.04 in VirtualBox.txt

Downloaded the complete version of Netbeans for Linux
http://netbeans.org/downloads/7.1.1/
Ended up downloading this "netbeans-7.1.1-ml-linux.sh"

Tried to install but it complained that Java was not installed. It prompted with URL to use, followed URL to here:
http://www.oracle.com/technetwork/java/javase/downloads/index.html

Downloaded the "jdk-7u5-linux-i586.tar.gz" version as opposed to the RPM version.

Found a Ubuntu help site with instructions on how to install:
http://askubuntu.com/questions/55848/how-do-i-install-oracle-java-jdk-7

Uncompress it
tar -xvf jdk-7u2-linux-i586.tar.gz

had to make a jvm directory (deviation from instructions)
sudo mkdir /usr/lib/jvm

JDK 7 package is extracted into ./jdk1.7.0_02 directory. - Now move the JDK 7 directory to /usr/lib
sudo mv ./jdk1.7.0_02 /usr/lib/jvm/jdk1.7.0

Ran the following three commands:
sudo update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/jdk1.7.0/bin/java" 1
sudo update-alternatives --install "/usr/bin/javac" "javac" "/usr/lib/jvm/jdk1.7.0/bin/javac" 1
sudo update-alternatives --install "/usr/bin/javaws" "javaws" "/usr/lib/jvm/jdk1.7.0/bin/javaws" 1

The article continued but that seemed enough to get this working, it seems like there would be issues if another JVM is installed. Refer to the article to change things.

Net beans was installed here by default and it launches by double-clicking the "netbeans" icon.
/home/mruckman/netbeans-7.1.1/bin

It has necessary to update the configuration file of NetBeans in order to see the menu selections, they did not play well with Ubunutu's layout:

gedit /home/mruckman/netbeans-7.1.1/etc/netbeans.conf

Add the following line, at the end of the line starting with netbeans_default_options=" and within the closing double-quote:
-J-Dswing.aatext=true -J-Dawt.useSystemAAFontSettings=lcd --laf Metal