tag:blogger.com,1999:blog-80617430957510245792024-03-23T06:13:22.939-04:00The Tech LabSharing practical knowledge of technology with a focus on integration.Rod Bireschhttp://www.blogger.com/profile/06547791022967979648noreply@blogger.comBlogger23125tag:blogger.com,1999:blog-8061743095751024579.post-24599488073740131652013-02-13T11:59:00.000-05:002023-08-23T06:26:05.940-04:00I've decided to start a new blog <a href="https://biresch.com/">biresch.com</a>. Why? Well when I started this blog the primary focus was on SOA and Integration. At the time creating a blog focused on SOA technologies seemed like a good idea. Now years later, I find this focus blog is limiting my ability to blog on other things that find interesting even if it's not of a technical nature. <br />
<br />
This blog will remain available however, I won't be adding any new content. All new content will be posted on <a href="https://biresch.com/">biresch.com</a>. I hope you stop by and take a look.<br />
<br />
Cheers!Rod Bireschhttp://www.blogger.com/profile/06547791022967979648noreply@blogger.com1tag:blogger.com,1999:blog-8061743095751024579.post-37044930546444276422012-01-26T08:09:00.001-05:002012-01-26T08:25:42.822-05:007th Annual Emerging Technologies for the EnterpriseMy company <a href="http://chariotsolutions.com/" target="_blank">Chariot Solutions</a> is hosting the 7th Annual <a href="http://phillyemergingtech.com/2012/" target="_blank">Emerging Technologies for the Enterprise</a> April 10-12th in Philadelphia, PA. This is an awesome event and the only one like it on the east coast. I believe we have the best line up of <a href="http://phillyemergingtech.com/2012/speakers" target="_blank">speakers</a> this year ever. There's always great food and a lot of fun. The hotel is only a block from Chestnut Street in Olde City where there's plenty of places to grab a drink and relax. Hope to see you there!Rod Bireschhttp://www.blogger.com/profile/06547791022967979648noreply@blogger.com0tag:blogger.com,1999:blog-8061743095751024579.post-86505999513450538752011-01-04T08:51:00.001-05:002011-01-04T09:38:42.746-05:00Completely Remove MySQL on Mac OS XI was getting my Mac ready to do some Rails development with a MySQL database and I ran into a problem installing <a href="http://www.mysql.com/downloads/mysql/">MySQL 5.5.8</a> on OS X 10.6.5. I downloaded the .DMG and ran through the mysql-5.1.54-osx10.6-x86_64.pkg installer without a problem. However, after installing the server and the MySQL.prefPane I could not start the server from the preference pane. Then I noticed that the installer did not run scripts/mysql_install_db as part of the post installation process. Well my first thought is that I obviously did something wrong so I thought I'd remove MySQL and start over again. So, I did some googling and found these steps to completely remove MySQL:<br />
<br />
<br />
<ol><li>sudo rm /usr/local/mysql</li>
<li>sudo rm -rf /usr/local/mysql*</li>
<li>sudo rm -rf /Library/StartupItems/MySQLCOM</li>
<li>sudo rm -rf /Library/PreferencePanes/My*</li>
<li>(Edit /etc/hostconfig) sudo vi /etc/hostconfig (Remove line MYSQLCOM=-YES)</li>
<li>sudo rm -rf /Library/Receipts/mysql*</li>
<li>sudo rm -rf /Library/Receipts/MySQL*</li>
<li>sudo rm -rf /var/db/receipts/com.mysql.*</li>
</ol><br />
Apparently the receipts are in a different location for the newer versions of MySQL so line #8 was added to clean them out as well. Remember, these steps will completely remove MySQL and any data residing in the default locations.<br />
<br />
So, back to my struggles. I ended up installing MySQL 5.5.8 a couple of times using different archives with the same result so this removal process came in real handy...I almost made a script out of it. After getting pretty frustrated with version 5.5.8 I ended up installing <a href="http://www.mysql.com/downloads/mysql/5.1.html">version 5.1.54</a> without a problem and it is running fine!?!?!<br />
<br />
Cheers!Rod Bireschhttp://www.blogger.com/profile/06547791022967979648noreply@blogger.com23tag:blogger.com,1999:blog-8061743095751024579.post-50555273932764649392010-09-22T09:07:00.000-04:002010-09-22T09:07:31.706-04:00Chariot Solutions Fall EventsHere are a couple of events that I'd recommend considering...<br />
<br />
<a href="http://www.chariotsolutions.com/events/ci">Continuous Integration for the Enterprise</a> - Tuesday, October 12, 2010<br />
<br />
<a href="http://www.chariotsolutions.com/events/show/50">Mobile Application Development Series</a> - Tuesday, November 9th, 2010<br />
<br />
Cheers!Rod Bireschhttp://www.blogger.com/profile/06547791022967979648noreply@blogger.com0tag:blogger.com,1999:blog-8061743095751024579.post-79200710495997061632010-08-03T11:38:00.001-04:002010-08-04T07:16:27.782-04:00PGP Encryption with Mule ESBRecently I encounter an encryption problem in Mule ESB that surprised me...I could not figure out how to encrypt a message?!?! I wasn't able to find an example on how PGP "encryption" should be configured even after numerous google and mule forum searches. I was getting a little concerned that the PGP support in mule may be for decryption only. The <a href="http://www.mulesoft.org/documentation/display/MULE2USER/PGP+Security">PGP Security documentation</a> shows how to setup a security filter to decrypt messages but no example for encrypting (that may change soon...more on that later). I finally <a href="http://forums.mulesoft.org/thread.jspa?threadID=3764&tstart=0">posted a question on the mule forum</a> and got some help from the community.<br />
<br />
First of all, I should of been looking at the transformers in mule to perform encryption...duh! I was so focused on trying to get the security filter to encrypt messages that I forgot about transformers...I know it's hard to image :) I found out the there is an <a href="http://www.mulesoft.org/documentation/display/MULE2USER/Transformers+Configuration+Reference#TransformersConfigurationReference-EncryptTransformer"><encrypt-transformer></a> and was a little embarrassed that I didn't find it before. So, I configured the <encrypt-transformer> to use the <pgp:keybased-encryption-strategy> just like I did for the security filter per the <a href="http://www.mulesoft.org/documentation/display/MULE2USER/PGP+Security">PGP Security documentation</a>. I thought "wow, that was easy", ran my configuration and got a NullPointerException. :(<br />
<br />
I could see in the stacktrace that the problem was in the KeyBasedEncryptionStrategy, which was surprising because I was referencing the same <pgp:keybased-encryption-strategy> configuration in the security filter and that was working fine. Then after taking a closer look at the security filter configuration I noticed that I was missing a reference to the credentialsAccessor. The problem I was faced with is how to configured the <encrypt-transformer> to use the credentialsAccessor I was using? Spring to the rescue! The solution is quite simple. Basically, all I had to do was inject the credentialsAccessor into the KeyBasedEncryptionStrategy. To do that I had to configure a new spring bean (id="keyBEStrategy" below) and inject my keyManager and credentialsAccessor. The nice thing about this solution is that the <encrypt-transformer> can still be used as is with just referencing the newly created strategy (i.e., strategy-ref="keyBEStrategy"). Here's an example configuration:<br />
<br />
<div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"><?xml version="1.0"?></span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"><mule xmlns="http://www.mulesource.org/schema/mule/core/2.2" </span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" </span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> xmlns:spring="http://www.springframework.org/schema/beans" </span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> xmlns:file="http://www.mulesource.org/schema/mule/file/2.2" </span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> xmlns:pgp="http://www.mulesource.org/schema/mule/pgp/2.2"</span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> xmlns:stdio="http://www.mulesource.org/schema/mule/stdio/2.2"</span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> xsi:schemaLocation="http://www.springframework.org/schema/beans </span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> http://www.springframework.org/schema/beans/spring-beans-2.5.xsd</span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> http://www.mulesource.org/schema/mule/core/2.2 </span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> http://www.mulesource.org/schema/mule/core/2.2/mule.xsd</span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> http://www.mulesource.org/schema/mule/file/2.2 </span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> http://www.mulesource.org/schema/mule/file/2.2/mule-file.xsd</span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> http://www.mulesource.org/schema/mule/pgp/2.2 </span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> http://www.mulesource.org/schema/mule/pgp/2.2/mule-pgp.xsd</span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> http://www.mulesource.org/schema/mule/stdio/2.2 </span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> http://www.mulesource.org/schema/mule/stdio/2.2/mule-stdio.xsd"></span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"><br />
</span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> <file:connector name="fileConnector" pollingFrequency="10000" streaming="false" autoDelete="true"></span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> <file:expression-filename-parser/></span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> </file:connector></span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> </span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> <spring:bean id="pgpKeyManager" class="org.mule.module.pgp.PGPKeyRingImpl" init-method="initialise"></span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> <spring:property name="publicKeyRingFileName" value="<path to public keyring>/pubring.gpg"/></span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> <spring:property name="secretKeyRingFileName" value="<path to private keyring>/secring.gpg"/></span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> <!-- secretAliasId is the public key --></span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> <spring:property name="secretAliasId" value="<public key id"/> </span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> <spring:property name="secretPassphrase" value="<password>"/></span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> </spring:bean></span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> </span></div><div style="color: blue; font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> <spring:bean id="keyBEStrategy" class="org.mule.module.pgp.KeyBasedEncryptionStrategy" </span></div><div style="color: blue; font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> init-method="initialise"></span></div><div style="color: blue; font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> <spring:property name="keyManager" ref="pgpKeyManager"/></span></div><div style="color: blue; font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> <spring:property name="credentialsAccessor" ref="credentialAccessor"/></span></div><div style="color: blue; font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> </spring:bean></span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> </span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> <pgp:security-manager></span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> <pgp:security-provider name="pgpSecurityProvider" keyManager-ref="pgpKeyManager"/></span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> <pgp:keybased-encryption-strategy name="keyBasedEncryptionStrategy" </span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> keyManager-ref="pgpKeyManager"/></span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> </pgp:security-manager> </span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"><br />
</span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> <spring:bean id="credentialAccessor" class="org.mule.module.pgp.FakeCredentialAccessor"/></span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"><br />
</span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> <model name="fileInboundModel"></span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> <service name="fileInboundService"></span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> <inbound></span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> <file:inbound-endpoint connector-ref="fileConnector" </span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> path="./in"></span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> </span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> <pgp:security-filter strategyName="keyBasedEncryptionStrategy" </span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> signRequired="true"</span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> credentialsAccessor-ref="credentialAccessor"</span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> keyManager-ref="pgpKeyManager"/></span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> </span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> </file:inbound-endpoint></span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> </inbound> </span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> <echo-component/></span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> <outbound></span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> <pass-through-router></span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> <file:outbound-endpoint connector-ref="fileConnector" path="./encrypted"</span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> outputPattern="#[header:originalFilename]-#[function:datestamp].gpg"></span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> <span style="color: blue;"><encrypt-transformer name="pgpEncrypt" strategy-ref="keyBEStrategy"/></span></span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> </file:outbound-endpoint></span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> </pass-through-router> </span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> </outbound></span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> </service></span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> </model></span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"><br />
</span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"></mule></span></div><br />
This workaround is pretty clean. MuleSoft is going to review the solution and possibly update their documentation accordingly.<br />
<br />
Cheers!Rod Bireschhttp://www.blogger.com/profile/06547791022967979648noreply@blogger.com0tag:blogger.com,1999:blog-8061743095751024579.post-24486169854778363232010-07-23T14:23:00.000-04:002010-07-23T14:23:52.966-04:00Sending outbound SMTP messages through Gmail with Mule ESBI'm currently working on a Managed File Transfer (MFT) proof-of-concept for a client using <a href="http://www.mulesoft.com/mule-esb-open-source-esb">Mule ESB Enterprise</a>. One of the requirements I had to address is the ability to send SMTP email messages when a particular connector failed, i.e. SFTP connection failed. I thought to myself, that's a reasonable request and something that is probably straightforward to do in Mule ESB. Well, if you look at the Mule configuration it is straightforward however, getting to that point using Gmail took some work...so I thought I'd share :)<br />
<br />
<span style="font-size: large;">What you need...</span><br />
<ul><li>Mule ESB (I'm using <a href="http://www.mulesoft.com/mule-esb-enterprise-trial-download">Mule ESB Enterprise</a> Version: 2.2.5 Build: 16813 along with Mule Management Console support, i.e. mmc-agent-2.2.5.jar) * </li>
<li>A test <a href="http://mail.google.com/mail/">Gmail</a> account</li>
</ul>* - if you plan on running the same version I am then there is a patch that needs to be applied to the mmc-agent-2.2.5.jar. See <a href="http://www.mulesoft.org/jira/browse/MULE-4970">JIRA issue MULE-4970.</a><br />
<br />
<span style="font-size: large;">Mule Configuration...</span><br />
<div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"><?xml version="1.0"?><br />
<mule xmlns="http://www.mulesource.org/schema/mule/core/2.2" <br />
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"<br />
xmlns:file="http://www.mulesource.org/schema/mule/file/2.2" <br />
xmlns:smtp="http://www.mulesource.org/schema/mule/smtp/2.2"<br />
xmlns:email="http://www.mulesource.org/schema/mule/email/2.2"<br />
xsi:schemaLocation="http://www.mulesource.org/schema/mule/core/2.2</span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> http://www.mulesource.org/schema/mule/core/2.2/mule.xsd</span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> http://www.mulesource.org/schema/mule/file/2.2</span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> http://www.mulesource.org/schema/mule/file/2.2/mule-file.xsd</span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> http://www.mulesource.org/schema/mule/smtp/2.2</span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> http://www.mulesource.org/schema/mule/smtp/2.2/mule-smtp.xsd</span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> http://www.mulesource.org/schema/mule/email/2.2 </span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> http://www.mulesource.org/schema/mule/email/2.2/mule-email.xsd"><br />
<br />
<description>Test configuration to send SMTP email through Gmail.</description><br />
<br />
<!-- Configure some properties to work with GMail's SMTP --><br />
<b style="color: blue;"><smtp:gmail-connector name="emailConnector" /></b><br />
<br />
<model name="processInboundFileModel"><br />
<service name="processInboundFileService"><br />
<inbound><br />
<file:inbound-endpoint<br />
path="./remoteFS"><br />
</file:inbound-endpoint><br />
</inbound><br />
<br />
<echo-component/><br />
<br />
<outbound><br />
<pass-through-router><br />
<smtp:outbound-endpoint <br />
connector-ref="emailConnector"<br />
host="smtp.gmail.com" <br />
<span style="font-size: x-small;"> <b style="color: blue;">port="587</b><b style="color: blue;">"</b> <br />
<b style="color: blue;">user="<span style="color: red;"></span></b></span></span><span style="font-size: x-small;"><b style="color: red;"><account name></b></span><span style="font-size: x-small;"><b style="color: blue;"><span style="color: red;"></span>%40gmail.com"</b> <br />
password="</span><span style="font-size: x-small;"><b style="color: blue;"><span style="color: red;"></span></b><b style="color: red;"><password></b></span><span style="font-size: x-small;">" <br />
to="</span><span style="font-size: x-small;"><b style="color: blue;"><span style="color: red;"></span></b><b style="color: red;"><email addresses></b></span><span style="font-size: x-small;"><span style="font-size: x-small;">"</span><br />
from="</span><span style="font-size: x-small;"><b style="color: blue;"><span style="color: red;"></span></b></span><span style="color: black;"><span style="font-size: x-small;"><</span><span style="font-size: x-small;">account name</span><span style="font-size: x-small;">></span></span><span style="font-size: x-small;">@gmail.com" <br />
subject="Test email message"/><br />
</pass-through-router><br />
</outbound><br />
</service> <br />
</model><br />
</mule></span><br />
<br />
<div style="font-family: Arial,Helvetica,sans-serif;"><span style="font-size: x-small;"><span style="font-size: small;">As indicated, the Mule configuration is very straightforward. You can get most of the information you need from the <a href="http://www.mulesoft.org/documentation/display/MULE2USER/SMTP+Transport">Mule SMTP Transport documentation</a> except for what Gmail port to use and most importantly the gmail-connector information. That tripped me up for a while until I came across a Mule JIRA issue where someone refer to the configuration in the bookstore example for sending email through Gmail. I still haven't found much information on this connector and what it's doing but it does work and you need to use in order to connect to Gmail.</span></span></div><div style="font-family: Arial,Helvetica,sans-serif;"><br />
</div><div style="font-family: Arial,Helvetica,sans-serif;"><span style="font-size: x-small;"><span style="font-size: small;">One other thing that is documented however maybe overlooked is that you need to replace the "@" symbol in the "user" attribute with the URL escape code of "%40".</span></span></div><div style="font-family: Arial,Helvetica,sans-serif;"><br />
</div><span style="font-size: x-small;"><span style="font-family: Arial,Helvetica,sans-serif; font-size: small;">Cheers! </span></span></div>Rod Bireschhttp://www.blogger.com/profile/06547791022967979648noreply@blogger.com4tag:blogger.com,1999:blog-8061743095751024579.post-32524721663067702232009-09-21T15:01:00.005-04:002009-09-21T17:24:50.120-04:00How To Cluster SpringSource tc Server™I decided to pull together this HowTo while working on a tc Server screencast for <a href="http://www.chariotsolutions.com/">Chariot Solutions'</a> booth at <a href="http://www.springone2gx.com/conference/new_orleans/2009/10/home">SpringOne 2GX</a>. For the unfamiliar, tc Sever is an enterprise version of Apache Tomcat provided by SpringSource™.<br />
<br />
There are a number of <a href="http://static.springsource.com/projects/tc-server/6.0/getstart/cgsdiffs.html#cgsdiffs">differences</a> between tc Server and Apache Tomcat, however, at their core they are the same server. As SpringSource puts it, tc Server is "hardened for enterprise use". There is plenty of information about tc Server on SpringSource's <a href="http://www.springsource.com/products/tcserver">website</a> so I won't go into the details here. The main focus of this post is to describe how to get a small cluster (session replication) of tc Servers up and running.<br />
<br />
<font style="font-weight: bold;" size="4">Clustering</font><br />
<br />
tc Server clustering provides session replication and context attribute replication. Session replication is basically copying the HttpSession object to all members of a cluster each time it has changed. Typical web applications use the HttpSession object to temporarily store user specific information like shopping cart items, security credentials, etc. When the user's web session is terminated (e.g. by the user, server crash, etc.) then all the session data is lost, which can cause serious usability and availability problems. The following steps will provide you with a simple (3) node tc Server session replication cluster, which provides a stable platform configured for high availability.<br />
<br />
<font style="font-style: italic;"><span style="font-weight: bold;">NOTE:</span></font> If you have a large cluster with many nodes then SpringSource recommends a more <a href="http://static.springsource.com/projects/tc-server/6.0/admin/radmcluster.html">advanced cluster configuration</a> that replicates session information to a single backup member.<br />
<br />
<font style="font-weight: bold;" size="4">What You Need</font><br />
<ul><li><font style="font-weight: bold;">tc Server installation</font> - I used a server-only platform neutral distribution (tcServer-6.0.20.B-GA-appserver.tar). You can <a href="http://www.springsource.com/products/tc-server-60-evaluation">download</a> an eval from SpringSource's website.</li>
<li><font style="font-weight: bold;">JDK 1.5 or 1.6</font> - I used Sun JDK 1.6</li>
<li><font style="font-weight: bold;">Mac, Unix or Linux platform</font> - you can install on Windows however, the following instructions are specific for a Unix platform.</li>
</ul><font style="font-weight: bold;" size="4">High-level Steps</font><br />
<ul><li>Install & Test tc Server<br />
</li>
<li>Create tc Server instances</li>
<li>Configure Clustering</li>
<li>Build and Deploy a Test Web Application</li>
<li>Test the cluster</li>
</ul><font style="font-weight: bold;" size="4">Install & Test tc Server</font><br />
<br />
1. Install a JDK.<br />
<br />
<font style="font-weight: bold; font-style: italic;">NOTE:</font> If you are installing on a 64-bit UNIX platform then you must explicitly set the JAVA_HOME environment variable. This also helps later when creating a tc Server instance using the tcserver-instance.sh script.<br />
<br />
2. Unpack the tc Server distribution in a temp directory using the following command.<br />
<br />
<font face="courier new">$ tar -xf tcServer-6.0.20.B-GA-appserver.tar</font><br />
<br />
3. Change to the temp directory containing the unpacked tc Server installation files.<br />
<br />
4. Run the installer program using the following command.<br />
<br />
<font face="courier new">$ ./install.sh</font><br />
<br />
<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHqM1hB3hpxrzA_sUSAKBbOrCucNSduZaSivO1CwzdX_ssVLk4IUTUB5uzc2VbERht-OxXE70D2Cg7dmlqu9Hr74NIT_jjn5BXa78qfsGT65Rx5laGv4nKNLplYBIi2UgROA1sIcEhRLzX/s1600-h/installer1.png"><img style="margin: 0px auto 10px; display: block; text-align: left; cursor: pointer; width: 400px; height: 261px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHqM1hB3hpxrzA_sUSAKBbOrCucNSduZaSivO1CwzdX_ssVLk4IUTUB5uzc2VbERht-OxXE70D2Cg7dmlqu9Hr74NIT_jjn5BXa78qfsGT65Rx5laGv4nKNLplYBIi2UgROA1sIcEhRLzX/s400/installer1.png" alt="" id="BLOGGER_PHOTO_ID_5382905866433280258" border="0"></a><br />
<br />
a. Enter a 1 and hit return.<br />
<br />
<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjMLNMajDTXkOvXYeb5Dg20-JEjCOE6aGccpKeoSfYpNJGdDBiKaPo36r_8PaZv9tK-kSsjQ67R38HQCH6yYh0c77tr3djCWnIGym41XhDUFrGlTBl4QWGU5tkUfgADPsoHGuxg9xMNTUJ7/s1600-h/installer2.png"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 261px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjMLNMajDTXkOvXYeb5Dg20-JEjCOE6aGccpKeoSfYpNJGdDBiKaPo36r_8PaZv9tK-kSsjQ67R38HQCH6yYh0c77tr3djCWnIGym41XhDUFrGlTBl4QWGU5tkUfgADPsoHGuxg9xMNTUJ7/s400/installer2.png" alt="" id="BLOGGER_PHOTO_ID_5382906833422008114" border="0"></a><br />
<br />
b. Specify the full path to the location where you want to install tc Server and hit return. <br />
<br />
<font style="font-style: italic;"><span style="font-weight: bold;">NOTE:</span></font> The installer will not create a directory for you so it must exist.<br />
<br />
<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQu8L4adVPLJjQMSAtM2QKs_Y1oXwUTv-tUD7v9WqRmOnHcqkMdXZSWMYI0R2xAZJQkGP_EUIGhr1_mUEP8WMszIZciqehOLNzzKWuxS1ZpBv7K9qQenpiGN3Vy-upgZxCUjjRJl_1Ntig/s1600-h/installer3.png"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 261px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQu8L4adVPLJjQMSAtM2QKs_Y1oXwUTv-tUD7v9WqRmOnHcqkMdXZSWMYI0R2xAZJQkGP_EUIGhr1_mUEP8WMszIZciqehOLNzzKWuxS1ZpBv7K9qQenpiGN3Vy-upgZxCUjjRJl_1Ntig/s400/installer3.png" alt="" id="BLOGGER_PHOTO_ID_5382906838298019186" border="0"></a><br />
<br />
c. Enter a 2 and hit return to exit the installer.<br />
<br />
tc Server is now installed with an ASF layout of a tc Server instance. The ASF layout is the Apache Tomcat directory structure layout. There is also a tc Server layout that we will use when clustering the servers. There are some <a href="http://static.springsource.com/projects/tc-server/6.0/getstart/cgsinstalldesc.html#cgsinstalldesc__ers">differences</a> between the layouts.<br />
<br />
5. Test your installation. First change directory to the bin directory of the default tc Server instance INSTALL_DIR/tcServer-6.0/tomcat-6.0.20.B/bin.<br />
<br />
6. Start the tc Server instance.<br />
<br />
<font face="courier new">$ ./tcserver-ctl.sh start</font><br />
<br />
OR<br />
<br />
<font face="courier new">$ ./tcserver-ctl.sh run</font><br />
<br />
The 'start' command starts tc Server as a daemon process. The 'run' command starts tc Server as a foreground process.<br />
<br />
7. Open a web browser and point to <a href="http://localhost:8080/">http://localhost:8080/</a> and you should see the follow home page for the server.<br />
<br />
<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-1nN8HgnI4YpSOfnKh5rmubq9JpfWqZipgs9R5xnYbmsb6nqFFBbH_WcHc45bfuS-I5J7CtHd3WUKT0RRSsOY2QMX4bkSWmOEa7UGDIbYw6BiT7J_3gxf2meMjb9l8CUPVh6b5_0KSRd2/s1600-h/tchome.png"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 205px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-1nN8HgnI4YpSOfnKh5rmubq9JpfWqZipgs9R5xnYbmsb6nqFFBbH_WcHc45bfuS-I5J7CtHd3WUKT0RRSsOY2QMX4bkSWmOEa7UGDIbYw6BiT7J_3gxf2meMjb9l8CUPVh6b5_0KSRd2/s400/tchome.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5383910326964993154" /></a><br />
<br />
You can now shutdown the server. If you started the server using the 'run' command then you can use ctrl+c to shutdown. If you started the server as a daemon process then use the following command to shutdown:<br />
<br />
<font face="courier new">$ ./tcserver-ctl.sh stop</font><br />
<br />
Congratulations! You've successfully installed and tested tc Server in a few short steps.<br />
<br />
<font style="font-weight: bold;" size="4">Creating tc Server instances</font><br />
<br />
I've decided to use the tc Server layout for the instances so that means we need to create them with a tc Server script.<br />
<br />
1. Change directory to the INSTALL_DIR/tcServer-6.0<br />
<br />
2. Run the tcserver-instance.sh with the required -s (servername) and -v (tc Server version) options.<br />
<br />
<font face="courier new">$ ./tcserver-instance.sh -s tcserver1 -v 6.0.20.B</font><br />
<br />
<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJjBsIzz_k6ouCP1JyQwfYK0Lg_KXDihwVV9sKMZaO74qyO0hCKDdEdJGZSfIXxc7J6VE69wOXbcDzqNqlZSyN1eP-31yQxf0qPno_A_MLqF0UpP1vAaHAcxrfa2xpN0uL1RCQIcFDg4RD/s1600-h/server1instance.png"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 261px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJjBsIzz_k6ouCP1JyQwfYK0Lg_KXDihwVV9sKMZaO74qyO0hCKDdEdJGZSfIXxc7J6VE69wOXbcDzqNqlZSyN1eP-31yQxf0qPno_A_MLqF0UpP1vAaHAcxrfa2xpN0uL1RCQIcFDg4RD/s400/server1instance.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5383911148761885634" /></a><br />
<br />
3. Repeat step #2 two more times for servername tcserver2 & tcserver3. You should have a directory structure similar to this:<br />
<br />
<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0e4I_FD0QJ5f-fABxw72L8Rj9g6cCYaU4V2_xnBIxURXB2gICC-Rb_cp9IunhQkloB1WDlWyOCL2sYSlmIuZrletDptS2z_w5kK_rPU2N8CatEU-WslRxoS1sNcP9NK6273OieinIp6is/s1600-h/postinstancels.png"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 261px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0e4I_FD0QJ5f-fABxw72L8Rj9g6cCYaU4V2_xnBIxURXB2gICC-Rb_cp9IunhQkloB1WDlWyOCL2sYSlmIuZrletDptS2z_w5kK_rPU2N8CatEU-WslRxoS1sNcP9NK6273OieinIp6is/s400/postinstancels.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5383911387205591442" /></a><br />
<br />
4. Test each instance (tcserver1, tcserver2 & tcserver 3) one at a time to confirm that they start up ok. Since all 3 instances are using the same ports right now you have to test one at a time.<br />
<br />
<font style="font-weight: bold;" size="4">Configure Clustering</font><br />
<br />
1. For each tc Server instance (tcserver1, tcserver2 & tcserver3) add the following <strong><Cluster></strong> child element of the <strong><Engine></strong> element in the INSTALL_DIR/tcServer-6.0/tcserver1/conf/server.xml file.<br />
<br />
<pre><?xml version='1.0' encoding='utf-8'?>
<Server port="-1" shutdown="SHUTDOWN">
...
<Service name="Catalina">
...
<Engine name="Catalina" defaultHost="localhost">
<strong><Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/></strong>
...
</Engine>
</Service>
</Server>
</pre><br />
<br />
2. Change the TCP/IP listen ports on each tc Server instance to be unique to avoid port conflicts. This is done by editing the INSTALL_DIR/tcServer-6.0/tcserver1/conf/catalina.properties file and changing the following ports to be unique in each server instance. I just incremented the http, jmx and ajp ports for tcserver2 & tcserver3.<br />
<font face="courier new"><br />
http.port=8080<br />
jmx.port=6969<br />
ajp.port=8009</font><br />
<br />
3. Start all instances and confirm that there are no port conflicts. You'll notice that clustering adds a little overhead to the startup time.<br />
<br />
<font style="font-weight: bold;" size="4">Build and Deploy a Test Web Application</font><br />
<br />
Well we could just stop right here because you now have a running cluster however, I like to test it out just to be sure. In order to do this you need to create a basic web application that can read & write to the HttpSession object. This application will then be deployed to each tc Server instance to test out the cluster. The following are steps using Maven to create a simple web application with a single JSP.<br />
<br />
1. Install <a href="http://maven.apache.org/">Maven</a><br />
<br />
2. Create a directory for the web application.<br />
<br />
3. Change directory to the web application directory and run this Maven command:<br />
<br />
<font face="courier new">mvn archetype:create -DgroupId=com.test -DartifactId=ct-web -DarchetypeArtifactId=maven-archetype-webapp</font><br />
<br />
This command will build a basic web application structure.<br />
<br />
4. Edit the PROJECT_DIR/ct-web/src/main/webapp/index.jsp file. Replace the index.jsp contents with the following:<br />
<br />
<pre><html>
<head>
<title> TC Server - Cluster Test Web Application</title>
</head>
<body>
<h2> TC Server - Cluster Test Web Application</h2>
<table width="100%" border="1" cellspacing="0" cellpadding="0">
<tr>
<td width="35%" style="font-weight: bold;"> WEB-INF Real Path - application.getRealPath("WEB-INF"):</td>
<td width="65%"><%=application.getRealPath("WEB-INF")%></td>
</tr>
<tr bgcolor="#CCCCCC">
<td style="font-weight: bold;"> Session ID - session.getId() :</td>
<td><%=session.getId()%></td>
</tr>
<tr>
<td style="font-weight: bold;"> App Server Info - application.getServerInfo():</td>
<td><%=application.getServerInfo()%></td>
</tr>
</table>
</body>
</html>
</pre><br />
<br />
This code will display the physical path to the WEB-INF directory from the ServletContext, HttpSession ID and server information.<br />
<br />
5. Edit the PROJECT_DIR/ct-web/src/main/webapp/WEB-INF/web.xml file. Add in the <strong><distributable /></strong> child element of the <strong><web-app></strong> element.<br />
<br />
<pre><web-app>
<display-name>Archetype Created Web Application</display-name>
<strong><distributable /></strong>
</web-app>
</pre><br />
<br />
<font style="font-style: italic;"><span style="font-weight: bold;">NOTE:</span></font> This configuration will indicate that the application is suitable for a distributed environment. Another approach would be to edit the INSTALL_DIR/tcServer-6.0/tcserver1/conf/context.xml and add in <strong><Context distributable="true"></strong> for one or all web applications to be distributed.<br />
<br />
6. Run the following command to build and package the web application.<br />
<br />
<font face="courier new">$ mvn package</font><br />
<br />
<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhS5sNsm2w1WoIs44gkXUmm3FV8HCG3ML2zaOl8fH6JFwGxcfaKZmdnVBIgIwkoop04PgsIuSNASj80FEPS8YU8xFWZ3RE8QmBuzDyjtMqbnMscQq7ins9cliIgJBlUl5xAyJKef0zlr8Po/s1600-h/mvnpackage.png"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 261px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhS5sNsm2w1WoIs44gkXUmm3FV8HCG3ML2zaOl8fH6JFwGxcfaKZmdnVBIgIwkoop04PgsIuSNASj80FEPS8YU8xFWZ3RE8QmBuzDyjtMqbnMscQq7ins9cliIgJBlUl5xAyJKef0zlr8Po/s400/mvnpackage.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5383925075101049042" /></a><br />
<br />
7. You should now have a ct-web/target/ct-web.war file. Copy the WAR file to INSTALL_DIR/tcServer-6.0/tcserver1/webapps directory for each instance.<br />
<br />
8. Start all of the server instances.<br />
<br />
<font style="font-weight: bold;" size="4">Test the cluster</font><br />
<br />
To test out the cluster simply open a web browser and create tabs (or windows) for each of the following addresses:<br />
<br />
<a href="http://localhost:8080/ct-web/">http://localhost:8080/ct-web/</a><br />
<br />
<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiLzAeGusjbuzv2JZC0rHwQRbYE-5oIOTpxOrotju0PZq1a5ru0ELuwlgr04zt38knUDm57AcQDJZNxUuJafMqfXptn4Zt4KVb4S97VVTfk-HvYzIwUK1mforUCYH-azOLd5YO-MqD0NLV7/s1600-h/8080.png"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 176px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiLzAeGusjbuzv2JZC0rHwQRbYE-5oIOTpxOrotju0PZq1a5ru0ELuwlgr04zt38knUDm57AcQDJZNxUuJafMqfXptn4Zt4KVb4S97VVTfk-HvYzIwUK1mforUCYH-azOLd5YO-MqD0NLV7/s400/8080.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5383925654440589234" /></a><br />
<br />
<a href="http://localhost:8081/ct-web/">http://localhost:8081/ct-web/</a><br />
<br />
<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiYvyzHWCecTmSsRRIWfD6ZmmXgtggTMQmwgfT1ngqDHOB4q2GsVniRbUP-vCGH2skIT2xIwigGonAMTgU7Gno-7KDzrf2z510PL_IkYTLnTLdzPVMM8Gh77GnoDgzeQYjSLnk3AChY2j44/s1600-h/8081.png"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 176px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiYvyzHWCecTmSsRRIWfD6ZmmXgtggTMQmwgfT1ngqDHOB4q2GsVniRbUP-vCGH2skIT2xIwigGonAMTgU7Gno-7KDzrf2z510PL_IkYTLnTLdzPVMM8Gh77GnoDgzeQYjSLnk3AChY2j44/s400/8081.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5383925848017776882" /></a><br />
<br />
<a href="http://localhost:8082/ct-web/">http://localhost:8082/ct-web/</a><br />
<br />
<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPudIztROjAlHt3vu7lEVvMeHyrWSi3irQyX_TUm0NqPOWFX37dqgIj3C5v6zaYlFgBtfk_FTBOkNiiX4KIMhF7YhvbdogpO5QkkIaUlKWvqQOJ8DPxc-t_Qs_Ga1ohVI3ex5bvu06ajkH/s1600-h/8082.png"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 176px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPudIztROjAlHt3vu7lEVvMeHyrWSi3irQyX_TUm0NqPOWFX37dqgIj3C5v6zaYlFgBtfk_FTBOkNiiX4KIMhF7YhvbdogpO5QkkIaUlKWvqQOJ8DPxc-t_Qs_Ga1ohVI3ex5bvu06ajkH/s400/8082.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5383926026488199986" /></a><br />
<br />
The WEB-INF real path should point to the correct physical directory of each server instance. The session ID should be the same among all three instances indicating that the cluster is working. If it was not working then you would see different session IDs for each tab or window. To further prove this out simply:<br />
<br />
1. Shutdown all of the tc Servers.<br />
<br />
2. Remove the ../webapps/ct-web.war file and ../webapps/ct-war directory from each tc Server instance.<br />
<br />
3. Edit the PROJECT_DIR/ct-web/src/main/webapp/WEB-INF/web.xml in the ct-web application and remove or comment out the <strong><distributable /></strong> element. <br />
<br />
4. Run <font face="courier new">$ mvn clean package</font> to clean out the old build and package up a new ct-web.war file. <br />
<br />
5. Start all the tc Server instances.<br />
<br />
6. Copy the new ct-web.war file out to all the tc Server instances. <br />
<br />
Now the ct-web application is not configured for clustering and when you re-test you should see different session IDs for each server instance.<br />
<br />
You now have proved out your fully functioning (3) node tc Server cluster that is replicating session data. The next step would be to put a load balancer in front of the cluster to make it production ready. Again, if you are dealing with a large number of tcServer nodes then a more <a href="http://static.springsource.com/projects/tc-server/6.0/admin/radmcluster.html">advanced cluster configuration</a> maybe necessary.Rod Bireschhttp://www.blogger.com/profile/06547791022967979648noreply@blogger.com3tag:blogger.com,1999:blog-8061743095751024579.post-60353080425569198272009-09-17T08:51:00.002-04:002009-09-17T09:02:38.778-04:00Blog changeSome may notice that I've changed my blog title and description. The reason is simple, I want to be able to blog about various technology and experiences outside of SOA without having to create a new blog. So I "re-purposed" The SOA Lab blog to be more general hence "The Tech Lab". It's a small change I know but I felt it needed to be done.Rod Bireschhttp://www.blogger.com/profile/06547791022967979648noreply@blogger.com1tag:blogger.com,1999:blog-8061743095751024579.post-42105532982996157722009-07-19T09:56:00.004-04:002009-07-19T10:08:44.700-04:00Open Source Integration PodcastA few weeks ago a few "charioteers" got together to discuss integration tools and techniques over a few beers :)...check it out <a href="http://techcast.chariotsolutions.com/index.php?post_id=503319">Episode 35 - A few beers with Chariot's Open Source Integration Experts</a>Rod Bireschhttp://www.blogger.com/profile/06547791022967979648noreply@blogger.com0tag:blogger.com,1999:blog-8061743095751024579.post-90854400900924255842009-03-09T08:24:00.032-04:002009-04-29T08:55:28.080-04:00Use Hyperic HQ to monitor ServiceMix 4Recently I've been helping out <a href="http://tompurcellstechblog.blogspot.com/">Tom Purcell</a> (co-worker) with a presentation for our <a href="http://www.phillyemergingtech.com/">Emerging Technologies for the Enterprise</a> conference being held in Philadelphia on March 26 - 27th, 2009. The presentation is called <a href="http://www.phillyemergingtech.com/abstracts.php?catID=3">"The Bus in the Clouds"</a> and it focuses on how organizations can use Amazon web services (i.e. cloud computing) to provide a secure and cost effective means of integration for trading partners.<br /><br />The presentation is based on a typical use case that Tom has described in his latest blog <a href="http://tompurcellstechblog.blogspot.com/2009/03/bus-in-clouds-use-case.html">post</a>. The piece I've been looking at is monitoring and managing<span style="text-decoration: underline;"></span> <a href="http://servicemix.apache.org/SMX4/index.html">ServiceMix 4</a> (SMX4) using <a href="http://www.hyperic.com/products/open-source-systems-monitoring.html">Hyperic HQ</a>. Hyperic HQ is an open source monitoring software designed to manage web applications and infrastructure. What's interesting about Hyperic HQ is that <a href="http://fusesource.com/products/fuse-hq/">FUSE HQ</a>, <a href="http://www.mulesource.com/products/mulehq.php">MULE HQ</a> and <a href="http://www.springsource.com/products/suite/ams">SpringSource Application Management Suite</a> are all based on Hyperic. Now one question you might ask is "why use Hyperic HQ when you can monitor ServiceMix 4 with FUSE HQ?" The simple answer is that we are focused on a "subscription free" solution. Plus, we wanted to use the latest version of Hyperic HQ (v.4.0.3) and FUSE HQ is currently based on v.3.2.<br /><br />One thing I quickly found out is that the Auto-discovery capability of Hyperic HQ did not find SMX4 "out of the box". Well after some research I found out that SMX4 is NOT one of the 75 common software products and technologies supported by Auto-discovery. Well, if you think about it some more you can probably understand why :) Anyway, after quite a bit of research and some help from <a href="http://rjrojas.blogspot.com/">Roberto Rojas</a> (co-worker) I finally was able to hook Hyperic HQ into SMX4 to monitor Camel routes (see Roberto's <a href="http://rjrojas.blogspot.com/2009/01/camel-component-for-amazon-sqs.html">Camel Component for Amazon SQS</a> blog post). It was not that difficult however, not obvious either so I decided to blog about it.<br /><br /><span style="font-size:130%;">Installation and Configuration</span><br /><br />1. Download and install <a href="http://servicemix.apache.org/SMX4/download.html">ServiceMix 4</a><br />2. Download and install <a href="http://www.hyperic.com/downloads/hyperic-hq-open-source-downloads.html">Hyperic HQ</a>. If you're installing Hyperic on one machine then just download the HQ Server Package for your OS. The installer will install both the server and agent.<br /><br />NOTE: You need to install a plugin for SMX4 so it is best to install both the server and agent in the same directory (e.g. /opt/hyperic or c:\Program Files\Hyperic HQ).<br /><br /><span style="font-weight: bold;">Hyperic Linux Install on CentOS</span><br />The following is an example of installing Hyperic using the linux installer:<br /><code><small><br />[chariot@dom:~/downloads/hyperic-hq-installer] ./setup.sh<br />Unpacking JRE to temporary directory /tmp/jre<br />Initializing Hyperic HQ 4.0.3 Installation...<br />Loading taskdefs...<br />Taskdefs loaded<br />Choose which software to install:<br />1: Hyperic HQ Server<br />2: Hyperic HQ Agent<br />You may enter multiple choices, separated by commas.<br />1,2<br />HQ server installation path [default '/home/hyperic']:<br />/opt/hyperic<br />HQ agent installation path [default '/opt/hyperic']:<br /><br />Loading install configuration...<br />Install configuration loaded.<br />Preparing to install...<br />Validating agent install configuration...<br />Validating server install configuration...<br />Checking server webapp port...<br />Checking server secure webapp port...<br />Checking server JRMP port...<br />Checking server JNP port...<br />Verifying admin user properties<br />Validating server DB configuration...<br />Installing the agent...<br />Looking for previous installation<br />Unpacking agent to: /opt/hyperic/agent-4.0.3...<br />Installing the agent JRE ...<br />Unpacking JRE x86-linux-glibc2-jre-1_5.tar.gz to: /opt/hyperic/agent-4.0.3...<br />Setting permissions on agent binaries...<br />Fixing line endings on text files...<br />--------------------------------------------------------------------------------<br />Installation Complete:<br />Agent successfully installed to: /opt/hyperic/agent-4.0.3<br />--------------------------------------------------------------------------------<br /><br />You can now start your HQ agent by running this command:<br /><br />/opt/hyperic/agent-4.0.3/bin/hq-agent.sh start<br /><br />Installing the server...<br />Unpacking server to: /opt/hyperic/server-4.0.3...<br />Creating server configuration files...<br />Copying binaries and libraries to server installation...<br />Copying server configuration file...<br />Copying server control file...<br />Copying server binaries...<br />Copying server libs...<br />Setting up server database...<br /><br />Now login to another terminal as root and execute this script:<br /><br />/home/chariot/downloads/hyperic-hq-installer/installer-4.0.3/data/hqdb/tune-os.sh<br /><br />This script sets up the proper shared memory settings to run the<br />built-in database.<br /><br />Press Enter after you run the script to continue this installation.<br /><br />/etc/sysctl.conf defined an adequate kernel.shmmax, not changing anything<br /><br />Tuning completed successfully!<br /><br />Setting up JDBC driver...<br />Copying database files...<br />Configuring database...<br />Starting repopulation of configuration table...<br />Waiting for built-in database to start (on port 9432)...<br />Starting built-in database...<br />Preparing database...<br />Waiting for server to stop...<br />Stopping built-in database...<br />Built-in database stopped.<br />Installing the server JRE ...<br />Unpacking JRE x86-linux-glibc2-jre-1_5.tar.gz to: /opt/hyperic/server-4.0.3...<br />Setting permissions on server binaries...<br />Fixing line endings on text files...<br />--------------------------------------------------------------------------------<br />Installation Complete:<br />Server successfully installed to: /opt/hyperic/server-4.0.3<br />--------------------------------------------------------------------------------<br /><br /><br />You can now start your HQ server by running this command:<br /><br />/opt/hyperic/server-4.0.3/bin/hq-server.sh start<br /><br />Note that the first time the HQ server starts up it may take several minutes<br />to initialize. Subsequent startups will be much faster.<br /><br />Once the HQ server reports that it has successfully started, you can log in<br />to your HQ server at:<br /><br />http://localhost:7080/<br />username: hqadmin<br />password: hqadmin<br /><br />To change your password, log in to the HQ server, click the "Administration"<br />link, choose "List Users", then click on the "hqadmin" user.<br /><br /><br />Setup completed.<br />A copy of the output shown above has been saved to:<br />/home/chariot/downloads/hyperic-hq-installer/installer-4.0.3/./hq-install.log<br /><br />Deleting temporary JRE<br />[chariot@dom:~/downloads/hyperic-hq-installer]<br /></small></code><br />3. Start the server first (e.g. <hyperic>/<hyperic directory>/<server></server></hyperic><server directory><hyperic><server>/bin/hq-server.sh start)<br />4. Wait for the server to start then start the agent (e.g. <hyperic></hyperic></server></hyperic><hyperic>/<hyperic directory>/<server></server></hyperic><agent directory><hyperic><server><hyperic><agent>/bin/hq-agent.sh start)<br />5. Confirm that you can log into the console (<a href="http://localhost:7080/" rel="nofollow">http://localhost:7080/</a>). You should see an Auto-discovery portal on the dashboard that has discovered some Hyperic servers/services.<br />6. Shutdown the server (e.g.</agent></hyperic></server></hyperic><hyperic>/<hyperic directory>/<server></server></hyperic><server directory><hyperic><server><hyperic><agent><hyperic>/<server>bin/hq-server.sh stop) and agent (e.g. <hyperic></hyperic></server></hyperic></agent></hyperic></server></hyperic><hyperic></hyperic><hyperic>/<hyperic directory>/<server></server></hyperic><agent directory><hyperic><server><hyperic><agent><hyperic><server><hyperic><agent>/bin/hq-agent.sh stop)<br />7. Create the directory </agent></hyperic></server></hyperic></agent></hyperic></server></hyperic>/<hyperic directory><hyperic><server><hyperic><agent><hyperic><server><hyperic><agent><hyperic>/hq-plugins<br />8. Copy the <a href="https://issues.apache.org/activemq/browse/SM-942">servicemix-plugin.xml</a> file to the <hyperic></hyperic></hyperic></agent></hyperic></server></hyperic></agent></hyperic></server></hyperic><hyperic></hyperic><hyperic></hyperic><hyperic>/<hyperic directory>/<server></server></hyperic><hyperic><server><hyperic><agent><hyperic><server><hyperic><agent><hyperic><hyperic>hq-plugins directory.<br />9. Start both the server and agent<br />10. Log into the Hyperic console <a href="http://localhost:7080/" rel="nofollow">http://localhost:7080/</a><br />11. On the Dashboard click the Add to Inventory button in the Auto-Discovery portlet. This isn't mandatory but it will give you a chance to see how other services are monitored. For some unknown reason ServiceMix4 will NOT be listed in Auto-discovery. Therefore you have to add it manually.<br />12. Click on the Resources tab<br />13. Click on Platforms link then click on the server listed (should only be one)<br />14. Click on the Inventory tab<br />15. Scroll down to the Servers area and click on the New link<br />16. Enter in the following information:<br /><br />Name: </hyperic></hyperic></agent></hyperic></server></hyperic></agent></hyperic></server></hyperic><hyperic><</hyperic>some unique name><hyperic><server><hyperic><agent><hyperic><server><hyperic><agent><hyperic><hyperic> <some> e.g. ServiceMix 4<br />Description: </some></hyperic></hyperic></agent></hyperic></server></hyperic></agent></hyperic></server></hyperic><hyperic><</hyperic>a description><br /><hyperic><server><hyperic><agent><hyperic><server><hyperic><agent><hyperic><hyperic><some><optional> Server Type: select 'ServiceMix 4.x' from the dropdown list<br />Install Path: </optional></some></hyperic></hyperic></agent></hyperic></server></hyperic></agent></hyperic></server></hyperic><hyperic></hyperic><hyperic><</hyperic>path to the root directory where SMX4 is installed><br /><hyperic><server><hyperic><agent><hyperic><server><hyperic><agent><hyperic><hyperic><some><optional><path><br />17. Save the new server and you should see a ServiceMix server listed<br /><br />Note: After manually adding the ServiceMix4 server you may be asked (presented a link) to configure the properties for the server. Click on the properties link and enter in the JMX password for servicemix (default password is 'smx') then save your changes.<br /><br />The <a href="https://issues.apache.org/activemq/browse/SM-942">servicemix-plugin.xml</a> file can be modified to monitor other areas of SMX4. Before going down that path I recommend that you read through the <a href="http://support.hyperic.com/display/DOC/Plugin+Development+Center">Hyperic documentation</a> to get an understanding on how plugins work.<br /><br />Hopefully I didn't miss anything...let me know if I did.<br /></path></optional></some></hyperic></hyperic></agent></hyperic></server></hyperic></agent></hyperic></server></hyperic>Rod Bireschhttp://www.blogger.com/profile/06547791022967979648noreply@blogger.com10tag:blogger.com,1999:blog-8061743095751024579.post-25240784048382553362009-02-16T11:14:00.009-05:002009-04-29T08:56:02.698-04:00SOA Governance RefcardI'm a pragmatist and this blog focuses on integration/SOA technology so one might wonder why am I blogging about SOA governance? Well let me say this first, governance is a real challenge for companies and I've seen first hand how large corporations struggle with adoption and change that comes with SOA. When I'm consulting on SOA engagements, I find myself getting pulled into meetings and conversations about SOA governance. Early adopters struggle with not only <span style="font-weight: bold;">what</span> they need to do with governance but more importantly <span style="font-weight: bold;">how</span> to <span style="font-weight: bold;">effectively</span> introduce change in their organization. I came across a very good <a href="http://refcardz.dzone.com/refcardz/soa-governance?oid=hom7948">refcard</a> by <a href="http://www.biske.com/blog/">Todd Biske</a> that clearly and concisely addresses the <span style="font-weight: bold;">"what"</span> in SOA Governance...I highly recommend it. <span style="font-weight: bold;">"How"</span> to implement governance in an organization is somewhat unique and doesn't lend itself to a refcard or template.<br /><br />So, to answer my earlier question about why this post on this blog...SOA is an enterprise initiative and if you're working with SOA technology you will eventually be faced with governance. So, to have <a href="http://refcardz.dzone.com/refcardz/soa-governance?oid=hom7948">something</a> in your back pocket to help others or simply refer to is a great asset.Rod Bireschhttp://www.blogger.com/profile/06547791022967979648noreply@blogger.com2tag:blogger.com,1999:blog-8061743095751024579.post-60747968573024930532008-09-18T09:58:00.004-04:002009-04-29T08:56:30.724-04:00Cloud Computing EventI thought I'd pass this along...my company <a href="http://www.chariotsolutions.com/">Chariot Solutions</a> is hosting <a href="http://www.cloudconeast.com/index.php">Fall Forecast 2008 - Computing Among The Clouds</a> this October 17th. The 2008 Fall Forecast conference highlights the emerging areas of cloud computing, software as a service and multi-core technologies. What's most appealing to me about cloud computing is the ability to quickly stand up a computing platform with very little investment (both cost and time). This great solution for working with SOA/Integration products because they can demand significant computing resources.Rod Bireschhttp://www.blogger.com/profile/06547791022967979648noreply@blogger.com0tag:blogger.com,1999:blog-8061743095751024579.post-82689815182668993742008-09-16T11:41:00.004-04:002009-04-29T08:56:49.823-04:00RESTful Web Services using IONA FUSE ESB 4.0 Preview and Spring Dynamic ModulesRoberto Rojas has a very nice blog post on <a href="http://rjrojas.blogspot.com/2008/09/restful-web-services-using-iona-fuse.html">RESTful Web Services using IONA FUSE ESB 4.0 Preview and Spring Dynamic Modules</a>, which I highly recommend reading!Rod Bireschhttp://www.blogger.com/profile/06547791022967979648noreply@blogger.com0tag:blogger.com,1999:blog-8061743095751024579.post-78570689324137374122008-09-05T15:30:00.014-04:002009-04-29T08:57:08.642-04:00What's new in ServiceMix 4.x?Recently, I was talking with a client about a new project of theirs based on the latest release FUSE ESB 3.x. That got me thinking, I knew that a FUSE ESB 4.0 Preview / ServiceMix 4.x (SMX4) was near release so in my efforts to keep current (as well as inform our client) I decided to take a closer look. I was able to find pretty much information on SMX4 however, I wasn't able to find a concise write-up that touched on key changes between the versions. So after some research I decided to blog about what I found. In this post I'm only focusing on the major changes with this new version without getting too far into the “weeds”.<br /><br />So, what's new in SMX4? This is the first question I asked when I heard that a new major release of ServiceMix is on the horizon. Like most people, I pulled down the latest binaries of SMX4 and started going through the documentation. However, first before jumping into SMX4 lets get a quick picture of what the ServiceMix 3.x (SMX3) technology stack looks like so we can get a point of reference.<br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJXAboo6zAmH5HKhstYxPWYAu640FxiXAEOQqiXV_9_apdg_gDrYmZYlszatB0Tadqt4RL2wO0p4dhjMvCO9Frvjzv3MDmfEIaPe0sIWEJKe1M0k-XNNFEZIShlp70SSCXvLN_nsfqRuCl/s1600-h/smx3arch.jpg"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJXAboo6zAmH5HKhstYxPWYAu640FxiXAEOQqiXV_9_apdg_gDrYmZYlszatB0Tadqt4RL2wO0p4dhjMvCO9Frvjzv3MDmfEIaPe0sIWEJKe1M0k-XNNFEZIShlp70SSCXvLN_nsfqRuCl/s400/smx3arch.jpg" alt="" id="BLOGGER_PHOTO_ID_5242624113280165218" border="0" /></a><br />In SMX3 the JBI 1.0 container is a runtime environment for a Normalized Message Router (NMR) and JBI components (e.g. Service Engines and Binding Components) leveraging Apache ActiveMQ as the Message Broker. Typically an ESB offers at least message routing (e.g. ServiceMix EIP & Apache Camel), transformation (e.g. XSLT) and connectivity (e.g. File, JMS, HTTP, etc.) as does SMX3. Apache CXF is used to provide SOAP support and xml marshaling. From an operations perspective, SMX3 provides JMX-based management for running components and other internals as well as run standalone or embedded in an application server or web container (e.g. JBoss, Tomcat, etc.). There is a lot more that SMX3 has to offer however for this post that's a good picture. One last note on SMX3, version 3.2 and higher requires Java 5.<br /><br />In SMX4 the technology stack really hasn't changed much. The key technologies are still there like Apache ActiveMQ, Apache CXF, JMX, etc. Apache Camel is the preferred technology for routing however, ServiceMix EIP appears to still be supported. Ok, so what has changed?<br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgMlPhMICWPlFRglRBD8972aIrLQIxHOtIm2zvggPYd5NNOrW5aRsKp493Rj7vDvAXz8vWWdURttUbSs0Qo37mslGrqzcShiu4pObA43JOY7olvBAhr2iQ6KTNc2Y33Q1jVKTLT6D3GbgiC/s1600-h/smx4arch.jpg"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgMlPhMICWPlFRglRBD8972aIrLQIxHOtIm2zvggPYd5NNOrW5aRsKp493Rj7vDvAXz8vWWdURttUbSs0Qo37mslGrqzcShiu4pObA43JOY7olvBAhr2iQ6KTNc2Y33Q1jVKTLT6D3GbgiC/s400/smx4arch.jpg" alt="" id="BLOGGER_PHOTO_ID_5242624201062621538" border="0" /></a><br />Looking at the architecture, the most noticeable change is the separation of the JBI container into a ServiceMix Kernel and a ServiceMix NMR. The ServiceMix Kernel is a lightweight OSGi-based environment deployed on Apache Felix (an OSGi R4 Services Platform implementation). The kernel and NMR are their own projects in Apache and can be downloaded and built separately. However, not to worry, if you download FUSE 4 preview (certified release of SMX4) from IONA you get the kernel and NMR bundled along with other stuff to run the ESB.<br /><br /><span style="font-weight: bold;font-size:130%;" >Why the change to OSGi?</span><br /><br /><a href="http://macstrac.blogspot.com/">James Strachan</a> (ServiceMix co-founder and committer) pointed out to me that one of JBI's weakest areas is the cumbersome classloader model and that needed to be addressed. OSGi solves this problem with advanced OSGi bundling and classloading mechanisms. Ok, that sounds good but what is OSGi? Well in a nutshell, it is an environment where bundles (modules) communicate through well-defined services while hiding their internals from other bundles. OSGi also specifies how components are installed and managed. Components can be started, stopped, updated and uninstalled dynamically without bringing down the entire server. This is very beneficial for high availability systems (like an ESB). OSGi bundles are versioned and only bundles that can collaborate are wired together in the same class space. This solves the problem with library dependencies or JAR hell :) There are many more benefits to OSGi and the <a href="http://www.osgi.org/">OSGi Alliance</a> is a great place to start learning. With this change, ServiceMix now becomes an OSGi and JBI-based ESB.<br /><br /><span style="font-size:130%;"><span style="font-weight: bold;">What changed in the NMR?</span></span><br /><br />The obvious change is that the NMR is now it's own Apache project, ServiceMix NMR. So, theoretically you could run different versions of the SeviceMix Kernel and NMR. Unfortunately I don't have a good use case for that although, this separation does provide flexibility. The NMR is now a set of OSGi bundles that can be deployed on any OSGi runtime but mainly built on top of the ServiceMix Kernel. The NMR project is also the JBI 1.0 implementation with plans to support JBI 2.0 in the future. There are a few things missing with ServiceMix NMR 1.0-m1 release (from the release notes):<br /><ul><li>no support for JMX deployment and ant tasks</li><li>no support for Service Assemblies Connections</li><li>no support for transactions (a transaction manager and a naming context can be injected into components if they are available as OSGi services, but not transaction processing - suspend / resume - will be performed, as it would be requested for real support)...<span style="font-style: italic; font-weight: bold;">more on this a little later.</span></li></ul>So depending on what you're doing, these missing capabilities may or may not hamper early adoption.<br /><br />A few other interesting changes to mention. First, SMX4 is now a standalone only runtime. Previous versions supported embedding in application servers, web containers as well as applications. Flows are no longer used for message exchanges. This confused me a little however, thanks to James he clarified things. Flows are NMR flow types that are the mechanism by which the NMR sends messages from one Binding Component or Service Engine to another. SMX3 has 4 flow types that ended up causing confusion and added complexity for developers. This was simplified in SMX4 with a tendency to use explicit routes by exploiting Camel's routing capabilities.<br /><br />Last change to note, SMX4 no longer performs transaction specific processing. However, it will pass transaction information along as it would any other message. I was fortunate enough to receive some insight from <a href="http://gnodet.blogspot.com/">Guillaume Nodet</a> (Apache Project Management Committee Chair and active committer) regarding the changes in transaction support and it turns out that the release notes are a little misleading. Guillaume<http: com=""> explained that previously the NMR was considered as a transactional resource, which means the sending of a JBI exchange through the NMR could be part of the transaction (depending if it was sent synchronously or not). This is no longer the case with SMX4. Transactions are now conveyed along with the exchanges whether they are sent synchronously or asynchronously. As a result, the NMR does not need to be aware of transactions because they are now controlled by the different components instead. The benefits from this change include:<br /><ul><li>Improved scalability of ServiceMix when using transactions because all JBI exchanges are now sent asynchronously.</li><li>Improved interoperability as the other JBI containers tend to follow the same pattern when/if they support transactions.</li></ul>Hopefully that gives you a pretty good sense of what is new in SMX4.<br /></http:>Rod Bireschhttp://www.blogger.com/profile/06547791022967979648noreply@blogger.com3tag:blogger.com,1999:blog-8061743095751024579.post-24874546518967216082008-05-28T12:59:00.010-04:002009-04-29T08:57:52.395-04:00Building a “SOApp” with Mule (Open Source ESB)Ok, I know that we're all up to our ears with technical acronyms, terms, buzzwords, etc. that all appear to have some marketing spin to them in hope that they will eventually work their way into industry acceptance. So, why should this be any different...just kidding, kind of :) Anyway, bear with me through this first paragraph and you'll understand how this “SOApp” thing came into existence in my little world. In 2007, I was fortunate enough to be part of a development team at <a href="http://www.chariotsolutions.com/">Chariot Solutions</a> responsible for designing and developing a product for the Material Handling and Distribution Industry. After a few requirements gathering sessions with the client, we discovered that the project had a number of integration points with new and existing systems...the age old integration challenge. The existing systems ranged from a COTS warehouse management system to a C-based controller that interfaced with physical hardware devices (e.g. lights, switches, buttons, etc.). Steve Smith (Chariot Architect) was involved early on in the initial discovery sessions and was quick to point out that all these integration points (files, database tables, TCP messages, etc.) we were faced with are very similar to challenges faced while implementing an SOA but on a much smaller scale. So, why not take advantage of the benefits that an ESB provides (i.e. protocol translation, message transformation and routing) to speed development and deliver a maintainable solution? Hence the “SOApp” concept was born. Well, the term “SOApp” (Service Oriented Application) was a play on the SOA acronym about 3 months ago when I was considering writing up a post (this post) to discuss a unique way of using ESB technology. A close second was “Save Our A...”, well you get the picture, anyway, back to the interesting technical stuff.<br /><br />Ok, so we had a conceptual architecture centered around an ESB. The team was all in agreement that we would benefit from NOT having to write custom integration code and simply focus on developing business logic in POJOs. The decision to use Mule (v. 1.4.1) for the ESB was an easy choice for us because we had plenty of experience using it in our SOA Lab. There were many interesting aspects of the project however, this post focuses on how we dealt with the various integration challenges. Let's take a closer look. The diagram below illustrates what the architecture looks like with a focus on various system interfaces.<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjo7TZ_LLypXrww17vZe99t3NozI3-jOmwQHyuXrqEcrLcSAUr_hrTQiKGhIxlC01r-uY2qCovjQ9JLWst_7Nm4D_jg2fjDot6Auw0CoyWT7tqelKXix3kCUVrUhaLWgCYgoRrRdNK67VwP/s1600-h/SorterArchv21.png"><img style="cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjo7TZ_LLypXrww17vZe99t3NozI3-jOmwQHyuXrqEcrLcSAUr_hrTQiKGhIxlC01r-uY2qCovjQ9JLWst_7Nm4D_jg2fjDot6Auw0CoyWT7tqelKXix3kCUVrUhaLWgCYgoRrRdNK67VwP/s400/SorterArchv21.png" alt="" id="BLOGGER_PHOTO_ID_5205478286720309330" border="0" /></a><br /><br /><span style="font-weight: bold;">Warehouse Management System (WMS) – File-based Interface</span><br />The WMS generated flat files in a proprietary format on some random schedule. This data is essential to the overall operation of the entire system. These flat files needed to be processed as soon as the would appear in a directory. A Mule file connector was configured to poll a directory, pickup a file, pass the data onto a POJO for processing and eventually update the PostgreSQL database via Hibernate. Nothing fancy here just basic file processing.<br /><br /><span style="font-weight: bold;">PC Controller – TCP Sockets Interface</span><br />This controller serves as a central integration point for various switches, sensors, etc. A basic use case was when a sensor was triggered, the controller would send a proprietary delimited length text message was sent to a particular POJO handling that transaction in Mule. The POJO would typically query the PostgreSQL database and return the resulting data back to the controller. There was a non-functional requirement for the entire transaction to take less 200 ms. At first, we used a Mule TCP connector to communicate (both inbound and outbound) with the controller however, due to some limitations on the controller side (and time constraints) we had to switch outbound communications to custom socket code. Here was a case where we only benefited from using Mule's connectors for one communications direction however, since the socket code was easy enough to write it didn't take long to develop a workaround. Oh, the transaction performance ended up to be less than 100ms on average.<br /><br /><span style="font-weight: bold;">Pick-To-Light Controller – JDBC Connector Interface</span><br />This controller was a java-based controller that interfaced physical devices via the PostgreSQL database. Though this is not the “ideal” method for interfacing it was a constraint that we had to deal with. What was interesting about this interface is that we configured a Mule JDBC connector to process incoming requests when information appeared in the database tables. The POJOs that processed the data then used our Hibernate persistence layer to respond back to the controller via database tables.<br /><br /><span style="font-weight: bold;">Java Swing Clients – MuleClient / TCP Interface</span><br />There were two Java Swing clients that we developed for administrators and end users to interface with the system. These swing clients used the MuleClient to simplify the TCP communications with Mule. Each POJO was considered a “service” with a unique endpoint deployed in Mule. What is interesting about this is that the swing client only had to specify a single uri (e.g. tcp://localhost:<port>) along with a payload and let the MuleClient handle the rest. There was no need to identify a specific endpoint in the URI, which made this design very flexible and maintainable. Here we leveraged the content-based routing capabilities of Mule by configuring various FilteringOutboundRouter's to call internal POJOs for processing. The outbound routers inspect the payload type and routed accordingly based on configuration.<br /><br /><span style="font-weight: bold;">CLI (Command Line Interface) Java Application – Telnet & MuleClient / TCP Interface</span><br />Well I saved the most interesting interface for last, IMHO :) One of the requirements was to have a handheld Windows CE device, capable of scanning barcodes, perform CRUD operations on the PostgreSQL database over a wireless 802.11b network. We had part of this problem solved by using the MuleClient to communicate with our POJOs deployed in Mule. Ok, so, how do we implement the MuleClient on a Windows CE device? Well, John Shepard (Chariot Architect) came up with a clever design to use Telnet and a basic Java application to solve the problem. This was a great example of leveraging proven technology along with a creative way of configuring Unix accounts. The end user accounts were configured to start the CLI java application after a successful login to the Unix machine instead of a bash shell. This work very well and performed beautifully. There was no need to install and manage client applications or worry about performance of the handheld device. The built-in Telnet capability of the Windows CE device was all that was needed on the client. This was very cool to see in action especially knowing that only a basic java application was behind it.<br /><br />The purpose of this post was to give you an overview of how to use an ESB in new and creative ways aside from their original intent. In the future, I may expand more on these interfaces to provide more detail. There were a number of other interesting aspects to the project like using annotations and XDoclet to automatically generate the Mule configuration, etc. that is good material for future posts. Wrapping this up, we did take on some risk of using Mule in this capacity, however, luckily there were no major problems we ran into. Besides we always had Java to fall back on if Mule came up short anywhere. Could this be the beginning of a new movement in application development...the “SOApp”? Maybe, however I can already hear the snickering of my colleges as they read the end of this post :)</port>Rod Bireschhttp://www.blogger.com/profile/06547791022967979648noreply@blogger.com2tag:blogger.com,1999:blog-8061743095751024579.post-54600540240466860472008-01-10T22:57:00.001-05:002009-04-29T08:58:14.114-04:00Use JConsole with ActiveMQ for a quick JMS test clientAs I was working with OpenESB to try an integrate it with ActiveMQ I stumbled across a quick and easy way work with ActiveMQ. My needs were basic and I just wanted to be able to browse, add and remove messages from a set of queues. I knew that ActiveMQ has JMX support so I wondered if my basic needs could be met using JConsole. Sure enough they were. Here's what I did:<br /><br />First, I configured ActiveMQ with the queues I needed and started the server (console output below).<br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjUvDJk194h5TWhI-y5J8cBTIJJ3hEL1l29H5IIAB0sI0rAD6Gi4ok1qx3aCQUXO7yxUhFL2oCpqBLZ4B9EF4LAFJZr2m-vpHX8LGLo7fp1asCInzvlagS8J2_P9O-GDNSWWoNtk04t10JQ/s1600-h/activemq-output.png"><img style="cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjUvDJk194h5TWhI-y5J8cBTIJJ3hEL1l29H5IIAB0sI0rAD6Gi4ok1qx3aCQUXO7yxUhFL2oCpqBLZ4B9EF4LAFJZr2m-vpHX8LGLo7fp1asCInzvlagS8J2_P9O-GDNSWWoNtk04t10JQ/s400/activemq-output.png" alt="" id="BLOGGER_PHOTO_ID_5152069164677516690" border="0" /></a><br /><br />The JMX service connection uri is part of the ActiveMQ startup output (see the last line beginning with INFO ManagementContext). After the server is running you then can start up JConsole by typing <span style="font-size:85%;"><span style="font-family:courier new;">jconsole</span></span> at a terminal/command prompt. The ActiveMQ JMX agent should be displayed in the local tab of the JConsole: Connect to Agent dialog box. If not, you can enter in the management context uri (e.g. <span style="font-size:85%;"><span style="font-family:courier new;">service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi</span></span>)<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhuMB6UqiC7sVkM2d5L-dGD-gubQ5oksHQpCgiuyBnD2TXvC-pZH12G7k3b_WnTGCdRk52huy2WMmLtH_VXqX29A-TggU_0cvbfWNejg3Z8H7wkv-ideZGm9p-fDZKsukKiPHgATAmLh-BA/s1600-h/jconsole-dialog1.png"><img style="cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhuMB6UqiC7sVkM2d5L-dGD-gubQ5oksHQpCgiuyBnD2TXvC-pZH12G7k3b_WnTGCdRk52huy2WMmLtH_VXqX29A-TggU_0cvbfWNejg3Z8H7wkv-ideZGm9p-fDZKsukKiPHgATAmLh-BA/s400/jconsole-dialog1.png" alt="" id="BLOGGER_PHOTO_ID_5152070221239471522" border="0" /></a><br />After connecting you will be presented with a Summary screen showing a snapshot of ActiveMQ. From here simply click on the MBeans tab and expand the org.apache.activemq node to see the queues and topics configured in ActiveMQ.<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgSzAzFoHcpNSme1ABCdCQFij9E0H64A-f2eDANmCLGXUr9AEAD6R2qWqdcx97-YjO6OSF_U4ds9Ovf-He6TrIql6Lz2fy5ul8e6SXOdIT6GTqeHk9K0ngXI8L64fU50PqZ46UbNM7k6745/s1600-h/jconsole-dialog2.png"><img style="cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgSzAzFoHcpNSme1ABCdCQFij9E0H64A-f2eDANmCLGXUr9AEAD6R2qWqdcx97-YjO6OSF_U4ds9Ovf-He6TrIql6Lz2fy5ul8e6SXOdIT6GTqeHk9K0ngXI8L64fU50PqZ46UbNM7k6745/s400/jconsole-dialog2.png" alt="" id="BLOGGER_PHOTO_ID_5152071977881095602" border="0" /></a><br /><br />Ok, now we're able perform as many MBean operations that are available. When you're unit testing a JMS service (or application) the first thing you typically do is place a message on a queue. You're probably saying "well duh?" and that's what I'd say. The funny thing is that I find myself spending more time googling for a tool or writing/modifying sample test code to do this simple task. You'll be amazed at how easy it is through jconsole to place a text message on a queue. Again, select the queue you want to put a message on and then on the Operations tab in jconsole and scroll down to the operation sendTextMessage. Fill in the parameter with some text and click the sendTextMessage button.<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWbzNaj6l9kFDLhaauThawyuvHQo7476cvJjQQdlxG3E3MFEWiRsDctI61WoiAE_qY05GkKAA-F1SYWLrIDV2ES1wab6x8vmJS_8MBnQbxXMGWMXTO8w4CEIXPC7jQGkn-b8SjKR2aOU0L/s1600-h/jconsole-dialog3.png"><img style="cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWbzNaj6l9kFDLhaauThawyuvHQo7476cvJjQQdlxG3E3MFEWiRsDctI61WoiAE_qY05GkKAA-F1SYWLrIDV2ES1wab6x8vmJS_8MBnQbxXMGWMXTO8w4CEIXPC7jQGkn-b8SjKR2aOU0L/s400/jconsole-dialog3.png" alt="" id="BLOGGER_PHOTO_ID_5152076315798064578" border="0" /></a><br /><br />You should see a dialog box pop up with the operation return and a message ID. Congratulations you just put a text message on a queue. You can now experiment with some of the operations like browse, purge, etc. There you have it...a simply easy to use JMS test client.<br /><br />It's very easy to find the queues and topics in the MBeans tree with a stand-alone instance of ActiveMQ. However, it gets very difficult to even find the ActiveMQ node when you attach to an application server (e.g. Geronimo) that comes bundled with ActiveMQ. I don't have a good answer for that yet.<br /><br />Happy messaging :)Rod Bireschhttp://www.blogger.com/profile/06547791022967979648noreply@blogger.com1tag:blogger.com,1999:blog-8061743095751024579.post-46385284126833513822008-01-05T14:38:00.000-05:002008-01-05T14:51:20.497-05:00It's been a long time!Just a quick post to let you know that this blog isn't dead. I know, it has been a long time since my last post. The truth is that I've been involved with a major SOA implementation (using BEA tools) since September 2007. This project is taking up most of my time and unfortunately my blog is feeling the affects :). I hope to get back in the lab soon however, in the meantime I'll be making some random SOA related posts that I hope you'll find useful.<br /><br />Oh, btw...Chariot Solutions is hosting its annual Emerging Technologies conference in March (<a href="http://www.phillyemergingtech.com/">http://www.phillyemergingtech.com/</a>). This year there will be an SOA track along with various others. Take a look and hope to see you there!Rod Bireschhttp://www.blogger.com/profile/06547791022967979648noreply@blogger.com0tag:blogger.com,1999:blog-8061743095751024579.post-35167293469527816592007-07-06T08:28:00.000-04:002007-07-07T13:16:17.211-04:00Open ESB & GlassFish: JMS messaging (part 2)The long awaited follow-up to <a href="http://soatechlab.blogspot.com/2007/03/open-esb-glassfish-jms-messaging-part-1.html">Open ESB & GlassFish: JMS messaging (part 1)</a> is finally here...well, long awaited for me that is :) I've been waiting since March to get back to OpenESB and GlassFish to implement our business use case. My hope for this post was to have GlassFish working with ActiveMQ embedded in Geronimo but I'm not quite there yet. However, I feel confident that I have a solution that will work.<br /><br />First a quick review on what I was trying to do in <a href="http://soatechlab.blogspot.com/2007/03/open-esb-glassfish-jms-messaging-part-1.html">part 1</a>. My initial approach to integrating ActiveMQ embedded in Geronimo, was to configure ActiveMQ's resource adapter in GlassFish in order for my business processes to use a set of queues in Geronimo. One thing I realized is that the configuration for my initial approach was taking me down a path of using ActiveMQ in Geronimo for <span style="font-weight: bold;">all</span> queuing which was <span style="font-weight: bold;">not</span> what I wanted to do. I just wanted to access a set of queues in Geronimo from business processes deployed in GlassFish and use the embedded queuing support in GlassFish for other JMS activity. So I had to start again with my trusty pal Google and it turned up <a href="http://weblogs.java.net/blog/rampsarathy/archive/2007/03/glassfish_v2_an.html">Ramesh Parthasarathy's Blog GlassFish V2 and ActiveMQ 4.1</a>.<br /><br />Remesh's post describes how to use the generic JMS resource adapter available in GlassFish make ActiveMQ queues available to components deployed in GlassFish. When you get it working your component (MDB) references the ActiveMQ queue through a typical resource reference as you would for a Datasource or other EJBs. The generic resource adapter provides a "bridge" by using JNDI. Some observations about the generic ra support in GlassFish:<br /><br /><span style="font-weight: bold;">What I like:</span><br /><ul><li>The concept of accessing remote queues as resource references. This is something all J2EE developers understand and can use.</li><li>No coding...this is all configuration based. You do have to code up and configure an MDB to access a remote queue.<br /></li></ul><span style="font-weight: bold;">What I don't like:</span><br /><ul><li>Lots of configuration. I can't pin this on GlassFish, J2EE applications in general have a lot of configuration which lends themselves to delicate deployments. Java EE 5 has made it a lot easier with annotations and dependency injection. However, because of limitations with annotations (i.e. not being able to specify what resource adapter you want to use) I have to use J2EE 1.4.</li><li>The use of <span style="font-style: italic;">com.sun.jndi.fscontext.RefFSContextFactory. </span>This file system-based context factory works fine. However, you need to create and maintain the .bindings file for the generic ra. For example, this means if you create a new queue in ActiveMQ or change a queue name you have to update the .bindings file. I hope to experiment with other context factories within Geronimo but for now I'll continue with the FS context factory.</li></ul><span style="font-weight: bold;">What concerns me:</span><br /><ul><li>Stability and availability. I've experienced some issues with GlassFish not recovering when ActiveMQ is not available and becomes available again.</li><li>Transactional oddities...I'm currently dealing with some odd container-managed transactional exceptions with my MDB using the ActiveMQ queues that I cannot reproduce. Hopefully this is just a configuration problem.</li></ul>What is next for me is to work through the transaction exceptions and then test the solution with Geronimo. Initial tests are encouraging which should not be a surprise because ActiveMQ is embedded in Geronimo. After that it's onto building the BPEL processes and supporting components.Rod Bireschhttp://www.blogger.com/profile/06547791022967979648noreply@blogger.com3tag:blogger.com,1999:blog-8061743095751024579.post-22286870742827438502007-05-22T08:59:00.000-04:002007-05-22T13:15:13.610-04:00Milestone 1: Use Case Implemented in Sun JavaCAPSWell it's been a long road and I'm happy to announce that we've reach our first milestone in the SOA Lab of an implemented use case using our <a href="http://soa4real.blogspot.com/2007/03/virtual-enterprise.html">Virtual Enterprise</a>. <a href="http://soa4real.blogspot.com/">Steve Smith</a> and I decided back in late April to combine our efforts and work collaboratively with JavaCAPS to complete the work. This post will focus on my hands on experience with Sun JavaCAPS 5.1.2 and overall impressions with the product.<br /><br /><font style="font-weight: bold;" size="4">Impressions of the Sun JavaCAPS tools<br /><br /></font><font style="font-weight: bold; font-style: italic;">Architecture</font><br /><br />Java CAPS has been around since the late 1990's and evolved from a traditional hub/spoke architecture to an early ESB architecture consisting of multiple JVMs for each integration point to avoid single point of failure and increase availability. Now the architecture has evolved once again to J2EE utilizing JCA, MDBs, session and entity EJBs, JMS, etc. At the core of Java CAPS is eGate Integrator. The purpose of the eGate system is to translate, transform, and route data between multiple external systems, and translate that data from one to many formats. Some of the key components of eGate are:<br /><ul><li style="font-weight: bold;">J2EE compliant middleware services (e.g. Sun SeeBeyond Integration Server aka "Logical Host")</li><li style="font-weight: bold;">A messaging server (JMS) <font style="font-weight: normal;">- deployed in the Logical Host</font><br /></li><li><font style="font-weight: bold;">Repository server</font> - The Repository server stores the setup, components, and configuration information for the elements of an eGate Project (Enterprise Designer Project). It also stores the product binary files that are required at run time by the Logical Hosts.</li><li><font style="font-weight: bold;">Java Composite Application Platform Suite Installer</font> - A Web-enabled application used for uploading Composite Application Platform Suite products into the Repository, and then downloading and installing the products from the Repository onto a system.</li><li><b>Enterprise Manager -</b> web-based application to manage multiple logical hosts.</li><li><b>Enterprise Designer GUI -</b> development IDE, which is a number of plugins deployed in NetBeans 3.4.</li></ul>The Enterprise Designer must be deployed on windows. Apparently some of the plugins only work on windows even though NetBeans is cross platform. To develop in Java CAPS you first need to setup a repository. This repository appears to run in a separate instance of the SeeBeyond Integration Server. It is quite "heavy" so it should be deployed on a powerful machine. The Enterprise Designer appears to have a lot of communication with the repository. If the repository is on a slow box and/or network the instances of Enterprise Designer attached to it will have poor performance. The Enterprise Manager is a web-based application that runs in a web container that is based on tomcat. This application does an adequate job of allowing administrators to attach and administer several integration servers.<br /><font style="font-weight: bold; font-style: italic;"><br />Installation/Configuration<br /></font><br />Overall the installation and configuration went pretty well, I'd give it a B+. It was disappointing that the Enterprise Designer could not be installed on a non-windows OS. It was a little concerning to hear that the RedHat linux distribution of the integration server was EOL (End Of Life). I guess they're more concerned about Windows at this point. If you stay completely on a Windows platform the installation and configuration is typical of what you'd expect from a windows install (i.e. GUI wizard-like installer).<br /><br />In our lab we installed the Repository on a CentOS VMWare VM. A couple of small things had to be done to get it to work like:<br /><ul><li>linux installation did not pick up a jre embedded in the installation directory therefore I had to modify the install.sh script to use my jre.</li><li>had to modify the startserver.sh and stopserver.sh to comment out the JAVA_HOME hard coded path because it was wrong. I opted to use my jdk1.5 JAVA_HOME.</li></ul>Other than that the repository seems to run well on linux.<br /><br /><font style="font-weight: bold; font-style: italic;">Development & Debugging</font><br /><br />For the most part, the Enterprise Designer seems stable and is easy to use. The repository must be available and accessible in order to use the designer, which is limiting. The communications with the repository introduces latency when creating, modifying and deleting objects, even when the repository is installed on the local machine. The repository has a built in source code control system that <b>locks</b> files, which makes concurrent development difficult if not impossible. The "locking" that happens requires that the user "check out" a business process (BPEL) in order graphically see the process or even look at the properties. There is <b>no</b> support for a 3rd party source code systems (e.g. SVN, CVS, etc). This limitation can certainly become an issue when introducing Java CAPS to an enterprise that has already standardized on a source code control system. Debugging support for Java Collection Definitions is ok. I expected it to be more robust as it is in the NetBeans IDE. I did not try the debugging support for BPEL.<br /><br /><font style="font-weight: bold; font-style: italic;">Deployment & Troubleshooting</font><br /><br />Building and deploying business processes is heavy. Since Java CAPS deploys a to a J2EE application server, when you build a project you are building a .ear. The most basic business process results in an ear file that is ~5mb in size. Business processes that are built in BPEL are typically ~10mb in size. The process for building the business process is easy and straight forward. I did run into issues with binaries that were not cleaned up that resulted in deployments with unwanted code. This only happened a few times. The Sun SeeBeyond integration server does have pretty good logging to help troubleshoot problems.<br /><br /><font style="font-weight: bold; font-style: italic;">Comments</font><br /><br />If I had to give Java CAPS a grade based on what I've learned and used it would be a B. (NOTE: I have to mention that I did have quite a bit of training on Java CAPS from Sun and without it my experience with the tools would have been much different.) The development and administrative tools seem pretty good. I'm not that impressed with the heaviness of J2EE, large deployment binaries, lack of support for 3rd party source code control systems, tight coupling between the designer and the repository and the lack of support for open source technology (e.g. Geronimo, ActiveMQ, etc.). We ran into challenges with correlation (see <a href="http://soa4real.blogspot.com/2007/05/bpel-correlations-introduced-using-sun.html">BPEL Correlations introduced using Sun CAPS</a> and <a href="http://soa4real.blogspot.com/2007/05/bpel-correlationsas-easy-as-it-sounds.html">BPEL Correlations...as easy as it sounds?</a>). That took us a week or more to get resolved.<br /><br />Bottom line, building composite applications can be difficult. It's not difficult in the sense of the concepts and tools (once you know them). It's difficult to setup a "complete" development environment (this is where our SOA Lab is real beneficial). This type of development takes a lot more time than it seems it would, we found this out first hand. There are a lot of parts (servers, clients, GUIs, etc.) that have to eventually work together. Depending on how complex your business process is you could be spending a large amount of time just mocking up environments for unit and integration testing. After implementing a fairly straightforward use case I have an appreciation for the term "governance" as it applies to implementing an SOA. Our straightforward use case resulted in 8 business processes (BPEL processes), 2 JCDs (Java Collaboration Definitions) and numerous Java CAPS objects. Ok, now imagine having multiple projects going on at the same time and trying to manage reuse of these objects not to mention the operational support required to keep an eye on everything in production.<br /><br /><font size="4"><font style="font-weight: bold;">What's Next?...</font></font><br /><br />Well, we still have a little clean up to do with the Java CAPS use case implementation. After that then it's back onto either ServiceMix or OpenESB for me. I'm looking forward to comparing a commercial product to an open source project.Rod Bireschhttp://www.blogger.com/profile/06547791022967979648noreply@blogger.com5tag:blogger.com,1999:blog-8061743095751024579.post-83069010678169876462007-04-17T08:22:00.000-04:002007-04-17T10:16:22.356-04:00First taste of ServiceMixIt's been just over a month since my last post and that's fair too long. So, you might ask, what's going on? Well I had a slight diversion from Java CAPS to take a closer look at <a href="http://incubator.apache.org/servicemix/home.html">ServiceMix</a>. I only spent a little over week looking into ServiceMix so that doesn't justify any kind of experience let alone blog about it. However, for those who are curious but may not have the time to look at ServiceMix, I've decided to share my first impressions.<br /><br />I started out by installing <a href="http://www.logicblaze.com/content/view/67/99/">LogicBlaze FUSE</a> on a CentOS linux VM along with the FUSE Development Environment, which is Eclipse with some plugins. Now why FUSE you might ask? Well FUSE is interesting because it is marketed as a "runtime environment for SOA" that is based on best-of-bread open source projects. Since I was asked to look at the viability of using ServiceMix at an enterprise level, I felt that a platformed based on ServiceMix may have more to offer verses just an ESB. Anyway, back to the fun :) Ok, so now I have FUSE installed and the Development Environment on a linux distro. I start up the IDE and click on the area for a tutorial on the first screen and eclipse crashes! Ok, not a very good start. It seems like most of the SOA products are "happier" on Windows so I switched platforms to a Windows XP VM. Things seemed a little more stable from then on. In the interest of time, my colleague <a href="http://tompurcellstechblog.blogspot.com/index.html">Tom Purcell</a> then took the "ball" with the FUSE stuff and I turned my focus on ServiceMix.<br /><br />I installed ServiceMix 3.1 stand-alone on my Windows XP VM and started looking at the canned examples (i.e. File Binding and loan-broker). A couple things really impressed me:<br /><ul><li><span style="font-weight: bold;">Ease of Service Assembly deployment</span> - Very similar to deploying a web app (.war file) in Tomcat, just copy your service assembly archive (e.g. loan-broker-sa.zip) into<servicemix> the deploy directory of the ServiceMix installation home. ServiceMix will then try to load the assembly and tell you if you need anything.<br /><span style="font-weight: bold;"></span></servicemix></li><li><span style="font-weight: bold;">Ease of JBI component installation</span> - wow, it can't get much simpler than this. The loan-broker example require some JBI components that were not installed in my instance of ServiceMix. So, how did I know...well ServiceMix was kind enough to tell me exactly what JBI components I needed in the server log. Here's an example from the log:<br /><br /><blockquote><pre>10:14:12,571 | WARN | Timer-4 | AutoDeploymentService | ramework.AutoDeploymentService 341 |<br />Components servicemix-lwcontainer are not installed yet: the service <br>assembly loanbroker deployment<br />is suspended and will be resumed <br>once the listed components are installed<br><br><br />10:14:12,883 | INFO | Timer-4 | AutoDeploymentService | ramework.AutoDeploymentService 646 |<br />Directory: deploy: Finished installation <br>of archive: loanbroker-sa.zip<br></pre></blockquote><br />What is also very nice is that ServiceMix suspended my assembly until the dependencies were resolved! In this case I need to find the "loanbroker-sa.zip", as the log told me" and copy it into <servicemix>install directory.<br /></servicemix></li></ul>The File Binding example is a very good example of declarative programming in ServiceMix. It's not a robust example but it does give you a sense of the benefits for developing JBI compliant assemblies.<br /><br />Ok, with the good there's always some bad. The bad in this case is lack of documentation and current documentation. For example, I was trying to do a little work with XSQL in ServiceMix and I found a <a href="http://incubator.apache.org/servicemix/xsql.html">page</a> on the ServiceMix website about it. The problem is that the code snippets and configuration were missing. After plenty of searches, a couple emails to a user group and even pulling down the latest source from subversion I found that the XSQL support was moved to a "sandbox" area. I was encouraged to use a non-JBI compliant JDBC component instead. It's still not clear what the future is for XSQL in ServiceMix. That is just one of many examples where the documentation is lacking. Obviously, this plays a role in an evaluation of any product or project.<br /><br />Overall I'm very encouraged with what I've seen in a short period of time with ServiceMix. I'm back working with Java CAPS to finish up what I started with our use case in the lab. However, I'm really curious to continue looking at ServiceMix and how it compares to another JBI compliant ESB OpenESB.Rod Bireschhttp://www.blogger.com/profile/06547791022967979648noreply@blogger.com4tag:blogger.com,1999:blog-8061743095751024579.post-76810830227820075632007-03-16T13:32:00.000-04:002007-07-22T17:04:52.624-04:00Open ESB & GlassFish: JMS messaging (part 1)In my last post <a href="http://soatechlab.blogspot.com/2007/03/open-esb-glassfish-getting-started.html">Open ESB & GlassFish: Getting Started</a> I provided information on our SOA Lab as well as history behind why we selected Open ESB & GlassFish to test in the lab. This post I describe my experience with trying to implement the first step in our use case, JMS messaging between a Alert System running in a Geronimo application server and a BPEL process running in GlassFish.<br /><br />My goal is to build a BPEL process that can send and receive JMS messages with the Alert System running in a separate and different application server. Sounds pretty straight forward and nothing new for even the "greenest" of SOA products. However, there one little detail that doesn't make this so simple...the message queue implementation is ActiveMQ running in Geronimo.<br /><br />So I figured I'd first "ease" my pain with this implementation by walking through a tutorial "<a href="http://weblogs.java.net/blog/kalali/archive/2006/05/step_by_step_to.html">Step by Step toward a jms sample in NetBeans and yes GlassFish</a>" on Masoud Kalali's Blog...and to no one's surprise, it worked. In all fairness, it turned out to be a good and informational tutorial. Masoud's approach was to:<br /><ol><li>Configure the internal GlassFish JMS implementation</li><li>Develop a Message-Driven Bean (MDB) to pop messages off a queue</li><li>Develop a web-based JMS client application that would put messages on a queue</li></ol>The sample was quite simple and easy to build, deploy and test. However, remember my first blog post (<a href="http://soatechlab.blogspot.com/2007/02/let-journey-begin.html">Let the Journey Begin</a>), I mentioned that "...we are not satisfied with just stepping through scripted tutorials of basic examples that the SOA product vendors offer." This is a good example. Masoud's sample works very nicely however, it's using GlassFish JMS implementation, the MDB is deployed in the same GlassFish application server and the web-based JMS client application is (yet again) deployed in the same GlassFish application server.<br /><br />Ok, at this point I feel I'm ready to implement the first step in the use case. I have the VE (<a href="http://soa4real.blogspot.com/2007/03/virtual-enterprise.html">Virtual Enterprise</a>) running in a Geronimo application server that uses ActiveMQ. The Alert System running in Geronimo is placing messages on an ActiveMQ queue. After doing some research and talking with my colleague Steve Smith (who is working with CapeClear on implementing the same use case), I came up with the following approach:<br /><ol><li>Configure a ActiveMQ resource adapter in GlassFish. I referenced the steps in the Sun Java System Application Server docs for <a href="http://docs.sun.com/app/docs/doc/819-3658/6n5s5nkls?a=view">Foreign JMS Providers</a></li><li>Change the MDB annotations to map to the remote ActiveMQ queue</li><li>Test with the Alert System running in Geronimo</li></ol>Well I was able to successfully configure the ActiveMQ resource adapter in GlassFish. The MDB deployed just fine with the changes to the annotations to map to the remote ActiveMQ queue however, messages are not being pop off the ActiveMQ queue. Interestingly enough, I can use the web-based JMS client deployed in GlassFish to put messages on the remote ActiveMQ through the resource adapter in GlassFish. So, I believe the resource adapter is configured properly but my MDB is still having "issues."<br /><br />I'm real close but not there yet. To top it off, I've had to temporarily "shelf" the Open ESB & GlassFish project and focus on Sun Java CAPS. We were fortunate enough to get some Sun training on Java CAPS and we've decided to implement the use case in the SOA lab since Java CAPS is still fresh in our minds. As much as I hate to leave a problem unresolved, I have to in this case but I <span style="font-weight: bold;">WILL</span> come back to it.<br /><br />...my next post will be on the Sun Java CAPS SOA product tools in our lab.Rod Bireschhttp://www.blogger.com/profile/06547791022967979648noreply@blogger.com5tag:blogger.com,1999:blog-8061743095751024579.post-35299279091760334182007-03-15T20:49:00.000-04:002007-03-16T11:35:51.502-04:00Open ESB & GlassFish: Getting Started<span style="font-weight: bold;font-size:130%;" >The SOA Lab</span><br />Before I start talking about my experience so far with Open ESB & GlassFish let me set the stage by introducing the <a href="http://www.chariotsolutions.com/expertise/soa_lab.jsp">SOA Lab</a>. First a special thanks to my colleague Steve Smith for blogging about a key piece of the <a href="http://www.chariotsolutions.com/expertise/soa_lab.jsp">SOA Lab</a> and that is <a href="http://soa4real.blogspot.com/2007/03/virtual-enterprise.html">The Virtual Enterprise</a>...less work for me :-). I recommend reading <a href="http://soa4real.blogspot.com/2007/03/virtual-enterprise.html">The Virtual Enterprise</a> post first to get a better understanding of systems/applications that make up the VE and their interfaces. The SOA Lab is a reference architecture with the VE representing business systems and at its core is a "pluggable" component for swapping in SOA products. This provides us with an environment for evaluating SOA products, learning and performing proof-of-concepts. Ok, now that you have at least a high-level understanding of the lab lets move on.<br /><br /><span style="font-weight: bold;"><span style="font-size:130%;">Open ESB & GlassFish - Why?</span><br /></span>We recently starting looking at Open ESB & GlassFish after a potential client inquired about our knowledge and experience with the products. We had identified the need to evaluate an open source SOA project but didn't select one right away. We thought that it would either ServiceMix or Mule (which we already had experience with and is a key component of the VE). Both ServiceMix and Mule are on the radar for the lab but not in our current iteration. So, knowing very little about Open ESB & GlassFish I started my research.<br /><br />After spending some time on the GlassFish community website (<a href="https://glassfish.dev.java.net/">https://glassfish.dev.java.net/</a>) things started coming together for me. GlassFish is a Java EE 5 application server that is "...based on the source code for Sun Java System Application Server PE 9 donated by Sun Microsystems and TopLink persistence code donated by Oracle." The project is getting plenty of support from Sun and Oracle, not to mention, more than 100 contributers in the community. So, it appears that we have a mature and robust application server with good support.<br /><br />Ok, so what is Open ESB? A quick google turned up its community website (<a href="https://open-esb.dev.java.net/">https://open-esb.dev.java.net/</a>). After spending some time on the website I'm coming to the understanding that Open ESB is a service bus based on Java Business Integration (JBI). What is very interesting is that Java EE 5 SDK now includes a subset of functionality (JBI runtime, a BPEL 2.0 Service Engine, and a SOAP binding component) from Open ESB.<br /><br />So far I like what I'm reading, however, as my colleague Tom would say..."the devil is in the details." My next question is what tools do I use to build Open ESB composite application? Well good news for NetBeans IDE fans, there is a NetBeans Enterprise Pack for NetBeans 5.5 that includes nice tooling for creating BPEL processes graphically. I haven't spent a whole lot of time with the tools, but they do seem to be pretty good. The downside is that if you're IDE of choice is <span style="font-weight: bold;">not</span> NetBeans then you're out of luck. I'm not aware of Open ESB support any other IDE...after all this is a Sun supported project :)<br /><br />Ok, I've liked what I've read so far and even though I haven't used NetBeans for a while I'm open to other IDEs so that doesn't bother me. It's settled, we've decided to select Open ESB & GlassFish as our first open source SOA project to evaluate in the SOA Lab.<br /><br />...the next post I'll discuss my experience with JMS support in GlassFish to integrate with the Alert System in our VE, which is the first step in our business use case.Rod Bireschhttp://www.blogger.com/profile/06547791022967979648noreply@blogger.com4tag:blogger.com,1999:blog-8061743095751024579.post-39163240732289153282007-02-28T14:50:00.000-05:002007-03-01T07:30:11.934-05:00Let the Journey BeginThe "Journey" I'm referring to is a path to a better understanding of SOA (Service Oriented Architecture) and the tools that enable an organization to achieve it. My name is Rod Biresch and I'm part of a team of Enterprise Architects that include <a href="http://soa4real.blogspot.com/">Steve Smith</a> and <a href="http://tompurcellstechblog.blogspot.com/">Tom Purcell</a> at <a href="http://www.chariotsolutions.com/home/index.jsp">Chariot Solutions</a> who are taking a real world "hands on" practical approach to SOA. So why are we doing this? The answer is pretty simple, we are <span style="font-weight: bold;">not</span> satisfied with just stepping through scripted tutorials of basic examples that the SOA product vendors offer. Moreover, these tutorials just happen to work very nicely on a single machine in the same product suite. We've took it upon ourselves to find out what these tools can do in "real world" situations with various applications on disparate platforms. Ok, hopefully I have your interest by now. As much as I'd like to jump right in and explain what we're doing I have to take a step back.<br /><br />So lets start at the beginning, what is SOA? Today, it has so many meanings and formal definitions that seems to vary depending on which expert you talk to. As my colleague <a href="http://soa4real.blogspot.com/">Steve Smith</a> blogged in <a href="http://soa4real.blogspot.com/2007/02/beginning.html">The Beginning</a>, there seems to be no single or "correct" definition to SOA (Service Oriented Architecture). As for opinions, there are plenty...some people coin it as "marketecture" an others don't see the big deal..."we've been integrating systems and service-enabling applications for long time now!?" Quite frankly, I believe there's truth in both of these. But anyway, I like to think of SOA in business terms as a goal rather than a framework or architectural component. Those pieces are "enablers" of an SOA. Now I'm not going explain why businesses are considering SOA or attempt to formalize it, that's not the point of this blog. Besides, we have plenty of qualified experts out there, not to mention, resources on the web for that, e.g. <a href="http://en.wikipedia.org/wiki/Service-oriented_architecture">Wikipedia on "SOA"</a>. The fact is that SOA has a lot of momentum in the market and product vendors like IBM, Oracle, Sun Microsystems, BEA, etc. have made huge investments in SOA. Corporations are taking a closer look at SOA and trying to figure out what it means to their business. So practically speaking, SOA is here today and indications are that it continues to quickly gain momentum. However, this fast growth brings plenty of confusion and a need for knowledge, as we found out.<br /><br />The work we are doing in our lab is very exciting. The knowledge and experience our team has gained through the lab is invaluable and I plan on sharing my findings on this blog. In subsequent posts I'll be discussing my experience with a commercial SOA product (Sun Java CAPS) and an open source ESB (Open ESB on GlassFish). My goal with this blog is to pass along information from a non-biased view on implementing a real world business scenarios with these tools.<br /><br /><a href="mailto:rbiresch@chariotsolutions.com">Rod Biresch</a><br />Enterprise Architect<br /><a href="http://www.chariotsolutions.com/home/index.jsp">Chariot Solutions</a>Rod Bireschhttp://www.blogger.com/profile/06547791022967979648noreply@blogger.com0