Remove a workspace in Eclipse

The following will remove it from the dropdown list when your startup Eclipse. Eclipse is not very happy if it thinks there's supposed to be a workspace but it's not there.

Window,Preferences,General,"Startup and Shutdown",Workspaces

From there you can delete a workspace you are no longer using, and then delete if from your drive

How to extract private key RSA code

/hal-parent/hal-ejb/src/main/java/com/hollandamerica/common/encryption/WebKeyFactory.java

Refer: http://stackoverflow.com/questions/150167/how-do-i-list-export-private-keys-from-a-keystore

import org.apache.axis.encoding.Base64;

//NOTE: DO NOT MIGRATE THIS CODE!!!
System.out.println("ifw.getPassword()"+ifw.getPassword().toString());

decryptionKey = (RSAPrivateKey)newKeyStore.getKey(
Keystore.END_ENTITY_ALIAS,ifw.getPassword());
System.out.println("maurice:decryptionKey"+decryptionKey.toString());
//String b64 = new BASE64Encoder().encode(key.getEncoded());
String b64 = new String(Base64.encode(decryptionKey.getEncoded()));
System.out.println("-----BEGIN PRIVATE KEY-----");
System.out.println(b64);
System.out.println("-----END PRIVATE KEY-----");

Example to turn off features

From: Thompson, Sonya (HAL)
Sent: Thursday, May 03, 2012 2:37 PM
To: Fillman, Eric (HAL); Bojja, Sridhar (HAL Contractor); Phatak, Sheetal (HAL); Ruckman, Maurice (HAL); Klein, Brian (HAL); Hartman, Mario (HAL Contractor); Florencia Castro (fcastro@hexacta.com); Daniela Greca (dgreca@hexacta.com)
Cc: Augustine, Anila (HAL)
Subject: Created a new teamsite file in support of continuous integration

Dev team,

In support of continuous integration, here's a way to "turn a feature off" or "hide a feature from end users".

Add an element to this new teamsite file: //prdcms01/default/main/hollandamerica/WORKAREA/baseline/cms/web/copy/features/featureToggles.xml

<?xml version="1.0" encoding="utf-8"?>
<toggles>
<cancelFeeDetailsDE><![CDATA[false]]></cancelFeeDetailsDE>
<upsellCategories_hal><![CDATA[true]]></upsellCategories_hal>
<upsellCategories_sbn><![CDATA[true]]></upsellCategories_sbn>
</toggles>

In your JSP, import the teamsite file:
<s:set var="featureMap" value="#application.staticXmlDataList.staticXmlFileMap['web.copy.features.featureToggles.xml']"/>

Add an if statement around the new feature in your JSP:
<s:if test="#featureMap['toggles.upsellCategories_hal'] == 'true'">
<%--put your feature code here-->
</s:if>

How Debug JBoss 100% CPU Usage

Refer: 20120503 Debugging JBoss 100 Percent CPU Usage.pdf

There's a quick and dirty way of identifying which threads are using up the CPU time on JBoss. Go the the JMX Console with a browser (usually on http://localhost:8080/jmx-console, but may be different for you), look for a bean called ServerInfo, it has an operation called listThreadCpuUtilization which dumps the actual CPU time used by each active thread, in a nice tabular format. If there's one misbehaving, it usually stands out like a sore thumb.

There's also the listThreadDump operation which dumps the stack for every thread to the browser.

Not as good as a profiler, but a much easier way to get the basic information. For production servers, where it's often bad news to connect a profiler, it's very handy.

Integrate Merge / Commits with Jira

-----Original Message-----
From: Guillaume Radde [mailto:guillaume.radde@redhat.com]
Sent: Thursday, April 12, 2012 12:24 PM
To: Mirza, Masood (HAL Contractor); Thompson, Sonya (HAL); Doan, Thomas (HAL Contractor); zzSmith, Robert (HAL Contractor); Ruckman, Maurice (HAL); Phatak, Sheetal (HAL); Bojja, Sridhar (HAL Contractor); Fillman, Eric (HAL); Augustine, Anila (HAL)
Subject: Jira-Subversion integration

You may have noticed that in Jira tickets, there is a tab at the bottom of the page that says "Subversion Commits". You can attach a commit to a Jira ticket by putting the Jira ticket number in the commit message.

Example:

$ svn commit -m "Remove duplicated method declaration. Fix JBM-319"

And the created commit will be added to the Jira ticket JBM-319.

Jira parses subversion commit logs every hours looking for Issue numbers so it's normal if you don't see your commit right away.

-------------------------------------
Guillaume Radde
Senior Consultant, Red Hat Consulting
guillaume.radde@redhat.com
http://www.redhat.com_o<
-------------------------------------

-----Original Message-----
From: Guillaume Radde [mailto:guillaume.radde@redhat.com]
Sent: Thursday, April 12, 2012 12:24 PM
To: Mirza, Masood (HAL Contractor); Thompson, Sonya (HAL); Doan, Thomas (HAL Contractor); zzSmith, Robert (HAL Contractor); Ruckman, Maurice (HAL); Phatak, Sheetal (HAL); Bojja, Sridhar (HAL Contractor); Fillman, Eric (HAL); Augustine, Anila (HAL)
Subject: Jira-Subversion integration

You may have noticed that in Jira tickets, there is a tab at the bottom of the page that says "Subversion Commits". You can attach a commit to a Jira ticket by putting the Jira ticket number in the commit message.

Example:

$ svn commit -m "Remove duplicated method declaration. Fix JBM-319"

And the created commit will be added to the Jira ticket JBM-319.

Jira parses subversion commit logs every hours looking for Issue numbers so it's normal if you don't see your commit right away.

-------------------------------------
Guillaume Radde
Senior Consultant, Red Hat Consulting
guillaume.radde@redhat.com
http://www.redhat.com_o<
-------------------------------------
-----Original Message-----
From: Guillaume Radde [mailto:guillaume.radde@redhat.com]
Sent: Thursday, April 12, 2012 12:24 PM
To: Mirza, Masood (HAL Contractor); Thompson, Sonya (HAL); Doan, Thomas (HAL Contractor); zzSmith, Robert (HAL Contractor); Ruckman, Maurice (HAL); Phatak, Sheetal (HAL); Bojja, Sridhar (HAL Contractor); Fillman, Eric (HAL); Augustine, Anila (HAL)
Subject: Jira-Subversion integration

You may have noticed that in Jira tickets, there is a tab at the bottom of the page that says "Subversion Commits". You can attach a commit to a Jira ticket by putting the Jira ticket number in the commit message.

Example:

$ svn commit -m "Remove duplicated method declaration. Fix JBM-319"

And the created commit will be added to the Jira ticket JBM-319.

Jira parses subversion commit logs every hours looking for Issue numbers so it's normal if you don't see your commit right away.

-------------------------------------
Guillaume Radde
Senior Consultant, Red Hat Consulting
guillaume.radde@redhat.com
http://www.redhat.com_o<
-------------------------------------

Enable / Disable Session Replication

-----Original Message-----
From: Guillaume Radde [mailto:guillaume.radde@redhat.com]
Sent: Tuesday, May 01, 2012 2:48 PM
To: Ruckman, Maurice (HAL)
Cc: Augustine, Anila (HAL); Thompson, Sonya (HAL); Fillman, Eric (HAL); Phatak, Sheetal (HAL); Bojja, Sridhar (HAL Contractor); Klein, Brian (HAL); Schumacher, Mike (HAL)
Subject: Re: prioritized/categorized list

I believe the only thing to do to re-enable session replication is to uncomment the <distributable> tag in hal-web/src/main/webapp/WEB-INF/web.xml.

Guillaume

HAL’s JBoss Configuration

Turnover documentation for HAL's JBoss Configuration.
Compete Red Hat Documentation concerning JBoss.

-----Original Message-----
From: Jeff Lindesmith [mailto:jlindesm@redhat.com]
Sent: Friday, April 13, 2012 12:00 PM
To: Ruckman, Maurice (HAL); Thompson, Sonya (HAL); Fillman, Eric (HAL); Phatak, Sheetal (HAL); Bojja, Sridhar (HAL Contractor)
Cc: Hofsetz, Therron (HAL); Augustine, Anila (HAL); guillaume radde; Randy Gullett
Subject: JBoss configuration documentation

Hi All,

Attached is a document that contains some documentation on JBoss configuration.

Good luck with everything.

Thanks,

Jeff Lindesmith
Senior Consultant - Red Hat Consulting
Red Hat , Inc.
405-659-3895
jlindesm@redhat.com
www.redhat.com

What is Nexus?

-----Original Message-----
From: Guillaume Radde [mailto:guillaume.radde@redhat.com]
Sent: Monday, April 30, 2012 1:38 PM
To: Ruckman, Maurice (HAL)
Cc: Thompson, Sonya (HAL); Fillman, Eric (HAL)
Subject: Re: Nexus

Nexus is the shared Maven artifact repository. It's basically a cache for jars so that if your maven downloads apache-common-1.3.jar, Eric's maven won't have to go on the web to download the same jar. All developer VMs and Hudson are configured to get jars (called artifacts in maven terms) from Nexus by default.

The url for our Nexus instance is http://halsvn01:8081/nexus

The website for nexus can be found here : http://www.sonatype.org/nexus/

Tip: Have VM run same EAR as produciton

-----Original Message-----
From: Guillaume Radde [mailto:guillaume.radde@redhat.com]
Sent: Monday, April 30, 2012 5:42 PM
To: Thompson, Sonya (HAL); Ruckman, Maurice (HAL); Phatak, Sheetal (HAL); Bojja, Sridhar (HAL Contractor); Fillman, Eric (HAL)
Cc: Augustine, Anila (HAL)
Subject: New JBoss config for developer vms

The /home/jboss1/HAL folder contains all the static content needed to run the application on developer vms. Its equivalent on infrastructure servers is /wbi/haldata/webxxx (where xxx can be tst, res, ...). Apache for example has its document root set to /home/jboss1/HAL/halwebsite on developer vms, and to the equivalent /wbi/haldata/webtst/halwebsite on webtest.

You can use symbolic links to simulate the production environment on your developer vm: have your HAL folder be a link to /wbi/haldata/webprd_cluster1 and your apache will serve the same static content as the production website:

1) ln -s /wbi/haldata/webprd_cluster1 /home/jboss1/HAL

2) Download the production ear from hudson and drop it into your JBoss deploy folder and you are running the same ear as the production environment as well.