<?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>Pure Insanity! &#187; Apache</title>
	<atom:link href="http://intellidick.com/wordpress/tag/apache/feed/" rel="self" type="application/rss+xml" />
	<link>http://intellidick.com/wordpress</link>
	<description>Life is hard, get a helmet.</description>
	<lastBuildDate>Mon, 17 Oct 2011 21:15:31 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Adobe Flex, BlazeDS, and TIBCO EMS</title>
		<link>http://intellidick.com/wordpress/2009/03/22/adobe-flex-blazeds-and-tibco-ems/</link>
		<comments>http://intellidick.com/wordpress/2009/03/22/adobe-flex-blazeds-and-tibco-ems/#comments</comments>
		<pubDate>Mon, 23 Mar 2009 03:47:58 +0000</pubDate>
		<dc:creator>ekrunch</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Useful Information]]></category>
		<category><![CDATA[Adobe]]></category>
		<category><![CDATA[AIR]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[BlazeDS]]></category>
		<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[EMS]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[J2EE]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[JMS]]></category>
		<category><![CDATA[TIBCO]]></category>
		<category><![CDATA[Tomcat]]></category>

		<guid isPermaLink="false">http://intellidick.com/wordpress/?p=266</guid>
		<description><![CDATA[I&#8217;ve searched high and low and can&#8217;t really find a good walk through on how to configure TIBCO EMS and BlazeDS. The documentation can also be a little gray on how to correctly use the JMS adapter so i&#8217;ve taken the liberty of putting together this little pictorial on how it&#8217;s done. First things first, [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve searched high and low and can&#8217;t really find a good walk through on how to configure TIBCO EMS and BlazeDS. The documentation can also be a little gray on how to correctly use the JMS adapter so i&#8217;ve taken the liberty of putting together this little pictorial on how it&#8217;s done.</p>
<p>First things first, get yourself a fresh copy of Eclipse. For this setup, I used Eclipse Ganymede (3.4, J2EE Edition) on Windows. You&#8217;ll need the Java stuff in addition to Flex Builder because we&#8217;re going to launch our own tomcat inside of Eclipse instead of using BlazeDS Turnkey or any of those. Also, if you want to add in Java remoting later you&#8217;ll appreciate having the components already there.</p>
<p>Next, install the Flex plugin for Eclipse and update according. I downloaded and installed the Flex 3.3 SDK and changed my default SDK in the preferences. Once the eclipse platform is installed, updated, and configured the way you like it, let&#8217;s make a new project.</p>
<address>Note: Click any one of these images for the full size version.<br />
</address>
<div id="attachment_267" class="wp-caption alignnone" style="width: 310px"><a href="http://intellidick.com/wordpress/wp-content/uploads/2009/03/1.png"><img class="size-medium wp-image-267" title="Step 1 - Create a new Project of type &quot;Other&quot;" src="http://intellidick.com/wordpress/wp-content/uploads/2009/03/1-300x225.png" alt="Step 1 - Create a new Project of type &quot;Other&quot;" width="300" height="225" /></a><p class="wp-caption-text">Step 1 - Create a new Project of type &quot;Other&quot;</p></div>
<div id="attachment_270" class="wp-caption alignnone" style="width: 310px"><a href="http://intellidick.com/wordpress/wp-content/uploads/2009/03/2.png"><img class="size-medium wp-image-270" title="Step 2 - Expand the Server category and then select Server" src="http://intellidick.com/wordpress/wp-content/uploads/2009/03/2-300x299.png" alt="Step 2 - Expand the Server category and then select Server" width="300" height="299" /></a><p class="wp-caption-text">Step 2 - Expand the Server category and then select Server</p></div>
<div id="attachment_271" class="wp-caption alignnone" style="width: 277px"><a href="http://intellidick.com/wordpress/wp-content/uploads/2009/03/3.png"><img class="size-medium wp-image-271" title="Step 3 - Create an Apache Tomcat v6.0 Server on Localhost" src="http://intellidick.com/wordpress/wp-content/uploads/2009/03/3-267x300.png" alt="Step 3 - Create an Apache Tomcat v6.0 Server on Localhost" width="267" height="300" /></a><p class="wp-caption-text">Step 3 - Create an Apache Tomcat v6.0 Server on Localhost</p></div>
<div id="attachment_272" class="wp-caption alignnone" style="width: 277px"><a href="http://intellidick.com/wordpress/wp-content/uploads/2009/03/4.png"><img class="size-medium wp-image-272" title="Step 4 - Set Installation Directory and JRE, Install if Necessary" src="http://intellidick.com/wordpress/wp-content/uploads/2009/03/4-267x300.png" alt="Step 4 - Set Installation Directory and JRE, Install if Necessary" width="267" height="300" /></a><p class="wp-caption-text">Step 4 - Set Installation Directory and JRE, Install if Necessary</p></div>
<div id="attachment_273" class="wp-caption alignnone" style="width: 277px"><a href="http://intellidick.com/wordpress/wp-content/uploads/2009/03/5.png"><img class="size-medium wp-image-273" title="Step 5 - No projects yet, just hit Finish" src="http://intellidick.com/wordpress/wp-content/uploads/2009/03/5-267x300.png" alt="Step 5 - No projects yet, just hit Finish" width="267" height="300" /></a><p class="wp-caption-text">Step 5 - No projects yet, just hit Finish</p></div>
<div id="attachment_274" class="wp-caption alignnone" style="width: 310px"><a href="http://intellidick.com/wordpress/wp-content/uploads/2009/03/6.png"><img class="size-medium wp-image-274" title="Step 6 - Create another new project of type &quot;Other&quot;" src="http://intellidick.com/wordpress/wp-content/uploads/2009/03/6-300x225.png" alt="Step 6 - Create another new project of type &quot;Other&quot;" width="300" height="225" /></a><p class="wp-caption-text">Step 6 - Create another new project of type &quot;Other&quot;</p></div>
<div id="attachment_275" class="wp-caption alignnone" style="width: 310px"><a href="http://intellidick.com/wordpress/wp-content/uploads/2009/03/7.png"><img class="size-medium wp-image-275" title="Step 7 - Now expand the Flex Builder category and select &quot;Flex Project&quot;" src="http://intellidick.com/wordpress/wp-content/uploads/2009/03/7-300x299.png" alt="Step 7 - Now expand the Flex Builder category and select &quot;Flex Project&quot;" width="300" height="299" /></a><p class="wp-caption-text">Step 7 - Now expand the Flex Builder category and select &quot;Flex Project&quot;</p></div>
<div id="attachment_276" class="wp-caption alignnone" style="width: 257px"><a href="http://intellidick.com/wordpress/wp-content/uploads/2009/03/8.png"><img class="size-medium wp-image-276" title="Step 8 - Set it for a J2EE application server and enable the combined Java/Flex project using WTP" src="http://intellidick.com/wordpress/wp-content/uploads/2009/03/8-247x300.png" alt="Step 8 - Set it for a J2EE application server and enable the combined Java/Flex project using WTP" width="247" height="300" /></a><p class="wp-caption-text">Step 8 - Set it for a J2EE application server and enable the combined Java/Flex project using WTP</p></div>
<div id="attachment_277" class="wp-caption alignnone" style="width: 257px"><a href="http://intellidick.com/wordpress/wp-content/uploads/2009/03/9.png"><img class="size-medium wp-image-277" title="Step 9 - Connect the project to your Tomcat server and select the blazeds.war that you downloaded from Adobe" src="http://intellidick.com/wordpress/wp-content/uploads/2009/03/9-247x300.png" alt="Step 9 - Connect the project to your Tomcat server and select the blazeds.war that you downloaded from Adobe" width="247" height="300" /></a><p class="wp-caption-text">Step 9 - Connect the project to your Tomcat server and select the blazeds.war that you downloaded from Adobe</p></div>
<div id="attachment_278" class="wp-caption alignnone" style="width: 233px"><a href="http://intellidick.com/wordpress/wp-content/uploads/2009/03/10.png"><img class="size-medium wp-image-278" title="Step 10 - Everything should be good here" src="http://intellidick.com/wordpress/wp-content/uploads/2009/03/10-223x300.png" alt="Step 10 - Everything should be good here" width="223" height="300" /></a><p class="wp-caption-text">Step 10 - Everything should be good here</p></div>
<div id="attachment_279" class="wp-caption alignnone" style="width: 310px"><a href="http://intellidick.com/wordpress/wp-content/uploads/2009/03/11.png"><img class="size-medium wp-image-279" title="Step 11 - If everything went well, you should see have the following files available" src="http://intellidick.com/wordpress/wp-content/uploads/2009/03/11-300x225.png" alt="Step 11 - If everything went well, you should see have the following files available" width="300" height="225" /></a><p class="wp-caption-text">Step 11 - If everything went well, you should see have the following files available</p></div>
<div id="attachment_280" class="wp-caption alignnone" style="width: 310px"><a href="http://intellidick.com/wordpress/wp-content/uploads/2009/03/12.png"><img class="size-medium wp-image-280" title="Step 12 - Open the web.xml, messaging-config.xml, and services-config.xml" src="http://intellidick.com/wordpress/wp-content/uploads/2009/03/12-300x225.png" alt="Step 12 - Open the web.xml, messaging-config.xml, and services-config.xml" width="300" height="225" /></a><p class="wp-caption-text">Step 12 - Open the web.xml, messaging-config.xml, and services-config.xml</p></div>
<p>First, let&#8217;s edit web.xml. This file should be okay out of the box. Here&#8217;s mine as a reference.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
</pre></td><td class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;?xml</span> <span style="color: #000066;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span> <span style="color: #000066;">encoding</span>=<span style="color: #ff0000;">&quot;UTF-8&quot;</span><span style="color: #000000; font-weight: bold;">?&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;web-app</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;WebApp_ID&quot;</span> <span style="color: #000066;">version</span>=<span style="color: #ff0000;">&quot;2.4&quot;</span> <span style="color: #000066;">xmlns</span>=<span style="color: #ff0000;">&quot;http://java.sun.com/xml/ns/j2ee&quot;</span> <span style="color: #000066;">xmlns:xsi</span>=<span style="color: #ff0000;">&quot;http://www.w3.org/2001/XMLSchema-instance&quot;</span> <span style="color: #000066;">xsi:schemaLocation</span>=<span style="color: #ff0000;">&quot;http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;display-name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>blaze1<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/display-name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;context-param<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;param-name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>flex.class.path<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/param-name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;param-value<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>/WEB-INF/flex/hotfixes,/WEB-INF/flex/jars<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/param-value<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/context-param<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
	<span style="color: #808080; font-style: italic;">&lt;!-- Http Flex Session attribute and binding listener support --&gt;</span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;listener<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;listener-class<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>flex.messaging.HttpFlexSession<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/listener-class<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/listener<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
	<span style="color: #808080; font-style: italic;">&lt;!-- MessageBroker Servlet --&gt;</span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;servlet<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;servlet-name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>MessageBrokerServlet<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/servlet-name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;servlet-class<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>flex.messaging.MessageBrokerServlet<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/servlet-class<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;init-param<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;param-name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>services.configuration.file<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/param-name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;param-value<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>/WEB-INF/flex/services-config.xml<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/param-value<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/init-param<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;init-param<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;param-name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>flex.write.path<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/param-name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;param-value<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>/WEB-INF/flex<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/param-value<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/init-param<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;load-on-startup<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>1<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/load-on-startup<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/servlet<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;servlet-mapping<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;servlet-name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>MessageBrokerServlet<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/servlet-name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;url-pattern<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>/messagebroker/*<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/url-pattern<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/servlet-mapping<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;welcome-file-list<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;welcome-file<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>index.html<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/welcome-file<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;welcome-file<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>index.htm<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/welcome-file<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;welcome-file<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>index.jsp<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/welcome-file<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;welcome-file<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>default.html<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/welcome-file<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;welcome-file<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>default.htm<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/welcome-file<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;welcome-file<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>default.jsp<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/welcome-file<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/welcome-file-list<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
	<span style="color: #808080; font-style: italic;">&lt;!-- for WebSphere deployment, please uncomment --&gt;</span>
	<span style="color: #808080; font-style: italic;">&lt;!--</span>
<span style="color: #808080; font-style: italic;">		&lt;resource-ref&gt;</span>
<span style="color: #808080; font-style: italic;">		&lt;description&gt;Flex Messaging WorkManager&lt;/description&gt;</span>
<span style="color: #808080; font-style: italic;">		&lt;res-ref-name&gt;wm/MessagingWorkManager&lt;/res-ref-name&gt;</span>
<span style="color: #808080; font-style: italic;">		&lt;res-type&gt;com.ibm.websphere.asynchbeans.WorkManager&lt;/res-type&gt;</span>
<span style="color: #808080; font-style: italic;">		&lt;res-auth&gt;Container&lt;/res-auth&gt;</span>
<span style="color: #808080; font-style: italic;">		&lt;res-sharing-scope&gt;Shareable&lt;/res-sharing-scope&gt;</span>
<span style="color: #808080; font-style: italic;">	&lt;/resource-ref&gt;</span>
<span style="color: #808080; font-style: italic;">	--&gt;</span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/web-app<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></td></tr></table></div>

<p>Now let&#8217;s edit services-config.xml. Key things to note here is that i&#8217;ve disabled the inclusion of the remoting-config.xml and the proxy-config.xml since i&#8217;m not using them. I&#8217;ve also changed the default AMF channel from &#8220;my-amf&#8221; to &#8220;AmfChannel1&#8243; and updated the endpoint URL. Everything else is pretty much the same.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
</pre></td><td class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;?xml</span> <span style="color: #000066;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span> <span style="color: #000066;">encoding</span>=<span style="color: #ff0000;">&quot;UTF-8&quot;</span><span style="color: #000000; font-weight: bold;">?&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;services-config<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;services<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    	<span style="color: #808080; font-style: italic;">&lt;!--</span>
<span style="color: #808080; font-style: italic;">        &lt;service-include file-path=&quot;remoting-config.xml&quot; /&gt;</span>
<span style="color: #808080; font-style: italic;">        &lt;service-include file-path=&quot;proxy-config.xml&quot; /&gt;</span>
<span style="color: #808080; font-style: italic;">        --&gt;</span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;service-include</span> <span style="color: #000066;">file-path</span>=<span style="color: #ff0000;">&quot;messaging-config.xml&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>        
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/services<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;security<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;login-command</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;flex.messaging.security.TomcatLoginCommand&quot;</span> <span style="color: #000066;">server</span>=<span style="color: #ff0000;">&quot;Tomcat&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #808080; font-style: italic;">&lt;!-- Uncomment the correct app server</span>
<span style="color: #808080; font-style: italic;">        &lt;login-command class=&quot;flex.messaging.security.TomcatLoginCommand&quot; server=&quot;JBoss&quot;&gt;</span>
<span style="color: #808080; font-style: italic;">		&lt;login-command class=&quot;flex.messaging.security.JRunLoginCommand&quot; server=&quot;JRun&quot;/&gt;        </span>
<span style="color: #808080; font-style: italic;">        &lt;login-command class=&quot;flex.messaging.security.WeblogicLoginCommand&quot; server=&quot;Weblogic&quot;/&gt;</span>
<span style="color: #808080; font-style: italic;">        &lt;login-command class=&quot;flex.messaging.security.WebSphereLoginCommand&quot; server=&quot;WebSphere&quot;/&gt;</span>
<span style="color: #808080; font-style: italic;">        --&gt;</span>
&nbsp;
        <span style="color: #808080; font-style: italic;">&lt;!-- </span>
<span style="color: #808080; font-style: italic;">        &lt;security-constraint id=&quot;basic-read-access&quot;&gt;</span>
<span style="color: #808080; font-style: italic;">            &lt;auth-method&gt;Basic&lt;/auth-method&gt;</span>
<span style="color: #808080; font-style: italic;">            &lt;roles&gt;</span>
<span style="color: #808080; font-style: italic;">                &lt;role&gt;guests&lt;/role&gt;</span>
<span style="color: #808080; font-style: italic;">                &lt;role&gt;accountants&lt;/role&gt;</span>
<span style="color: #808080; font-style: italic;">                &lt;role&gt;employees&lt;/role&gt;</span>
<span style="color: #808080; font-style: italic;">                &lt;role&gt;managers&lt;/role&gt;</span>
<span style="color: #808080; font-style: italic;">            &lt;/roles&gt;</span>
<span style="color: #808080; font-style: italic;">        &lt;/security-constraint&gt;</span>
<span style="color: #808080; font-style: italic;">         --&gt;</span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/security<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;channels<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;channel-definition</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;AmfChannel1&quot;</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;mx.messaging.channels.AMFChannel&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;endpoint</span> <span style="color: #000066;">url</span>=<span style="color: #ff0000;">&quot;http://{server.name}:{server.port}/{context.root}/messagebroker/AmfChannel1&quot;</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;flex.messaging.endpoints.AMFEndpoint&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/channel-definition<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/channels<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;logging<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;target</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;flex.messaging.log.ConsoleTarget&quot;</span> <span style="color: #000066;">level</span>=<span style="color: #ff0000;">&quot;Error&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;properties<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;prefix<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>[BlazeDS] <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/prefix<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;includeDate<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>false<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/includeDate<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;includeTime<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>false<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/includeTime<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;includeLevel<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>false<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/includeLevel<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;includeCategory<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>false<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/includeCategory<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/properties<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;filters<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;pattern<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Endpoint.*<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/pattern<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;pattern<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Service.*<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/pattern<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;pattern<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Configuration<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/pattern<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/filters<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/target<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/logging<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;system<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;redeploy<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;enabled<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>false<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/enabled<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #808080; font-style: italic;">&lt;!-- </span>
<span style="color: #808080; font-style: italic;">            &lt;watch-interval&gt;20&lt;/watch-interval&gt;</span>
<span style="color: #808080; font-style: italic;">            &lt;watch-file&gt;{context.root}/WEB-INF/flex/services-config.xml&lt;/watch-file&gt;</span>
<span style="color: #808080; font-style: italic;">            &lt;watch-file&gt;{context.root}/WEB-INF/flex/proxy-config.xml&lt;/watch-file&gt;</span>
<span style="color: #808080; font-style: italic;">            &lt;watch-file&gt;{context.root}/WEB-INF/flex/remoting-config.xml&lt;/watch-file&gt;</span>
<span style="color: #808080; font-style: italic;">            &lt;watch-file&gt;{context.root}/WEB-INF/flex/messaging-config.xml&lt;/watch-file&gt;</span>
<span style="color: #808080; font-style: italic;">            &lt;watch-file&gt;{context.root}/WEB-INF/flex/data-management-config.xml&lt;/watch-file&gt;</span>
<span style="color: #808080; font-style: italic;">            &lt;touch-file&gt;{context.root}/WEB-INF/web.xml&lt;/touch-file&gt;</span>
<span style="color: #808080; font-style: italic;">             --&gt;</span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/redeploy<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/system<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/services-config<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></td></tr></table></div>

<p>And last but not least, messaging-config.xml. This file is where the JMS connection is made to the TIBCO EMS server. And no, you do not have to put anything in context.xml when you&#8217;re doing it this way. <img src='http://intellidick.com/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
</pre></td><td class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;?xml</span> <span style="color: #000066;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span> <span style="color: #000066;">encoding</span>=<span style="color: #ff0000;">&quot;UTF-8&quot;</span><span style="color: #000000; font-weight: bold;">?&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;service</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;message-service&quot;</span> </span>
<span style="color: #009900;">    <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;flex.messaging.services.MessageService&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
&nbsp;
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;adapters<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;adapter-definition</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;actionscript&quot;</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;flex.messaging.services.messaging.adapters.ActionScriptAdapter&quot;</span> <span style="color: #000066;">default</span>=<span style="color: #ff0000;">&quot;true&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;adapter-definition</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;jms&quot;</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;flex.messaging.services.messaging.adapters.JMSAdapter&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/adapters<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;default-channels<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;channel</span> <span style="color: #000066;">ref</span>=<span style="color: #ff0000;">&quot;AmfChannel1&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/default-channels<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;destination</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;jmsDest1&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;properties<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;jms<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
				<span style="color: #808080; font-style: italic;">&lt;!-- topic/queue --&gt;</span>
				<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;destination-type<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>topic<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/destination-type<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
				<span style="color: #808080; font-style: italic;">&lt;!-- What type of message we expect --&gt;</span>
				<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;message-type<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>javax.jms.TextMessage<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/message-type<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
				<span style="color: #808080; font-style: italic;">&lt;!-- This is the JNDI name of the topic/queue connection factory on the server --&gt;</span>
				<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;connection-factory<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>TopicConnectionFactory<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/connection-factory<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
				<span style="color: #808080; font-style: italic;">&lt;!-- This is the JNDI name of the topic/queue on the server --&gt;</span>
				<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;destination-jndi-name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>testTopic<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/destination-jndi-name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
				<span style="color: #808080; font-style: italic;">&lt;!-- Keep JMS headers when the message is delivered to Flex --&gt;</span>
				<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;preserve-jms-headers<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>true<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/preserve-jms-headers<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
				<span style="color: #808080; font-style: italic;">&lt;!-- If we're producing on this destination, what parameters should be used --&gt;</span>				
				<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;delivery-mode<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>NON_PERSISTENT<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/delivery-mode<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
				<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;message-priority<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>DEFAULT_PRIORITY<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/message-priority<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
				<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;acknowledge-mode<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>AUTO_ACKNOWLEDGE<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/acknowledge-mode<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
				<span style="color: #808080; font-style: italic;">&lt;!-- The following lines are for the JNDI connection --&gt;</span>
				<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;initial-context-environment<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
					<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;property<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
						<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Context.INITIAL_CONTEXT_FACTORY<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
						<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;value<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>com.tibco.tibjms.naming.TibjmsInitialContextFactory<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/value<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>             
					<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/property<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
					<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;property<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
						<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Context.PROVIDER_URL<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
						<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;value<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>tcp://localhost:7222<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/value<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>             
					<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/property<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
					<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;property<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
						<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Context.SECURITY_PRINCIPAL<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
						<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;value<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>admin<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/value<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
					<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/property<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
					<span style="color: #808080; font-style: italic;">&lt;!-- Uncomment if you have a password</span>
<span style="color: #808080; font-style: italic;">					&lt;property&gt;</span>
<span style="color: #808080; font-style: italic;">						&lt;name&gt;Context.SECURITY_CREDENTIALS&lt;/name&gt;</span>
<span style="color: #808080; font-style: italic;">						&lt;value&gt;password&lt;/value&gt;</span>
<span style="color: #808080; font-style: italic;">					&lt;/property&gt;</span>
<span style="color: #808080; font-style: italic;">					--&gt;</span>
				<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/initial-context-environment<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/jms<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/properties<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;channels<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;channel</span> <span style="color: #000066;">ref</span>=<span style="color: #ff0000;">&quot;AmfChannel1&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/channels<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;adapter</span> <span style="color: #000066;">ref</span>=<span style="color: #ff0000;">&quot;jms&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/destination<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/service<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></td></tr></table></div>

<p>Now we have our Tomcat instance set up, time to import some class libraries.</p>
<div id="attachment_320" class="wp-caption alignnone" style="width: 310px"><a href="http://intellidick.com/wordpress/wp-content/uploads/2009/03/13.png"><img class="size-medium wp-image-320" title="Step 13 - Right Click the lib directory under WebContent/WEB-INF/lib select Import" src="http://intellidick.com/wordpress/wp-content/uploads/2009/03/13-300x225.png" alt="Step 13 - Right Click the lib directory under WebContent/WEB-INF/lib select Import" width="300" height="225" /></a><p class="wp-caption-text">Step 13 - Right Click the lib directory under WebContent/WEB-INF/lib select Import</p></div>
<div id="attachment_321" class="wp-caption alignnone" style="width: 266px"><a href="http://intellidick.com/wordpress/wp-content/uploads/2009/03/14.png"><img class="size-medium wp-image-321" title="Step 14 - Select General and then File System" src="http://intellidick.com/wordpress/wp-content/uploads/2009/03/14-256x300.png" alt="Step 14 - Select General and then File System" width="256" height="300" /></a><p class="wp-caption-text">Step 14 - Select General and then File System</p></div>
<div id="attachment_322" class="wp-caption alignnone" style="width: 277px"><a href="http://intellidick.com/wordpress/wp-content/uploads/2009/03/15.png"><img class="size-medium wp-image-322" title="Step 15 - Select the TIBCO EMS 5.x library directory and select all of the .jar files (There are more than what is pictured here)" src="http://intellidick.com/wordpress/wp-content/uploads/2009/03/15-267x300.png" alt="Step 15 - Select the TIBCO EMS 5.x library directory and select all of the .jar files (There are more than what is pictured here)" width="267" height="300" /></a><p class="wp-caption-text">Step 15 - Select the TIBCO EMS 5.x library directory and select all of the .jar files (There are more than what is pictured here)</p></div>
<div id="attachment_324" class="wp-caption alignnone" style="width: 310px"><a href="http://intellidick.com/wordpress/wp-content/uploads/2009/03/16.png"><img class="size-medium wp-image-324" title="Step 16 - Open up the server view by selecting Window -&gt; Show View -&gt; Other" src="http://intellidick.com/wordpress/wp-content/uploads/2009/03/16-300x224.png" alt="Step 16 - Open up the server view by selecting Window -&gt; Show View -&gt; Other" width="300" height="224" /></a><p class="wp-caption-text">Step 16 - Open up the server view by selecting Window -&gt; Show View -&gt; Other</p></div>
<div id="attachment_325" class="wp-caption alignnone" style="width: 206px"><a href="http://intellidick.com/wordpress/wp-content/uploads/2009/03/17.png"><img class="size-medium wp-image-325" title="Step 17 - Select the Server category and select Servers" src="http://intellidick.com/wordpress/wp-content/uploads/2009/03/17-196x300.png" alt="Step 17 - Select the Server category and select Servers" width="196" height="300" /></a><p class="wp-caption-text">Step 17 - Select the Server category and select Servers</p></div>
<div id="attachment_326" class="wp-caption alignnone" style="width: 310px"><a href="http://intellidick.com/wordpress/wp-content/uploads/2009/03/18.png"><img class="size-medium wp-image-326" title="Step 18 - Click the Servers tab that appeared at the bottom, highlight the Tomcat Server and click the Debug icon" src="http://intellidick.com/wordpress/wp-content/uploads/2009/03/18-300x224.png" alt="Step 18 - Click the Servers tab that appeared at the bottom, highlight the Tomcat Server and click the Debug icon" width="300" height="224" /></a><p class="wp-caption-text">Step 18 - Click the Servers tab that appeared at the bottom, highlight the Tomcat Server and click the Debug icon</p></div>
<div id="attachment_327" class="wp-caption alignnone" style="width: 310px"><a href="http://intellidick.com/wordpress/wp-content/uploads/2009/03/19.png"><img class="size-medium wp-image-327" title="Step 19 - Start the EMS Server instance" src="http://intellidick.com/wordpress/wp-content/uploads/2009/03/19-300x151.png" alt="Step 19 - Start the EMS Server instance" width="300" height="151" /></a><p class="wp-caption-text">Step 19 - Start the EMS Server instance</p></div>
<div id="attachment_323" class="wp-caption alignnone" style="width: 310px"><a href="http://intellidick.com/wordpress/wp-content/uploads/2009/03/20.png"><img class="size-medium wp-image-323" title="Step 20 - Create the topic that was referenced in the messaging-config.xml file" src="http://intellidick.com/wordpress/wp-content/uploads/2009/03/20-300x151.png" alt="Step 20 - Create the topic that was referenced in the messaging-config.xml file" width="300" height="151" /></a><p class="wp-caption-text">Step 20 - Create the topic that was referenced in the messaging-config.xml file</p></div>
<p>Now jump back into Eclipse and set up the application. I started with a base form, added a text area and called it a day. Here&#8217;s the code to add in the message consumer, channel configuration, and event handlers.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
</pre></td><td class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;?xml</span> <span style="color: #000066;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span> <span style="color: #000066;">encoding</span>=<span style="color: #ff0000;">&quot;utf-8&quot;</span><span style="color: #000000; font-weight: bold;">?&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;mx:Application</span> <span style="color: #000066;">xmlns:mx</span>=<span style="color: #ff0000;">&quot;http://www.adobe.com/2006/mxml&quot;</span></span>
<span style="color: #009900;">	<span style="color: #000066;">applicationComplete</span>=<span style="color: #ff0000;">&quot;messageConsumer.subscribe()&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;mx:Script<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #339933;">&lt;![CDATA[</span>
<span style="color: #339933;">			// Import the required namespaces</span>
<span style="color: #339933;">			import mx.messaging.events.MessageEvent;</span>
<span style="color: #339933;">			import mx.messaging.events.ChannelEvent;</span>
<span style="color: #339933;">			import mx.messaging.messages.AsyncMessage;</span>
&nbsp;
<span style="color: #339933;">			private function incomingMessageHandler(event:MessageEvent):void</span>
<span style="color: #339933;">			{</span>
<span style="color: #339933;">				logArea.text += (event.message.body + &quot;\r&quot;);</span>
<span style="color: #339933;">			}</span>
&nbsp;
<span style="color: #339933;">			private function connectEventHandler(event:ChannelEvent):void</span>
<span style="color: #339933;">			{</span>
<span style="color: #339933;">				logArea.text += (event.channel.endpoint + &quot; is now connected.\r&quot;);</span>
<span style="color: #339933;">			}</span>
&nbsp;
<span style="color: #339933;">			private function disconnectEventHandler(event:ChannelEvent):void</span>
<span style="color: #339933;">			{</span>
<span style="color: #339933;">				logArea.text += (event.channel.endpoint + &quot; is now disconnected.\r&quot;);</span>
<span style="color: #339933;">			}</span>
<span style="color: #339933;">		]]&gt;</span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/mx:Script<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;mx:TextArea</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;logArea&quot;</span> <span style="color: #000066;">editable</span>=<span style="color: #ff0000;">&quot;false&quot;</span> <span style="color: #000066;">width</span>=<span style="color: #ff0000;">&quot;95%&quot;</span> <span style="color: #000066;">height</span>=<span style="color: #ff0000;">&quot;95%&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;mx:Consumer</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;messageConsumer&quot;</span></span>
<span style="color: #009900;">		<span style="color: #000066;">destination</span>=<span style="color: #ff0000;">&quot;jmsDest1&quot;</span></span>
<span style="color: #009900;">		<span style="color: #000066;">message</span>=<span style="color: #ff0000;">&quot;incomingMessageHandler(event)&quot;</span></span>
<span style="color: #009900;">		<span style="color: #000066;">channelConnect</span>=<span style="color: #ff0000;">&quot;connectEventHandler(event)&quot;</span></span>
<span style="color: #009900;">		<span style="color: #000066;">channelDisconnect</span>=<span style="color: #ff0000;">&quot;disconnectEventHandler(event)&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;mx:channelSet<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;mx:ChannelSet<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
				<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;mx:channels<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
					<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;mx:AMFChannel</span></span>
<span style="color: #009900;">						<span style="color: #000066;">url</span>=<span style="color: #ff0000;">&quot;http://localhost:8080/blaze1/messagebroker/AmfChannel1&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
				<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/mx:channels<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/mx:ChannelSet<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/mx:channelSet<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>		
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/mx:Consumer<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/mx:Application<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></td></tr></table></div>

<p>That should do it for the code work &#8230; now for the fun stuff. <img src='http://intellidick.com/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<div id="attachment_333" class="wp-caption alignnone" style="width: 310px"><a href="http://intellidick.com/wordpress/wp-content/uploads/2009/03/21.png"><img class="size-medium wp-image-333" title="Step 21 - Fire up the debugger (use the dropdown next to the button)" src="http://intellidick.com/wordpress/wp-content/uploads/2009/03/21-300x224.png" alt="Step 21 - Fire up the debugger (use the dropdown next to the button)" width="300" height="224" /></a><p class="wp-caption-text">Step 21 - Fire up the debugger (use the dropdown next to the button)</p></div>
<div id="attachment_334" class="wp-caption alignnone" style="width: 310px"><a href="http://intellidick.com/wordpress/wp-content/uploads/2009/03/22.png"><img class="size-medium wp-image-334" title="Step 22 - Select Debug As, then Debug on Server" src="http://intellidick.com/wordpress/wp-content/uploads/2009/03/22-300x224.png" alt="Step 22 - Select Debug As, then Debug on Server" width="300" height="224" /></a><p class="wp-caption-text">Step 22 - Select Debug As, then Debug on Server</p></div>
<div id="attachment_335" class="wp-caption alignnone" style="width: 241px"><a href="http://intellidick.com/wordpress/wp-content/uploads/2009/03/23.png"><img class="size-medium wp-image-335" title="Step 23 - Select the installed Tomcat image" src="http://intellidick.com/wordpress/wp-content/uploads/2009/03/23-231x300.png" alt="Step 23 - Select the installed Tomcat image" width="231" height="300" /></a><p class="wp-caption-text">Step 23 - Select the installed Tomcat image</p></div>
<div id="attachment_336" class="wp-caption alignnone" style="width: 241px"><a href="http://intellidick.com/wordpress/wp-content/uploads/2009/03/24.png"><img class="size-medium wp-image-336" title="Step 24 - The project should appear on the right, press Finish" src="http://intellidick.com/wordpress/wp-content/uploads/2009/03/24-231x300.png" alt="Step 24 - The project should appear on the right, press Finish" width="231" height="300" /></a><p class="wp-caption-text">Step 24 - The project should appear on the right, press Finish</p></div>
<address>Note : The first debug attempt will fail because Eclipse doesn&#8217;t correctly deploy the application. What I haven&#8217;t figured out is how to correctly associate the project without using the Debug or Run options. If you know a better way, leave a comment. <img src='http://intellidick.com/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
</address>
<div id="attachment_337" class="wp-caption alignnone" style="width: 310px"><a href="http://intellidick.com/wordpress/wp-content/uploads/2009/03/25.png"><img class="size-medium wp-image-337" title="Step 25 - Hit Debug As again and hit the &quot;Flex Application&quot; choice" src="http://intellidick.com/wordpress/wp-content/uploads/2009/03/25-300x300.png" alt="Step 25 - Hit Debug As again and hit the &quot;Flex Application&quot; choice" width="300" height="300" /></a><p class="wp-caption-text">Step 25 - Hit Debug As again and hit the &quot;Flex Application&quot; choice</p></div>
<div id="attachment_338" class="wp-caption alignnone" style="width: 310px"><a href="http://intellidick.com/wordpress/wp-content/uploads/2009/03/26.png"><img class="size-medium wp-image-338" title="Step 26 - If everything worked, you should now be staring at the application and should have a message that the channel has connected." src="http://intellidick.com/wordpress/wp-content/uploads/2009/03/26-300x231.png" alt="Step 26 - If everything worked, you should now be staring at the application and should have a message that the channel has connected." width="300" height="231" /></a><p class="wp-caption-text">Step 26 - If everything worked, you should now be staring at the application and should have a message that the channel has connected.</p></div>
<div id="attachment_339" class="wp-caption alignnone" style="width: 310px"><a href="http://intellidick.com/wordpress/wp-content/uploads/2009/03/27.png"><img class="size-medium wp-image-339" title="Step 27 - Now send a text message to the JMS topic using your favorite JMS client and enjoy the result!" src="http://intellidick.com/wordpress/wp-content/uploads/2009/03/27-300x231.png" alt="Step 27 - Now send a text message to the JMS topic using your favorite JMS client and enjoy the result!" width="300" height="231" /></a><p class="wp-caption-text">Step 27 - Now send a text message to the JMS topic using your favorite JMS client and enjoy the result!</p></div>
<p>That should do it! Enjoy your new found JMS happiness. As a reference, a Channel is what the Flex application uses to communicate with BlazeDS and can be HTTP or AMF. A Destination is where you send the messages to and from. A lot of the examples i&#8217;ve found don&#8217;t show you how to declare what channel you&#8217;re talking to as it&#8217;s supposed to be handled automatically, i&#8217;ve found this to be unreliable and once I started specifying the channel everything started working flawlessly so i&#8217;m staying with it. Also, you can do multiple channels for redundancy and such, but that&#8217;s a lesson for another day. <img src='http://intellidick.com/wordpress/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://intellidick.com/wordpress/2009/03/22/adobe-flex-blazeds-and-tibco-ems/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

