<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Great Tasting Java &#187; J2EE</title>
	<atom:link href="http://www.greattastingjava.com/wordpress/index.php/category/j2ee/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.greattastingjava.com/wordpress</link>
	<description>Headley Williamson's Java code, answers, tutorials, and courses</description>
	<lastBuildDate>Wed, 21 Jul 2010 17:15:39 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>ATG Dynamo DRP Hung threads solution</title>
		<link>http://www.greattastingjava.com/wordpress/index.php/2007/06/19/atg-dynamo-drp-hung-threads-solution/</link>
		<comments>http://www.greattastingjava.com/wordpress/index.php/2007/06/19/atg-dynamo-drp-hung-threads-solution/#comments</comments>
		<pubDate>Tue, 19 Jun 2007 14:44:17 +0000</pubDate>
		<dc:creator>hwilliamson</dc:creator>
				<category><![CDATA[Code Examples]]></category>
		<category><![CDATA[J2EE]]></category>
		<category><![CDATA[Performance]]></category>
		<category><![CDATA[Servlets]]></category>

		<guid isPermaLink="false">http://www.greattastingjava.com/wordpress/2007/06/19/atg-dynamo-drp-hung-threads-solution/</guid>
		<description><![CDATA[What is a DRP Thread?
DRP stands for Distribution and Replication Protocol.  It is the protocol for communication between an HTTP server (Web server) and an application Server (ATG). When a user clicks on a link or summits a form in his/her web browser, that information or the “request” is sent to a webserver. The [...]]]></description>
			<content:encoded><![CDATA[<p>What is a DRP Thread?<br />
DRP stands for Distribution and Replication Protocol.  It is the protocol for communication between an HTTP server (Web server) and an application Server (ATG). When a user clicks on a link or summits a form in his/her web browser, that information or the “request” is sent to a webserver. The webserver examines the request and determines if it needs to pass on the request to the application server. If it does need to pass the request, it uses the DRP protocol to send the message. Inside the application server when it receives a request, it starts a DRP thread to handle the request. That thread performs the necessary actions, and returns the response to the webserver, which then returns the response to the user’s browser.</p>
<p>Why do they get Hung?<br />
The main reason the threads hang is because it can not finish the request in a timely manner. If your data needs continuously updating, some of queries loose efficiency because their execution paths over time need to be re-analyzed. Over the last couple years we have seen this in several of our queries. </p>
<p>Since we have a set number of available DRP threads (40 in our case), when they are all hanging, the application server is no longer able to serve requests. </p>
<p>This problem is an Enterprise problem. This means all ATG applications run into this problem, if the queries don’t return.</p>
<p>The solution to the problem.</p>
<p>Overview<br />
The solution is to first monitor and identify DRP hung threads, send email regarding their hung status, and then kill them before they can do damage. This solution requires a monitor running inside the application server that will periodically take an inventory of the running DRP threads. When a thread age reaches a predetermined threshold, it will be terminated, and information about the terminated thread will be sent to a predetermined email for evaluation.</p>
<p>The following are the control inputs for the DRPThread Monitor stored in a property file. The property file is loaded upon startup.</p>
<p>This tells the monitor to auto-start.<br />
threadMonitorAutoStart = true</p>
<p>This is how often it checks the DRP threads<br />
threadMonitorWaitInterval = 5000</p>
<p>This is percent of DRP threads in use before checking threshold<br />
threadMonitorThreshold= 80</p>
<p>This is the Age limit of threads. When the age limit is surpassed<br />
thresholdAgeLimit = 300000</p>
<p>This is the max age of any thread. A thread over this age is killed<br />
maxThreadAge= 1800000</p>
<p>List of email address sent notifications when a DRP thread is killed<br />
emailNotificationList = hwilliamson@greattastingjava.com</p>
<p>Pseudo Code </p>
<p>1.	Application server starts up<br />
2.	Starts DRP Monitor</p>
<p>a.	If threadMonitorAutoStart = true, then monitor continues to start up, else it stops.<br />
b.	Loop until forced stop</p>
<ul>
i.	Check DRP server<br />
1.	percent active thread > threadMonitorThreshold &#038;&#038; age of thread > thresholdAgeLimit) || age of thread > maxThreadAge  then<br />
a.	Email info about hung thread<br />
b.	Kill thread<br />
ii.	Sleep threadMonitorWaitInterval
</ul>
<p>Code Sample</p>
<p>		while (!forcedStop) {</p>
<p>			try {</p>
<p>				RequestServerHandler handlers[] = drpServer.getRequestHandlers();</p>
<p>				int activeCount = drpServer.getActiveHandlerCount();</p>
<p>				double percentActive = (activeCount/handlers.length) *100.0;</p>
<p>				for (int i = 0; i < handlers.length; i++) {</p>
<p>					if (handlers[i] instanceof DrpServerConnection) {</p>
<p>						DrpServerConnection connection = (DrpServerConnection) handlers[i];<br />
						if (connection.getHandlingRequest()) {</p>
<p>							if ((percentActive> threadMonitorThreshold &#038;&#038; connection.getCurrentRequestTime() > thresholdAgeLimit) ||connection.getCurrentRequestTime() > maxThreadAge)<br />
							{<br />
								logger.debug(&#8221;killing:&#8221; + connection);</p>
<p>								String path = connection.getCurrentRequestPathInfo();<br />
								long time = connection.getCurrentRequestTime();</p>
<p>								connection.killHandler();</p>
<p>								Mail mail = new Mail();<br />
								mail.postMail(emailNotificationList,&#8221;DRP Thread Killed&#8221;, &#8220;Path:&#8221; +path +&#8221;\n&#8221;<br />
																							+&#8221;Time:&#8221; +time+&#8221;\n&#8221;,&#8221;hwilliamson@greattastingjava.com&#8221;);<br />
								logger.debug(&#8221;emailing:&#8221; + emailNotificationList);</p>
<p>							}<br />
						}<br />
					}<br />
				}<br />
				sleepDRPThreadMonitor();<br />
			} catch (Exception ex)<br />
			{<br />
				ex.printStackTrace();<br />
			}<br />
		}</p>
]]></content:encoded>
			<wfw:commentRss>http://www.greattastingjava.com/wordpress/index.php/2007/06/19/atg-dynamo-drp-hung-threads-solution/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Example code: Java Spring Framework HelloWorld example</title>
		<link>http://www.greattastingjava.com/wordpress/index.php/2006/01/30/example-code-java-spring-framework-helloworld-example/</link>
		<comments>http://www.greattastingjava.com/wordpress/index.php/2006/01/30/example-code-java-spring-framework-helloworld-example/#comments</comments>
		<pubDate>Mon, 30 Jan 2006 20:56:24 +0000</pubDate>
		<dc:creator>hwilliamson</dc:creator>
				<category><![CDATA[Code Examples]]></category>
		<category><![CDATA[J2EE]]></category>

		<guid isPermaLink="false">http://www.greattastingjava.com/wordpress/2006/01/30/example-code-java-spring-framework-helloworld-example/</guid>
		<description><![CDATA[I have been trying to learn about the Java Spring framework,
and here is a great Helloworld example I found: HERE
Technorati Tags:  Spring,  Java,  framework,  helloword,  code example 
]]></description>
			<content:encoded><![CDATA[<p>I have been trying to learn about the Java Spring framework,<br />
and here is a great Helloworld example I found: <a href="http://www.drrockit.com/space/Java/Simple+Spring+Demo ">HERE</a></p>
<p>Technorati Tags: <a href="http://technorati.com/tag/Spring" rel="tag"> Spring</a>, <a href="http://technorati.com/tag/Java" rel="tag"> Java</a>, <a href="http://technorati.com/tag/framework" rel="tag"> framework</a>, <a href="http://technorati.com/tag/helloword" rel="tag"> helloword</a>, <a href="http://technorati.com/tag/code+example" rel="tag"> code example </a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.greattastingjava.com/wordpress/index.php/2006/01/30/example-code-java-spring-framework-helloworld-example/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Configuring JDBC data source/JNDI name in Rational application development Environment 6.0 for Oracle</title>
		<link>http://www.greattastingjava.com/wordpress/index.php/2006/01/06/configuring-jdbc-data-sourcejndi-name-in-rational-development-environment-60-for-oracle/</link>
		<comments>http://www.greattastingjava.com/wordpress/index.php/2006/01/06/configuring-jdbc-data-sourcejndi-name-in-rational-development-environment-60-for-oracle/#comments</comments>
		<pubDate>Sat, 07 Jan 2006 00:00:26 +0000</pubDate>
		<dc:creator>hwilliamson</dc:creator>
				<category><![CDATA[J2EE]]></category>
		<category><![CDATA[JDBC]]></category>

		<guid isPermaLink="false">http://www.greattastingjava.com/wordpress/2006/01/06/configuring-jdbc-data-sourcejndi-name-in-rational-development-environment-60-for-oracle/</guid>
		<description><![CDATA[Configuring the JDBC jndi name in RAD ia a lot harder than it needs to be.
Here is how to do it.

1.	View the J2EE perspective
2.	Under “Enterprise Applications” click on your EAR folder
3.	Under META-INF
4.	Double click “application.xml”. This allows you to edit the deployment descriptor.
5.	Click on the deployment tab.
6.	Now scroll down to the bottom of the window, and [...]]]></description>
			<content:encoded><![CDATA[<p>Configuring the JDBC jndi name in RAD ia a lot harder than it needs to be.<br />
Here is how to do it.<br />
<span id="more-11"></span><br />
1.	View the J2EE perspective<br />
2.	Under “Enterprise Applications” click on your EAR folder<br />
3.	Under META-INF<br />
4.	Double click “application.xml”. This allows you to edit the deployment descriptor.<br />
5.	Click on the deployment tab.<br />
6.	Now scroll down to the bottom of the window, and you will see arrow to the left of the word “Authentication”, click it.<br />
7.	You should now see the JAAS authentication list<br />
8.	Click “add”, fill out</p>
<ol>
a.	Alias: headleyalias  (made up name used later)<br />
b.	Username: headleyuser (Database user name)<br />
c.	Password: headleyuser (Database password)</ol>
<p>9.	Now under your “server” tab, deploy/publish your EAR and start your the Websphere 6.0 development environment<br />
10.	 Right click the server and select “Run the administration console”. This will start admin console in a new window.<br />
11.	Click Login (any login will work)<br />
12.	Click “Resources”<br />
13.	Click “JDBC Providers”<br />
14.	Scroll to bottom of display and click “new”, and fill out the following fields</p>
<ol>
a.	Name: Oracle JDBC Driver<br />
b.	Description: Oracle JDBC Driver<br />
c.	Class path: C:/Oracle/Ora92/jdbc/lib/classes12.zip (on my machine)<br />
d.	Implementation class name: oracle.jdbc.pool.OracleConnectionPoolDataSource<br />
e.	Apply and OK<br />
f.	Don’t forget to save.</ol>
<p>15.	Now from the JDBC provider window click “Oracle JDBC Driver” which you just created.<br />
16.	Now on the right side of the window under “Additional properties”, click “data sources”.<br />
17.	 Click “new”, and fill out the following fields</p>
<ol>
a.	Name: Oracle JDBC Driver DataSource<br />
b.	JNDI name: jdbc/myapp ( This is the JNDI name you need to use to look up this data source)<br />
c.	Data store class name:  Select a data store helper -> Oracle 9i and prior data store helper<br />
d.	Component-managed authentication alias: select “headleyalias” (your alias)<br />
e.	Component-managed authentication: select “headleyalias” (your alias)<br />
f.	URL: jdbc:oracle:thin:@servername:1521:databasename<br />
g.	Test your connection<br />
h.	Apply and OK<br />
i.	Don’t forget to save.</ol>
<p>18.	Now under your “serv</p>
<p>er” tab, deploy/publish your EAR and restart your the Websphere 6.0 development environment.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.greattastingjava.com/wordpress/index.php/2006/01/06/configuring-jdbc-data-sourcejndi-name-in-rational-development-environment-60-for-oracle/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Message Beans: Container Vs. Bean Managed Transactions, XA Transaction problem</title>
		<link>http://www.greattastingjava.com/wordpress/index.php/2005/12/27/message-beans-container-vs-bean-managed-transactions-xa-transaction-problem/</link>
		<comments>http://www.greattastingjava.com/wordpress/index.php/2005/12/27/message-beans-container-vs-bean-managed-transactions-xa-transaction-problem/#comments</comments>
		<pubDate>Wed, 28 Dec 2005 00:20:21 +0000</pubDate>
		<dc:creator>hwilliamson</dc:creator>
				<category><![CDATA[J2EE]]></category>
		<category><![CDATA[Performance]]></category>

		<guid isPermaLink="false">http://www.greattastingjava.com/wordpress/2005/12/27/message-beans-container-vs-bean-managed-transactions-xa-transaction-problem/</guid>
		<description><![CDATA[I recently tried to get a container managed transaction message bean to read from a MQ queue then read from an oracle database.   I got an error indicating that I did not have XA Transactions turned on in my MQ queue. Then I dug a little deeper….

This is what I found:
Bean Managed Transaction [...]]]></description>
			<content:encoded><![CDATA[<p>I recently tried to get a container managed transaction message bean to read from a MQ queue then read from an oracle database.   I got an error indicating that I did not have XA Transactions turned on in my MQ queue. Then I dug a little deeper….<br />
<span id="more-7"></span></p>
<p>This is what I found:</p>
<p>Bean Managed Transaction in Message Beans:<br />
•	Single threaded if more than one data source was used.</p>
<p>Container Managed Transaction in Message Beans:<br />
•	Multi threaded even if more than one data source was used, but slower due to XA Transactions. </p>
<p>The solution I found:<br />
Use Container Management Transactions, but use a stateless session bean with bean managed transactions to access your second data source.</p>
<p><tags><br />
Message Beans, Java, MQ, Transactions<br />
</tags></p>
]]></content:encoded>
			<wfw:commentRss>http://www.greattastingjava.com/wordpress/index.php/2005/12/27/message-beans-container-vs-bean-managed-transactions-xa-transaction-problem/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MQ 5.3 performance testing with Message Beans and Websphere 6.0</title>
		<link>http://www.greattastingjava.com/wordpress/index.php/2005/12/15/mq-53-performance-testing-with-message-beans-and-websphere-60/</link>
		<comments>http://www.greattastingjava.com/wordpress/index.php/2005/12/15/mq-53-performance-testing-with-message-beans-and-websphere-60/#comments</comments>
		<pubDate>Thu, 15 Dec 2005 23:14:32 +0000</pubDate>
		<dc:creator>hwilliamson</dc:creator>
				<category><![CDATA[J2EE]]></category>
		<category><![CDATA[Performance]]></category>

		<guid isPermaLink="false">http://www.greattastingjava.com/wordpress/2005/12/15/mq-53-performance-testing-with-message-beans-and-websphere-60/</guid>
		<description><![CDATA[Earlier in the week I did some testing of MQ with message beans.
This is what I got.
10,000 very small   messages of 10 bytes going through 1 queue with persistence turned on takes about  37 seconds.
10,000 large messages of 10,000  bytes through 1 queue with persistence turned on takes about 90  [...]]]></description>
			<content:encoded><![CDATA[<div>Earlier in the week I did some testing of MQ with message beans.</div>
<div>This is what I got.</div>
<div><span class="263461620-12122005">10,000 very small   messages of 10 bytes going through 1 queue with persistence turned on takes about  37 seconds.</span></div>
<div><span class="263461620-12122005">10,000 large messages of 10,000  bytes through 1 queue with persistence turned on takes about 90  seconds</span></div>
<p>Technorati Tags: <a href="http://technorati.com/tag/Java" rel="tag">Java</a>, <a href="http://technorati.com/tag/ATG" rel="tag">ATG</a>, <a href="http://technorati.com/tag/Performance" rel="tag"> Performance</a>, <a href="http://technorati.com/tag/Optimizeit" rel="tag"> Optimizeit </a>, <a href="http://technorati.com/tag/Dynamo" rel="tag"> Dynamo</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.greattastingjava.com/wordpress/index.php/2005/12/15/mq-53-performance-testing-with-message-beans-and-websphere-60/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JNDI look up in Websphere 6.0 to Test MQ 5.3 Queue, Message Beans with JMS</title>
		<link>http://www.greattastingjava.com/wordpress/index.php/2005/12/12/jndi-look-up-in-websphere-60-to-test-mq-53-queue-message-beans-with-jms/</link>
		<comments>http://www.greattastingjava.com/wordpress/index.php/2005/12/12/jndi-look-up-in-websphere-60-to-test-mq-53-queue-message-beans-with-jms/#comments</comments>
		<pubDate>Mon, 12 Dec 2005 20:13:45 +0000</pubDate>
		<dc:creator>hwilliamson</dc:creator>
				<category><![CDATA[J2EE]]></category>

		<guid isPermaLink="false">http://www.greattastingjava.com/wordpress/2005/12/12/jndi-look-up-in-websphere-60-to-test-mq-53-queue-message-beans-with-jms/</guid>
		<description><![CDATA[If you have read my other post Configuring Rational Software Development Platform Test Environment 6.0 to use a WebSphere MQ 5.3 Queue
I used JMSAdmin as my service provider for inserting objects into the queue.
QueueIBMTest.java uses websphere 6.0 as my service provider to insert items in an MQ queue using JMS.

It will use a Websphere test [...]]]></description>
			<content:encoded><![CDATA[<div>If you have read my other post <a href="http://www.greattastingjava.com/wordpress/2005/12/12/configuring-rational-software-development-platform-test-environment-60-to-use-a-websphere-mq-53-queue/">Configuring Rational Software Development Platform Test Environment 6.0 to use a WebSphere MQ 5.3 Queue</a></div>
<div>I used JMSAdmin as my service provider for inserting objects into the queue.</div>
<div><a href="/downloads/QueueIBMTest.java">QueueIBMTest.java</a> uses websphere 6.0 as my service provider to insert items in an MQ queue using JMS.</div>
<div><span id="more-4"></span></div>
<div><span class="448370019-09122005">It will use a Websphere test server as its provider.</span></div>
<div><span class="448370019-09122005">So once you have  websphere MQ connections set up you can use this tool</span></div>
<div><span class="448370019-09122005">to test your message  bean. Of course you need to edit the connection factory and queue name to  </span></div>
<div><span class="448370019-09122005">what ever you set in  websphere.</span></div>
<div><span class="448370019-09122005">You need to add the following jars to your class path in RAD to get it to  work.</span></div>
<div><span class="448370019-09122005"> </span></div>
<div><span class="448370019-09122005">C:\Program  Files\IBM\Rational\SDP\6.0\runtimes\base_v6\lib</span></div>
<div><span class="448370019-09122005">naming.jar</span></div>
<div><span class="448370019-09122005">namingclient.jar</span></div>
<div><span class="448370019-09122005">namingserver.jar</span></div>
<div>You will also need all the jars files in C:\Program Files\IBM\WebSphere MQ\Java\lib in your classpath to run</div>
<div>To Run:</div>
<div>
<div>Java QueueIBMTest</div>
</div>
<p>Technorati Tags: <a href="http://technorati.com/tag/Java" rel="tag"> Java</a>, <a href="http://technorati.com/tag/JNDI" rel="tag"> JNDI</a>, <a href="http://technorati.com/tag/Websphere" rel="tag"> Websphere</a>, <a href="http://technorati.com/tag/Websphere+6.0" rel="tag"> Websphere 6.0</a>, <a href="http://technorati.com/tag/MQ" rel="tag"> MQ</a>, <a href="http://technorati.com/tag/Websphere+MQ" rel="tag"> Websphere MQ</a>, <a href="http://technorati.com/tag/Websphere+MQ+5.3" rel="tag"> Websphere MQ 5.3</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.greattastingjava.com/wordpress/index.php/2005/12/12/jndi-look-up-in-websphere-60-to-test-mq-53-queue-message-beans-with-jms/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Configuring Rational Software Development Platform Test Environment 6.0 to use a WebSphere MQ 5.3 Queue</title>
		<link>http://www.greattastingjava.com/wordpress/index.php/2005/12/12/configuring-rational-software-development-platform-test-environment-60-to-use-a-websphere-mq-53-queue/</link>
		<comments>http://www.greattastingjava.com/wordpress/index.php/2005/12/12/configuring-rational-software-development-platform-test-environment-60-to-use-a-websphere-mq-53-queue/#comments</comments>
		<pubDate>Mon, 12 Dec 2005 19:47:18 +0000</pubDate>
		<dc:creator>hwilliamson</dc:creator>
				<category><![CDATA[J2EE]]></category>

		<guid isPermaLink="false">http://www.greattastingjava.com/wordpress/2005/12/12/configuring-rational-software-development-platform-test-environment-60-to-use-a-websphere-mq-53-queue/</guid>
		<description><![CDATA[If you have ever tried to get a Message Bean working in Rational Software Development Platform 6.0 and Websphere MQ 5.3, you would know why this tutorial is needed good luck&#8230;.
As you go through this tutorial there are things to keep in hand

Queue Manager Name : QM_headley (default on my machine)
Queue Manager Port   [...]]]></description>
			<content:encoded><![CDATA[<p>If you have ever tried to get a Message Bean working in Rational Software Development Platform 6.0 and Websphere MQ 5.3, you would know why this tutorial is needed good luck&#8230;.</p>
<p>As you go through this tutorial there are things to keep in hand</p>
<ul>
<li>Queue Manager Name : <strong>QM_headley</strong> (default on my machine)</li>
<li>Queue Manager Port      :<strong>1414</strong> (default)</li>
<li>Queue name: <strong>headleyqueue</strong>   (created this under QM_headley in MQ      explorer )</li>
<li>File System url : <strong>file:/C:/JNDI-Directory/mq</strong></li>
<li>File System JNDI      Connection Factory name :<strong> headleyCF</strong></li>
<li>File System JNDI Queue      name : <strong>headleyq</strong></li>
<li>Websphere Provider      Connection Factory name: <strong>jms/headleyCF</strong></li>
<li>Websphere Provider Queue      name:  <strong>jms/headleyq</strong></li>
<li>Listener port name: <strong>headleyListener</strong></li>
<li>Test Java code:  <a href="/downloads/QueueTest.java">QueueTest.java</a> <a href="/downloads/QueuePut.java">QueuePut.java</a></li>
</ul>
<p><span id="more-3"></span></p>
<p>In MQ 5.3 explorer</p>
<ul>
<li>Create Queue Manager or Use      default Queue Manager</li>
<li>Create a queue in MQ series      i.e. &#8220;<strong>headleyqueue</strong>&#8220;</li>
</ul>
<p>Use there MQ&#8217;s JMSAdmin tool to set up bindings for the Queue</p>
<ul>
<li>It can be found under ->      C:\Program Files\IBM\WebSphere MQ\Java\bin</li>
<li>Edit JMSAdmin.config to be a      file system provider set the follwoing</li>
</ul>
<ul>
<li>INITIAL_CONTEXT_FACTORY=com.sun.jndi.fscontext.RefFSContextFactory</li>
<li>PROVIDER_URL=file:/C:/JNDI-Directory</li>
<li>SECURITY_AUTHENTICATION=none</li>
</ul>
<li>Create folder file:/C:/JNDI-Directory</li>
<li>run JMSAdmin.bat and set up      bindings for the Test client</li>
<li>def ctx(mq)</li>
<li>chg ctx(mq)</li>
<li>def qcf(<strong>headleyCF</strong>) qmgr(<strong>QM_7bs7j31</strong>)</li>
<li>def q(<strong>headleyq</strong>) queue(<strong>headleyqueue</strong>)</li>
<p>Test queue with this sample application</p>
<p>QueueTest -url file:/C:/JNDI-Directory/mq (you need to have all the jar file in C:\Program Files\IBM\WebSphere MQ\Java\lib in your classpath to run)<br />
In Rational Software Development Platform Test Environment 6.0</p>
<ul>
<li>Create Test Project</li>
<li>Create Test Package</li>
<li>Create Test MessageBean</li>
<li>Create Test Server</li>
<li>Add Bean to Websphere Test      Server</li>
<li>Start Websphere Test Server</li>
<li>Run Admin console and select      server1  by right clicking server</li>
</ul>
<p class="MsoNormal">Login into Admin Console with      any ID</p>
<p class="MsoNormal"><!--[if gte vml 1]><v :shape  id="_x0000_i1029" type="#_x0000_t75" style='width:431.25pt;height:324pt'>  <v :imagedata src="file:///C:\DOCUME~1\z018388\LOCALS~1\Temp\msohtml1\01\clip_image003.png"   o:title=""/> </v>< ![endif]--><!--[if !vml]--><br />
<!--[endif]--></p>
<ul>
<li>Configure Websphere MQ JMS      provider</li>
</ul>
<ul>
<li>Configure “Websphere MQ queue connection factories”under Resources/JMS providers/Websphere MQ/ in the Additional properties section (second one from the top)</li>
</ul>
<p class="MsoNormal">Click new</p>
<p class="MsoNormal">Fill out the following fields</p>
<p class="MsoNormal">Name: headleyCF  (made up name)</p>
<p class="MsoNormal">JNDI Name: jms/headleyCF  (made up JNDI name)</p>
<p class="MsoNormal">Queue Manager: QM_headley (default)</p>
<p class="MsoNormal">Host: localhost</p>
<p class="MsoNormal">Port :1414</p>
<p class="MsoNormal">Don’t forget to SAVE after pressing Apply and OK</p>
<ul>
<li>Configure “Websphere MQ queue destinations factories”under Resources/JMS providers/Websphere MQ/ in the Additional properties section (third one from the top)</li>
<li>Click new</li>
</ul>
<p class="MsoNormal">Fill out the following fields</p>
<p class="MsoNormal">Name: headleyCF  (made up name)</p>
<p class="MsoNormal">JNDI Name: jms/headleyq  (made up JNDI name)</p>
<p class="MsoNormal">Base Queue name: headleyqueue (from MQ series)</p>
<p class="MsoNormal">Base Queue Manager name: QM_headley (default on my machine)</p>
<p class="MsoNormal">Queue Manager Host: localhost</p>
<p class="MsoNormal">Queue Manager  Port :1414</p>
<p class="MsoNormal">Don’t forget to SAVE after pressing Apply and OK</p>
<ul>
<li>Configure Listener Ports with      JNDI names from Connection Factory and JMS Destinations created in previous      two steps.</li>
</ul>
<p class="MsoNormal">First select server1 under Servers/ApplicationServers.</p>
<p class="MsoNormal">Then under communications select messaging/ message listening service</p>
<p class="MsoNormal">Then click Listener Ports</p>
<p class="MsoNormal">Then Click new</p>
<p class="MsoNormal">Fill out the following fields</p>
<p class="MsoNormal">Name: headleyListener (made up name)</p>
<p class="MsoNormal">Connection Factory JNDI Name: jms/headleyCF</p>
<p class="MsoNormal">Destination JNDI name: jms/headleyq</p>
<p class="MsoNormal">Don’t forget to SAVE after pressing Apply and OK</p>
<p class="MsoNormal">Do not try to start Listener, it will start when you restart  the server</p>
<ul>
<li>Configure Message Bean with      Listener Ports</li>
</ul>
<p class="MsoNormal">In J2ee view double click bean and fill in the Listener port Name: <strong>headleyListener</strong></p>
<ul>
<li>Restart Server</li>
</ul>
<p>Test with MessageBean Test</p>
<p>QueuePut -url file:/C:/JNDI-Directory/mq (you need to have all the jar files in C:\Program Files\IBM\WebSphere MQ\Java\lib in your classpath to run)</p>
<p class="MsoNormal">
<p>Technorati Tags: <a href="http://technorati.com/tag/Websphere+MQ" rel="tag">Websphere MQ</a>, <a href="http://technorati.com/tag/Webphere+MQ+5.3" rel="tag"> Webphere MQ 5.3</a>, <a href="http://technorati.com/tag/MQ" rel="tag"> MQ</a>, <a href="http://technorati.com/tag/Rational+Development+Environment+6.0" rel="tag"> Rational Development Environment 6.0</a>, <a href="http://technorati.com/tag/Rational" rel="tag"> Rational</a>, <a href="http://technorati.com/tag/Websphere" rel="tag"> Websphere</a>, <a href="http://technorati.com/tag/Webphere+6.0" rel="tag"> Webphere 6.0 </a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.greattastingjava.com/wordpress/index.php/2005/12/12/configuring-rational-software-development-platform-test-environment-60-to-use-a-websphere-mq-53-queue/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
