Modular Applications Development with Maven

Notes:

Different ways to run Maven:
http://www.vineetmanohar.com/2009/11/3-ways-to-run-java-main-from-maven/

/home/jboss1./m2/repository

<version>1.0</version> is for application, and SNAPSHOT for development

These three tags are mandatory:

<groupId>com.hollandamerica</groupId>
<artifactId>ModularApplicationTutorial</artifactId>
<version>1.0</version>

1) Create a pom.xml to compile the application into a jar called cruiser.jar. Run the test suite.

2) You want to move the development of the booking service to a separate project. Create a separate pom.xml to compile Booking.java, BookingService.java and BookingServiceImpl.java into a separate jar called booking.jar. Have cruiser.jar use booking.jar. Execute cruiser.jar to verify it works correctly.

3) You want cruiser.jar and booking.jar to always have the same version number. Create a parent pom.xml for your 2 projects called booking-parent, and define a property called VERSION. Have booking.jar and cruiser.jar make use of this VERSION property as their version number.

4) You want to compile both cruiser.jar and booking.jar in one single command. Have cruiser.jar and booking.jar be two submodules of booking-parent.

5) Split booking.jar into booking-api.jar (containing the interface) and booking-impl.jar (containing the implementation of the service). Execute cruiser.jar to verify it still works correctly.

6) We want to prevent developers of cruiser.jar to make direct calls to a specific booking-api implementation. Propose a way to remove the direct dependency between cruiser.jar and booking-impl.jar. Implement it.

CHIP Notes from Eric

From: Fillman, Eric (HAL)
Sent: Sunday, July 22, 2012 4:36 PM
To: Guillaume Radde
Cc: Thompson, Sonya (HAL); Ruckman, Maurice (HAL); Augustine, Anila (HAL)
Subject: RE: Chip

Please see below.

Thanks.

-----Original Message-----
From: Guillaume Radde [mailto:guillaume.radde@redhat.com]
Sent: Sunday, July 22, 2012 4:14 PM
To: Fillman, Eric (HAL)
Cc: Thompson, Sonya (HAL); Ruckman, Maurice (HAL); Augustine, Anila (HAL)
Subject: Chip

Eric,

I'm digging into the com.hollandamerica.chip package, and looking at the JiBX mappings. This is part of the modularization work, trying to move the chip related code into a separate module.
Could you confirm that the following statements are correct? Unfortunately, it looks like a lot of this code was written by Jay, but I'm hoping you can help me make sure I understand it correctly:

1) Chip is an XML api for Polar only
In theory, yes.  But the word "chip" has incorrectly been translated to be any XML type service processed through WebMethods.  But Chip should only be messages to POLAR.

2) All XML messages sent to Polar through chip are buit from the CruiseLineXmlRequest Java object.
They're supposed to be.

3) The following Java classes wrap XML messages to/from Barclays, not Polar, and do not use Chip:
-CCPRequestDTO (Credit Card Process)
-ICRequestDTO   (Instant Credit Request)
-PSOfferCaptureRequestDTO  (Pre Screen Credit Card Offer)
-PSRequestDTO (Pre Screen a guest for credit card application)
I believe that's correct.  When you say "Do not use Chip", I assume you mean they don't go to POLAR through the ChipAPI.  But like I said, some people here misinterpret "chip" to be any XML going through WebMethods (like the CCPRequest and the Barclay's messages)

My initial goal was to extract the polar/chip DTOs into a separate chip-connector maven module. I might end up creating several modules at once (one per Third party system we are connecting to):
-chip-connector.jar
-barclays-connector.jar
-steiner-connector.jar
-RTD-connector.jar
OK.  Just so you know, when I was doing RTD and knew I'd have to go through WebMethods, I created a WebMethods service (com.hal.sf.service.WebMethodsService) to make the call, rather than using ChipDAO - mainly because I knew it wasn't really Chip.  However, the code that WebMethodsService uses is a lot of "chip" code (if you look at it you'll see what I mean).  I don't think it's actually uses chip, it's just that the word "chip" is in a lot of the classes and methods used in the WebMethodsService.  Unfortunately, I didn't have time to re-factor everything to be non-chip.  But if you're going to create separate modules, you might look at using that WebMethodsService and refactoring it to be non-chip.

Thanks!

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

Adding a page to eDocs

Michael May added Safety Docs to the OLCI PDF's with the help of Eric Filman.  He applied changes to the following classes:

hal-ejb/src/main/config/chip/EdocsI18NMapping.xml
hal-ejb/src/main/java/com/hollandamerica/checkin/action/EdocsAction.java
hal-ejb/src/main/java/com/hollandamerica/checkin/action/EdocsHelper.java
hal-ejb/src/main/java/com/hollandamerica/common/biz/EdocsI18NHelper.java

See attachment for detail.

Word Doc:  20120806_Using_iText_to_Insert_PDF_pages.doc

JBoss Operation Network (JON) – JBoss Monitoring Tool

From: Augustine, Anila (HAL)
Sent: Monday, July 30, 2012 8:16 AM
To: Guillaume Radde
Cc: Ruckman, Maurice (HAL); Fillman, Eric (HAL); Klein, Brian (HAL); Thompson, Sonya (HAL)
Subject: RE: Looking for Thread Deadlocks on JBoss

Cool! That’s easy J. I mentioned this to Don on Friday too. Good news is we will be getting another linux admin (possibly this week) – woohoo! That should free up 40 hours for Don.

From: Guillaume Radde [mailto:guillaume.radde@redhat.com]
Sent: Friday, July 27, 2012 10:01 AM
To: Augustine, Anila (HAL)
Cc: Ruckman, Maurice (HAL); Fillman, Eric (HAL); Klein, Brian (HAL); Thompson, Sonya (HAL)
Subject: Re: Looking for Thread Deadlocks on JBoss

Around 40 man-hour. Depends on how many environments we want to monitor.
http://www.redhat.com/v/swf/jboss_on/2122_RedHat_JONOverview.html

From: "Anila Augustine (HAL)" <AAugustine@HollandAmerica.com>
To: "Guillaume Radde" <guillaume.radde@redhat.com>
Cc: "Maurice Ruckman (HAL)" <MRuckman@HollandAmerica.com>, "Eric Fillman (HAL)" <EFillman@HollandAmerica.com>, "Brian Klein (HAL)" <BKlein@HollandAmerica.com>, "Sonya Thompson (HAL)" <SThompson@HollandAmerica.com>
Sent: Friday, July 27, 2012 9:11:27 AM
Subject: RE: Looking for Thread Deadlocks on JBoss

So what would it take to deploy JON?

From: Guillaume Radde [mailto:guillaume.radde@redhat.com]
Sent: Thursday, July 26, 2012 6:46 PM
To: Augustine, Anila (HAL)
Cc: Ruckman, Maurice (HAL); Fillman, Eric (HAL); Klein, Brian (HAL); Thompson, Sonya (HAL)
Subject: Re: Looking for Thread Deadlocks on JBoss

I will add jmx-console. JBoss Operation Network is a separate monitoring tool (kind of like Foglight) that we did not deploy.

From: "Anila Augustine (HAL)" <AAugustine@HollandAmerica.com>
To: "Guillaume Radde" <guillaume.radde@redhat.com>, "Sonya Thompson (HAL)" <SThompson@HollandAmerica.com>
Cc: "Maurice Ruckman (HAL)" <MRuckman@HollandAmerica.com>, "Eric Fillman (HAL)" <EFillman@HollandAmerica.com>, "Brian Klein (HAL)" <BKlein@HollandAmerica.com>
Sent: Thursday, July 26, 2012 2:52:34 PM
Subject: RE: Looking for Thread Deadlocks on JBoss

Guillaume - in your documentation, please add JBoss Operation Network -  I think the team would benefit from a show   & tell, if that’s not done already.

From: Guillaume Radde [mailto:guillaume.radde@redhat.com]
Sent: Thursday, July 26, 2012 10:31 AM
To: Thompson, Sonya (HAL)
Cc: Augustine, Anila (HAL); Ruckman, Maurice (HAL); Fillman, Eric (HAL); Klein, Brian (HAL)
Subject: Re: Looking for Thread Deadlocks on JBoss

There are a lot of things that can be seen through the jmx-console. Globally, it can be used to review the internal of a JBoss server while it's running. The downside is that it's hard to find what you're looking for. I usually just google what I'm looking for with "jmx-console"

 

From: Augustine, Anila (HAL)
Sent: Monday, July 30, 2012 8:16 AM
To: Guillaume Radde
Cc: Ruckman, Maurice (HAL); Fillman, Eric (HAL); Klein, Brian (HAL); Thompson, Sonya (HAL)
Subject: RE: Looking for Thread Deadlocks on JBoss

 

Cool! That’s easy J. I mentioned this to Don on Friday too. Good news is we will be getting another linux admin (possibly this week) – woohoo! That should free up 40 hours for Don ;-)

From: Guillaume Radde [mailto:guillaume.radde@redhat.com]
Sent: Friday, July 27, 2012 10:01 AM
To: Augustine, Anila (HAL)
Cc: Ruckman, Maurice (HAL); Fillman, Eric (HAL); Klein, Brian (HAL); Thompson, Sonya (HAL)
Subject: Re: Looking for Thread Deadlocks on JBoss

 

Around 40 man-hour. Depends on how many environments we want to monitor.

http://www.redhat.com/v/swf/jboss_on/2122_RedHat_JONOverview.html

 


 

 

 

From: "Anila Augustine (HAL)" <AAugustine@HollandAmerica.com>
To: "Guillaume Radde" <guillaume.radde@redhat.com>
Cc: "Maurice Ruckman (HAL)" <MRuckman@HollandAmerica.com>, "Eric Fillman (HAL)" <EFillman@HollandAmerica.com>, "Brian Klein (HAL)" <BKlein@HollandAmerica.com>, "Sonya Thompson (HAL)" <SThompson@HollandAmerica.com>
Sent: Friday, July 27, 2012 9:11:27 AM
Subject: RE: Looking for Thread Deadlocks on JBoss

So what would it take to deploy JON?

From: Guillaume Radde [mailto:guillaume.radde@redhat.com]
Sent: Thursday, July 26, 2012 6:46 PM
To: Augustine, Anila (HAL)
Cc: Ruckman, Maurice (HAL); Fillman, Eric (HAL); Klein, Brian (HAL); Thompson, Sonya (HAL)
Subject: Re: Looking for Thread Deadlocks on JBoss

I will add jmx-console. JBoss Operation Network is a separate monitoring tool (kind of like Foglight) that we did not deploy.

 


 

 

 

From: "Anila Augustine (HAL)" <AAugustine@HollandAmerica.com>
To: "Guillaume Radde" <guillaume.radde@redhat.com>, "Sonya Thompson (HAL)" <SThompson@HollandAmerica.com>
Cc: "Maurice Ruckman (HAL)" <MRuckman@HollandAmerica.com>, "Eric Fillman (HAL)" <EFillman@HollandAmerica.com>, "Brian Klein (HAL)" <BKlein@HollandAmerica.com>
Sent: Thursday, July 26, 2012 2:52:34 PM
Subject: RE: Looking for Thread Deadlocks on JBoss

Guillaume – in your documentation, please add JBoss Operation Network -  I think the team would benefit from a show   & tell, if that’s not done already.

From: Guillaume Radde [mailto:guillaume.radde@redhat.com]
Sent: Thursday, July 26, 2012 10:31 AM
To: Thompson, Sonya (HAL)
Cc: Augustine, Anila (HAL); Ruckman, Maurice (HAL); Fillman, Eric (HAL); Klein, Brian (HAL)
Subject: Re: Looking for Thread Deadlocks on JBoss

There are a lot of things that can be seen through the jmx-console. Globally, it can be used to review the internal of a JBoss server while it's running. The downside is that it's hard to find what you're looking for. I usually just google what I'm looking for with "jmx-console"

 


 

 

 

From: "Sonya Thompson (HAL)" <SThompson@HollandAmerica.com>
To: "Maurice Ruckman (HAL)" <MRuckman@HollandAmerica.com>, "Eric Fillman (HAL)" <EFillman@HollandAmerica.com>, "Brian Klein (HAL)" <BKlein@HollandAmerica.com>
Cc: "Anila Augustine (HAL)" <AAugustine@HollandAmerica.com>, "Guillaume Radde (guillaume.radde@redhat.com) (guillaume.radde@redhat.com)" <guillaume.radde@redhat.com>
Sent: Thursday, July 26, 2012 9:09:58 AM
Subject: RE: Looking for Thread Deadlocks on JBoss

Guillaume & Maurice,

Thanks so much for sharing this info with us!

~Sonya

From: Ruckman, Maurice (HAL)
Sent: Thursday, July 26, 2012 7:49 AM
To: Fillman, Eric (HAL); Thompson, Sonya (HAL); Klein, Brian (HAL)
Cc: Augustine, Anila (HAL); Guillaume Radde (guillaume.radde@redhat.com) (guillaume.radde@redhat.com)
Subject: RE: Looking for Thread Deadlocks on JBoss

Link to 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

From: Fillman, Eric (HAL)
Sent: Thursday, July 26, 2012 6:33 AM
To: Ruckman, Maurice (HAL); Thompson, Sonya (HAL); Klein, Brian (HAL)
Cc: Augustine, Anila (HAL); Guillaume Radde (guillaume.radde@redhat.com) (guillaume.radde@redhat.com)
Subject: RE: Looking for Thread Deadlocks on JBoss

I’m not following this.

Are you supposed to type this stuff in on command line or something or in the JBoss console?

From: Ruckman, Maurice (HAL)
Sent: Wednesday, July 25, 2012 4:47 PM
To: Fillman, Eric (HAL); Thompson, Sonya (HAL); Klein, Brian (HAL)
Cc: Augustine, Anila (HAL); Guillaume Radde (guillaume.radde@redhat.com) (guillaume.radde@redhat.com)
Subject: Looking for Thread Deadlocks on JBoss

Guillaume showed me how he found the deadlocked thread.  Here are the notes:

Looking for a thread deadlock, how to

jboss.web

host=localhost,path=/,type=Manager

Looking for deadlocks

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

Thanks,

From: Augustine, Anila (HAL)
Sent: Monday, July 30, 2012 8:16 AM
To: Guillaume Radde
Cc: Ruckman, Maurice (HAL); Fillman, Eric (HAL); Klein, Brian (HAL); Thompson, Sonya (HAL)
Subject: RE: Looking for Thread Deadlocks on JBoss

 

Cool! That’s easy J. I mentioned this to Don on Friday too. Good news is we will be getting another linux admin (possibly this week) – woohoo! That should free up 40 hours for Don ;-)

From: Guillaume Radde [mailto:guillaume.radde@redhat.com]
Sent: Friday, July 27, 2012 10:01 AM
To: Augustine, Anila (HAL)
Cc: Ruckman, Maurice (HAL); Fillman, Eric (HAL); Klein, Brian (HAL); Thompson, Sonya (HAL)
Subject: Re: Looking for Thread Deadlocks on JBoss

 

Around 40 man-hour. Depends on how many environments we want to monitor.

http://www.redhat.com/v/swf/jboss_on/2122_RedHat_JONOverview.html

 


 

 

 

From: "Anila Augustine (HAL)" <AAugustine@HollandAmerica.com>
To: "Guillaume Radde" <guillaume.radde@redhat.com>
Cc: "Maurice Ruckman (HAL)" <MRuckman@HollandAmerica.com>, "Eric Fillman (HAL)" <EFillman@HollandAmerica.com>, "Brian Klein (HAL)" <BKlein@HollandAmerica.com>, "Sonya Thompson (HAL)" <SThompson@HollandAmerica.com>
Sent: Friday, July 27, 2012 9:11:27 AM
Subject: RE: Looking for Thread Deadlocks on JBoss

So what would it take to deploy JON?

From: Guillaume Radde [mailto:guillaume.radde@redhat.com]
Sent: Thursday, July 26, 2012 6:46 PM
To: Augustine, Anila (HAL)
Cc: Ruckman, Maurice (HAL); Fillman, Eric (HAL); Klein, Brian (HAL); Thompson, Sonya (HAL)
Subject: Re: Looking for Thread Deadlocks on JBoss

I will add jmx-console. JBoss Operation Network is a separate monitoring tool (kind of like Foglight) that we did not deploy.

 


 

 

 

From: "Anila Augustine (HAL)" <AAugustine@HollandAmerica.com>
To: "Guillaume Radde" <guillaume.radde@redhat.com>, "Sonya Thompson (HAL)" <SThompson@HollandAmerica.com>
Cc: "Maurice Ruckman (HAL)" <MRuckman@HollandAmerica.com>, "Eric Fillman (HAL)" <EFillman@HollandAmerica.com>, "Brian Klein (HAL)" <BKlein@HollandAmerica.com>
Sent: Thursday, July 26, 2012 2:52:34 PM
Subject: RE: Looking for Thread Deadlocks on JBoss

Guillaume – in your documentation, please add JBoss Operation Network -  I think the team would benefit from a show   & tell, if that’s not done already.

From: Guillaume Radde [mailto:guillaume.radde@redhat.com]
Sent: Thursday, July 26, 2012 10:31 AM
To: Thompson, Sonya (HAL)
Cc: Augustine, Anila (HAL); Ruckman, Maurice (HAL); Fillman, Eric (HAL); Klein, Brian (HAL)
Subject: Re: Looking for Thread Deadlocks on JBoss

There are a lot of things that can be seen through the jmx-console. Globally, it can be used to review the internal of a JBoss server while it's running. The downside is that it's hard to find what you're looking for. I usually just google what I'm looking for with "jmx-console"

 


 

 

 

From: "Sonya Thompson (HAL)" <SThompson@HollandAmerica.com>
To: "Maurice Ruckman (HAL)" <MRuckman@HollandAmerica.com>, "Eric Fillman (HAL)" <EFillman@HollandAmerica.com>, "Brian Klein (HAL)" <BKlein@HollandAmerica.com>
Cc: "Anila Augustine (HAL)" <AAugustine@HollandAmerica.com>, "Guillaume Radde (guillaume.radde@redhat.com) (guillaume.radde@redhat.com)" <guillaume.radde@redhat.com>
Sent: Thursday, July 26, 2012 9:09:58 AM
Subject: RE: Looking for Thread Deadlocks on JBoss

Guillaume & Maurice,

Thanks so much for sharing this info with us!

~Sonya

From: Ruckman, Maurice (HAL)
Sent: Thursday, July 26, 2012 7:49 AM
To: Fillman, Eric (HAL); Thompson, Sonya (HAL); Klein, Brian (HAL)
Cc: Augustine, Anila (HAL); Guillaume Radde (guillaume.radde@redhat.com) (guillaume.radde@redhat.com)
Subject: RE: Looking for Thread Deadlocks on JBoss

Link to 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

From: Fillman, Eric (HAL)
Sent: Thursday, July 26, 2012 6:33 AM
To: Ruckman, Maurice (HAL); Thompson, Sonya (HAL); Klein, Brian (HAL)
Cc: Augustine, Anila (HAL); Guillaume Radde (guillaume.radde@redhat.com) (guillaume.radde@redhat.com)
Subject: RE: Looking for Thread Deadlocks on JBoss

I’m not following this.

Are you supposed to type this stuff in on command line or something or in the JBoss console?

From: Ruckman, Maurice (HAL)
Sent: Wednesday, July 25, 2012 4:47 PM
To: Fillman, Eric (HAL); Thompson, Sonya (HAL); Klein, Brian (HAL)
Cc: Augustine, Anila (HAL); Guillaume Radde (guillaume.radde@redhat.com) (guillaume.radde@redhat.com)
Subject: Looking for Thread Deadlocks on JBoss

Guillaume showed me how he found the deadlocked thread.  Here are the notes:

Looking for a thread deadlock, how to

jboss.web

host=localhost,path=/,type=Manager

Looking for deadlocks

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

Thanks,

Maurice Ruckman

Voice: (206) 626-7497 x67497

Cellular: (206) 650-7576

Maurice Ruckman

Voice: (206) 626-7497 x67497

Cellular: (206) 650-7576

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