*******************************************************************
* Author: Connor Barry (based on original by Trinadh Kavuri)      *
* Instructions to create WebLogic JMS components for MSDS Service *	
*******************************************************************

1. Set the following environment variable:
	export EEDOMAIN_HOME=/home/weblogic/bea/EES-DEV
    # Change the value of this variable for the appropriate environment:
    #	EES-DEV for edev
    #	EES-PREPROD for preprod 
    #	EES-PROD etc

2. Unzip MSDS-scripts.zip, open a new command window and change directory
	to the appropriate subfolder [dev, sqa, etc.]

3. Run this command in the directory containing the PrepMSDS.sh file to remove 
   ^M chars:
      [weblogic@DNS   app41 dev] dos2unix PrepMSDS.sh
	If dos2unix isn't on the path, set the executable bit of the attached utility
	by running "chmod +x ../dos2unix.sh" and then run "../dos2unix.sh ./PrepMSDS.sh"

4. Copy the PrepMSDS.sh and PrepMSDS.py files into the domain folder:
	[weblogic@DNS   app41 dev] cp ./PrepMSDS* $EEDOMAIN_HOME
	
5. Change directory into the domain folder:
	[weblogic@DNS   app41 dev] cd $EEDOMAIN_HOME

6. Update the credentials at the top of the PrepMSDS.py file to match
	those required by the WebLogic server in the current environment. Values to change
	are on lines 6 and 7: "eesvcUsername" and "eesvcPassword". For example, the
	default values are "weblogic" / "weblogic123" as documented for WebLogic 10.3.

7. Run script PrepMSDS.sh, which adds new JMS components to existing
   administration server config:
      [weblogic@DNS   app41 dev] ./PrepMSDS.sh
	If necessary, set the executable bit first by running "chmod +x ./PrepMSDS.sh"
	
8. Logon to the admin console to make sure the JMS components are created; for
   example, a new JMS server called "EE-JMS".

9. Deploy the "jms-notran-adp" resource adapter by performing the following steps:
	9a. In the WebLogic console, navigate to the ESR-WS -> Deployments section
		in the left tree pane. Click "Install" button above the table of deployments
		in the right pane.
	9b. In the "Path" textbox, type the path to the server/lib folder inside the
		WebLogic installation directory. For example:
		/u01/app/bea/wlserver_10.3/server/lib
		Press enter after typing it and it should refresh the file list below. 
	9c. Check the radio button next to the file below named "jms-notran-adp.rar".
		Do not confuse this with the exploded directory called
		"jms-notran-adp (open directory)". Click the "Next" button at the top of
		the table.
	9d. On the next screen, check the option "Install this deployment as an
		application" and click "Next".
	9e. On the next screen, check the radio button "All servers in the cluster".
		It will automatically check the EECluster item above it.  No other items on
		the screen should be selected. Click "Next".
	9f. On the next screen, accept all the defaults and click "Finish".
	
	If it installs successfully, the deployments webpage will appear and a new item
	will be in the table called "jms-notran-adp". Ensure the type of this item is
	"Resource Adapter".
	
	If it did not install successfully due to a Java error about "specification
	version" or the type is not "Resource Adapter", contact ESR support for further
	instructions and a workaround.

10. Deploy the msds-ws.war using standard deployment instructions for a war file.

11. Click the "View Changes and Restarts" link in the top left of the console webpage,
	then click "Restart checklist" tab. If it says the admin server requires a restart,
	restart the admin server now from the command line. Otherwise proceed to step 12.

12. Stop, then start the managed servers via the admin console.

13. Remove the PrepMSDS files from the domain folder (optional):
	rm $EEDOMAIN_HOME/PrepMSDS.sh
	rm $EEDOMAIN_HOME/PrepMSDS.py

*******************************************************************

If you have any issues with any step please repeat after fixing the root cause.
The PrepMSDS scripts are repeatable.
For support contact Connor Barry at (720) 258-6545 or connor.barry@hp.com.