<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-7515187228721563448</id><updated>2026-10-21T00:44:54.346-07:00</updated><category term="Cluster Wide Singleton"/><category term="HA Singleton"/><title type='text'>The Next Milestone</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://milestonenext.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7515187228721563448/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://milestonenext.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Beijing Beijing</name><uri>http://www.blogger.com/profile/12013373726184997758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='28' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTm1nk7ZqbPTfBofk6dIg7Zfx820i-FNuXqGbSlZNbRw5-RPJuqgDFNoW_zdgJCMCYj6R5cTGNgNKmwTzeDsEm2EHkqni9ywIanrN-PIRd4Z4yZXUOHhC12zzDid1A1w/s220/profile.png'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>25</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-7515187228721563448.post-2010012056636569212</id><published>2015-07-25T09:10:00.000-07:00</published><updated>2015-07-26T09:38:48.677-07:00</updated><title type='text'>HBase Spring Data Sample</title><content type='html'>&lt;div style=&quot;background-color: white; font-family: Lato, arial, sans-serif; line-height: 24px;&quot;&gt;
&lt;div style=&quot;margin-left: 10px; margin-right: 10px;&quot;&gt;
&lt;span style=&quot;color: #666666; font-size: x-small;&quot;&gt;Document &amp;nbsp;Version 1.0&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;releaseinfo&quot; style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; margin-left: 10px; margin-right: 10px;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div class=&quot;copyright&quot; style=&quot;margin-left: 10px; margin-right: 10px;&quot;&gt;
&lt;div style=&quot;background-color: white; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;
&lt;span style=&quot;color: #666666; font-size: x-small;&quot;&gt;Copyright © 2015 beijing.beijing.012@gmail.com&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white;&quot;&gt;
&lt;div style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;
&lt;span style=&quot;color: #444444; font-size: x-small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt; &lt;/div&gt;
&lt;h3 style=&quot;font-family: &#39;Times New Roman&#39;; line-height: normal;&quot;&gt;
&lt;span style=&quot;color: #351c75; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14px; font-weight: normal; line-height: 17px;&quot;&gt;&lt;b&gt;Keywords:&lt;/b&gt;&lt;/span&gt;&lt;br style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14px; font-weight: normal; line-height: 17px;&quot; /&gt;&lt;span style=&quot;color: #351c75; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14px; font-weight: normal; line-height: 17px;&quot;&gt;Spring Data for Hadoop, NoSQL, HBase, Java, Maven&lt;/span&gt;&lt;/h3&gt;
&lt;div style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;
&lt;span style=&quot;color: #351c75; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14px; font-weight: normal; line-height: 17px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div style=&quot;background-color: #b2ab66; border-bottom-left-radius: 2px; border-bottom-right-radius: 2px; border-top-left-radius: 2px; border-top-right-radius: 2px; border: 0px none; padding: 5px 10px;&quot;&gt;
&lt;h3&gt;
Table of Contents&lt;/h3&gt;
&lt;h3&gt;
1. Create a simple Maven project &quot;spring-hbase&quot; in Eclipse&lt;/h3&gt;
&lt;h3&gt;
2. Prepare project&#39;s pom.xml file&lt;/h3&gt;
&lt;h3&gt;
3. Prepare Spring configuration file&lt;/h3&gt;
&lt;h3&gt;
4. Write code accessing HBase&lt;/h3&gt;
&lt;h3&gt;
5. Run the sample&lt;/h3&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;
&lt;span style=&quot;color: red; font-size: large;&quot;&gt;&lt;br /&gt;
&lt;/span&gt; &lt;br /&gt;
&lt;span style=&quot;color: red; font-size: large;&quot;&gt;N&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;oSQL database&amp;nbsp;might be interesting even if we are not really dealing with petabytes data. For a relational database with terabytes data, the time a query need to finish might take so long that it becomes NOT acceptable for a performance critical system. Even if we index tables, we optimize queries, or do VACUUM &amp;nbsp;every day. For one of my concrete problems, I tried a solution with HBase and Spring Data for Hadoop, with success, and with far better performance. I had problems making my first Spring Data application to run. This post will try to show a simple running sample of Spring Data for Hadoop. Hope this could help someone with more or less the same difficulties.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;br /&gt;
&lt;/span&gt; &lt;/div&gt;
&lt;div style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;b&gt;1. Create a simple Maven project &quot;spring-hbase&quot; in Eclipse&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/span&gt; &lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi84X1vhjl46s_khx2Yw1GHpMLW3Ccd_B9UT2gPFvAjsp0Mg-qHaQWI2nOVqWrf26gtFhDUTM7helqTd50LCUDZFD6ShoIpSHgaCcnRbedqBYIlgHWoafb8l59Vx84PkyqATIW52EOB45qY/s1600/hbase1.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi84X1vhjl46s_khx2Yw1GHpMLW3Ccd_B9UT2gPFvAjsp0Mg-qHaQWI2nOVqWrf26gtFhDUTM7helqTd50LCUDZFD6ShoIpSHgaCcnRbedqBYIlgHWoafb8l59Vx84PkyqATIW52EOB45qY/s320/hbase1.png&quot; width=&quot;218&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;
&lt;b style=&quot;color: #444444;&quot;&gt;2. Prepare project&#39;s pom.xml file&lt;/b&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;Necessary dependencies include jars of Spring, Spring Data, HBase and Hadoop.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;In case some jars could not be found in maven central repositories, you could install them manually in enterprise repositories or you local repository. &amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fff7b2; border-bottom-left-radius: 6px; border-bottom-right-radius: 6px; border-top-left-radius: 6px; border-top-right-radius: 6px; border: 1px solid rgb(187, 187, 187); padding: 5px 10px;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif; line-height: 24px;&quot;&gt;&lt;span style=&quot;color: #6aa84f;&quot;&gt;&amp;lt;project &lt;/span&gt;&lt;span style=&quot;color: #a64d79;&quot;&gt;xmlns&lt;/span&gt;&lt;span style=&quot;color: #6aa84f;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;&quot;http://maven.apache.org/POM/4.0.0&quot;&lt;/span&gt;&lt;span style=&quot;color: #6aa84f;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #a64d79;&quot;&gt;xmlns:xsi&lt;/span&gt;&lt;span style=&quot;color: #6aa84f;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;&quot;http://www.w3.org/2001/XMLSchema-instance&quot;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #6aa84f; white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #a64d79;&quot;&gt;xsi:schemaLocation&lt;/span&gt;&lt;span style=&quot;color: #6aa84f;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;&quot;http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd&quot;&lt;/span&gt;&lt;span style=&quot;color: #6aa84f;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #6aa84f; white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #6aa84f;&quot;&gt;&amp;lt;modelVersion&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;4.0.0&lt;/span&gt;&lt;span style=&quot;color: #6aa84f;&quot;&gt;&amp;lt;/modelVersion&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #6aa84f; white-space: pre;&quot;&gt;       &lt;/span&gt;&lt;span style=&quot;color: #6aa84f;&quot;&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;wangs&lt;/span&gt;&lt;span style=&quot;color: #6aa84f;&quot;&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #6aa84f; white-space: pre;&quot;&gt;       &lt;/span&gt;&lt;span style=&quot;color: #6aa84f;&quot;&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;spring-hbase&lt;/span&gt;&lt;span style=&quot;color: #6aa84f;&quot;&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #6aa84f; white-space: pre;&quot;&gt;       &lt;/span&gt;&lt;span style=&quot;color: #6aa84f;&quot;&gt;&amp;lt;version&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;0.0.1-SNAPSHOT&lt;/span&gt;&lt;span style=&quot;color: #6aa84f;&quot;&gt;&amp;lt;/version&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #6aa84f; white-space: pre;&quot;&gt;       &lt;/span&gt;&lt;span style=&quot;color: #6aa84f;&quot;&gt;&amp;lt;name&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;spring-hbase&lt;/span&gt;&lt;span style=&quot;color: #6aa84f;&quot;&gt;&amp;lt;/name&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6aa84f;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;lt;repositories&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6aa84f;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;        &lt;/span&gt;&amp;lt;repository&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #6aa84f; white-space: pre;&quot;&gt;              &lt;/span&gt;&lt;span style=&quot;color: #6aa84f;&quot;&gt;&amp;lt;id&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;repo1.maven.org/maven2&lt;/span&gt;&lt;span style=&quot;color: #6aa84f;&quot;&gt;&amp;lt;/id&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #6aa84f; white-space: pre;&quot;&gt;             &lt;/span&gt;&lt;span style=&quot;color: #6aa84f;&quot;&gt;&amp;lt;url&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;http://repo1.maven.org/maven2&lt;/span&gt;&lt;span style=&quot;color: #6aa84f;&quot;&gt;&amp;lt;/url&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6aa84f;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;        &lt;/span&gt;&amp;lt;/repository&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6aa84f;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;lt;/repositories&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6aa84f;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;lt;dependencies&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6aa84f;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;       &lt;/span&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #6aa84f; white-space: pre;&quot;&gt;             &lt;/span&gt;&lt;span style=&quot;color: #6aa84f;&quot;&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;org.springframework.data&lt;/span&gt;&lt;span style=&quot;color: #6aa84f;&quot;&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #6aa84f; white-space: pre;&quot;&gt;             &lt;/span&gt;&lt;span style=&quot;color: #6aa84f;&quot;&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;spring-data-hadoop&lt;/span&gt;&lt;span style=&quot;color: #6aa84f;&quot;&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #6aa84f; white-space: pre;&quot;&gt;             &lt;/span&gt;&lt;span style=&quot;color: #6aa84f;&quot;&gt;&amp;lt;version&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;2.2.0.RELEASE&lt;/span&gt;&lt;span style=&quot;color: #6aa84f;&quot;&gt;&amp;lt;/version&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6aa84f;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;        &lt;/span&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6aa84f;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;        &lt;/span&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #6aa84f; white-space: pre;&quot;&gt;              &lt;/span&gt;&lt;span style=&quot;color: #6aa84f;&quot;&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;org.springframework&lt;/span&gt;&lt;span style=&quot;color: #6aa84f;&quot;&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #6aa84f; white-space: pre;&quot;&gt;              &lt;/span&gt;&lt;span style=&quot;color: #6aa84f;&quot;&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;spring-core&lt;/span&gt;&lt;span style=&quot;color: #6aa84f;&quot;&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #6aa84f; white-space: pre;&quot;&gt;              &lt;/span&gt;&lt;span style=&quot;color: #6aa84f;&quot;&gt;&amp;lt;version&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;4.1.7.RELEASE&lt;/span&gt;&lt;span style=&quot;color: #6aa84f;&quot;&gt;&amp;lt;/version&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6aa84f;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;        &lt;/span&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6aa84f;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;        &lt;/span&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #6aa84f; white-space: pre;&quot;&gt;              &lt;/span&gt;&lt;span style=&quot;color: #6aa84f;&quot;&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;org.springframework&lt;/span&gt;&lt;span style=&quot;color: #6aa84f;&quot;&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #6aa84f; white-space: pre;&quot;&gt;              &lt;/span&gt;&lt;span style=&quot;color: #6aa84f;&quot;&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;spring-context&lt;/span&gt;&lt;span style=&quot;color: #6aa84f;&quot;&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #6aa84f; white-space: pre;&quot;&gt;              &lt;/span&gt;&lt;span style=&quot;color: #6aa84f;&quot;&gt;&amp;lt;version&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;4.1.7.RELEASE&lt;/span&gt;&lt;span style=&quot;color: #6aa84f;&quot;&gt;&amp;lt;/version&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6aa84f;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;        &lt;/span&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6aa84f;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;        &lt;/span&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #6aa84f; white-space: pre;&quot;&gt;              &lt;/span&gt;&lt;span style=&quot;color: #6aa84f;&quot;&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;org.apache.hbase&lt;/span&gt;&lt;span style=&quot;color: #6aa84f;&quot;&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #6aa84f; white-space: pre;&quot;&gt;             &lt;/span&gt;&lt;span style=&quot;color: #6aa84f;&quot;&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;hbase-client&lt;/span&gt;&lt;span style=&quot;color: #6aa84f;&quot;&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #6aa84f; white-space: pre;&quot;&gt;              &lt;/span&gt;&lt;span style=&quot;color: #6aa84f;&quot;&gt;&amp;lt;version&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;1.0.1.1&lt;/span&gt;&lt;span style=&quot;color: #6aa84f;&quot;&gt;&amp;lt;/version&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6aa84f;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;        &lt;/span&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6aa84f;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;        &lt;/span&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #6aa84f; white-space: pre;&quot;&gt;               &lt;/span&gt;&lt;span style=&quot;color: #6aa84f;&quot;&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;org.apache.hbase&lt;/span&gt;&lt;span style=&quot;color: #6aa84f;&quot;&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #6aa84f; white-space: pre;&quot;&gt;               &lt;/span&gt;&lt;span style=&quot;color: #6aa84f;&quot;&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;hbase-common&lt;/span&gt;&lt;span style=&quot;color: #6aa84f;&quot;&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #6aa84f; white-space: pre;&quot;&gt;               &lt;/span&gt;&lt;span style=&quot;color: #6aa84f;&quot;&gt;&amp;lt;version&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;1.0.1.1&lt;/span&gt;&lt;span style=&quot;color: #6aa84f;&quot;&gt;&amp;lt;/version&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6aa84f;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;        &lt;/span&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6aa84f;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;        &lt;/span&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #6aa84f; white-space: pre;&quot;&gt;               &lt;/span&gt;&lt;span style=&quot;color: #6aa84f;&quot;&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;org.apache.hbase&lt;/span&gt;&lt;span style=&quot;color: #6aa84f;&quot;&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #6aa84f; white-space: pre;&quot;&gt;               &lt;/span&gt;&lt;span style=&quot;color: #6aa84f;&quot;&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;hbase-hadoop2-compat&lt;/span&gt;&lt;span style=&quot;color: #6aa84f;&quot;&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #6aa84f; white-space: pre;&quot;&gt;               &lt;/span&gt;&lt;span style=&quot;color: #6aa84f;&quot;&gt;&amp;lt;version&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;1.0.1.1&lt;/span&gt;&lt;span style=&quot;color: #6aa84f;&quot;&gt;&amp;lt;/version&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6aa84f;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;        &lt;/span&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6aa84f;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;        &lt;/span&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #6aa84f; white-space: pre;&quot;&gt;              &lt;/span&gt;&lt;span style=&quot;color: #6aa84f;&quot;&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;org.apache.hbase&lt;/span&gt;&lt;span style=&quot;color: #6aa84f;&quot;&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #6aa84f; white-space: pre;&quot;&gt;              &lt;/span&gt;&lt;span style=&quot;color: #6aa84f;&quot;&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;hbase-protocol&lt;/span&gt;&lt;span style=&quot;color: #6aa84f;&quot;&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #6aa84f; white-space: pre;&quot;&gt;              &lt;/span&gt;&lt;span style=&quot;color: #6aa84f;&quot;&gt;&amp;lt;version&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;1.0.1.1&lt;/span&gt;&lt;span style=&quot;color: #6aa84f;&quot;&gt;&amp;lt;/version&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6aa84f;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;        &lt;/span&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6aa84f;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;        &lt;/span&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #6aa84f; white-space: pre;&quot;&gt;              &lt;/span&gt;&lt;span style=&quot;color: #6aa84f;&quot;&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;org.apache.htrace&lt;/span&gt;&lt;span style=&quot;color: #6aa84f;&quot;&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #6aa84f; white-space: pre;&quot;&gt;             &lt;/span&gt;&lt;span style=&quot;color: #6aa84f;&quot;&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;htrace-core&lt;/span&gt;&lt;span style=&quot;color: #6aa84f;&quot;&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #6aa84f; white-space: pre;&quot;&gt;             &lt;/span&gt;&lt;span style=&quot;color: #6aa84f;&quot;&gt;&amp;lt;version&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;3.1.0-incubating&lt;/span&gt;&lt;span style=&quot;color: #6aa84f;&quot;&gt;&amp;lt;/version&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6aa84f;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;        &lt;/span&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6aa84f;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;        &lt;/span&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #6aa84f; white-space: pre;&quot;&gt;              &lt;/span&gt;&lt;span style=&quot;color: #6aa84f;&quot;&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;io.netty&lt;/span&gt;&lt;span style=&quot;color: #6aa84f;&quot;&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #6aa84f; white-space: pre;&quot;&gt;              &lt;/span&gt;&lt;span style=&quot;color: #6aa84f;&quot;&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;netty-all&lt;/span&gt;&lt;span style=&quot;color: #6aa84f;&quot;&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #6aa84f; white-space: pre;&quot;&gt;              &lt;/span&gt;&lt;span style=&quot;color: #6aa84f;&quot;&gt;&amp;lt;version&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;4.0.23.Final&lt;/span&gt;&lt;span style=&quot;color: #6aa84f;&quot;&gt;&amp;lt;/version&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6aa84f;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;        &lt;/span&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6aa84f;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;        &lt;/span&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #6aa84f; white-space: pre;&quot;&gt;              &lt;/span&gt;&lt;span style=&quot;color: #6aa84f;&quot;&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;org.apache.hadoop&lt;/span&gt;&lt;span style=&quot;color: #6aa84f;&quot;&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #6aa84f; white-space: pre;&quot;&gt;              &lt;/span&gt;&lt;span style=&quot;color: #6aa84f;&quot;&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;hadoop-client&lt;/span&gt;&lt;span style=&quot;color: #6aa84f;&quot;&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #6aa84f; white-space: pre;&quot;&gt;              &lt;/span&gt;&lt;span style=&quot;color: #6aa84f;&quot;&gt;&amp;lt;version&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;2.5.1&lt;/span&gt;&lt;span style=&quot;color: #6aa84f;&quot;&gt;&amp;lt;/version&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6aa84f;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;        &lt;/span&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6aa84f;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;        &lt;/span&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #6aa84f; white-space: pre;&quot;&gt;             &lt;/span&gt;&lt;span style=&quot;color: #6aa84f;&quot;&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;org.apache.hadoop&lt;/span&gt;&lt;span style=&quot;color: #6aa84f;&quot;&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #6aa84f; white-space: pre;&quot;&gt;             &lt;/span&gt;&lt;span style=&quot;color: #6aa84f;&quot;&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;hadoop-common&lt;/span&gt;&lt;span style=&quot;color: #6aa84f;&quot;&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #6aa84f; white-space: pre;&quot;&gt;             &lt;/span&gt;&lt;span style=&quot;color: #6aa84f;&quot;&gt;&amp;lt;version&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;2.5.1&lt;/span&gt;&lt;span style=&quot;color: #6aa84f;&quot;&gt;&amp;lt;/version&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6aa84f;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;        &lt;/span&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6aa84f;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;        &lt;/span&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #6aa84f; white-space: pre;&quot;&gt;              &lt;/span&gt;&lt;span style=&quot;color: #6aa84f;&quot;&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;org.apache.hadoop&lt;/span&gt;&lt;span style=&quot;color: #6aa84f;&quot;&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #6aa84f; white-space: pre;&quot;&gt;             &lt;/span&gt;&lt;span style=&quot;color: #6aa84f;&quot;&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;hadoop-hdfs&lt;/span&gt;&lt;span style=&quot;color: #6aa84f;&quot;&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #6aa84f; white-space: pre;&quot;&gt;             &lt;/span&gt;&lt;span style=&quot;color: #6aa84f;&quot;&gt;&amp;lt;version&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;2.5.1&lt;/span&gt;&lt;span style=&quot;color: #6aa84f;&quot;&gt;&amp;lt;/version&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6aa84f;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;        &lt;/span&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6aa84f;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;        &lt;/span&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #6aa84f; white-space: pre;&quot;&gt;              &lt;/span&gt;&lt;span style=&quot;color: #6aa84f;&quot;&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;log4j&lt;/span&gt;&lt;span style=&quot;color: #6aa84f;&quot;&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #6aa84f; white-space: pre;&quot;&gt;              &lt;/span&gt;&lt;span style=&quot;color: #6aa84f;&quot;&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;log4j&lt;/span&gt;&lt;span style=&quot;color: #6aa84f;&quot;&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #6aa84f; white-space: pre;&quot;&gt;               &lt;/span&gt;&lt;span style=&quot;color: #6aa84f;&quot;&gt;&amp;lt;version&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;1.2.17&lt;/span&gt;&lt;span style=&quot;color: #6aa84f;&quot;&gt;&amp;lt;/version&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6aa84f;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;          &lt;/span&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6aa84f;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;&amp;lt;/dependencies&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6aa84f;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif; line-height: 24px;&quot;&gt;&amp;lt;/project&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div style=&quot;line-height: 24px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;
&lt;b style=&quot;color: #444444;&quot;&gt;3. Prepare Spring Configuration file&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;With Spring Data for Hadoop, the connection to HBase is managed by Spring, this include:&lt;/span&gt;&lt;/div&gt;
&lt;ul&gt;
&lt;li style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;&lt;span style=&quot;color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;Hadoop configuration for HBase and&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;&lt;span style=&quot;color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; a HbaseTemplate, the unified access to HBase&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;So we create a spring configuration file &amp;nbsp;&quot;SpringBean.xml&quot; with the content below:&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;background-color: #fff7b2; border-bottom-left-radius: 6px; border-bottom-right-radius: 6px; border-top-left-radius: 6px; border-top-right-radius: 6px; border: 1px solid rgb(187, 187, 187); padding: 5px 10px;&quot;&gt;
&lt;span style=&quot;color: #0b5394;&quot;&gt;&lt;br /&gt;
&lt;/span&gt; &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;&amp;lt;?xml&lt;/span&gt;&lt;span style=&quot;color: #741b47;&quot;&gt; version=&lt;/span&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;&quot;1.0&quot; &lt;/span&gt;&lt;span style=&quot;color: #741b47;&quot;&gt;encoding=&lt;/span&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;&quot;UTF-8&quot;&lt;/span&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #38761d; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;lt;beans&lt;/span&gt;&lt;span style=&quot;color: #0b5394; font-family: Courier New, Courier, monospace;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #741b47; font-family: Courier New, Courier, monospace;&quot;&gt;xmlns=&lt;/span&gt;&lt;span style=&quot;color: #0b5394; font-family: Courier New, Courier, monospace;&quot;&gt;&quot;http://www.springframework.org/schema/beans&quot;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0b5394; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #741b47; font-family: Courier New, Courier, monospace;&quot;&gt;xmlns:xsi&lt;/span&gt;&lt;span style=&quot;color: #0b5394; font-family: Courier New, Courier, monospace;&quot;&gt;=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0b5394; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #741b47; font-family: Courier New, Courier, monospace;&quot;&gt;xmlns:context&lt;/span&gt;&lt;span style=&quot;color: #0b5394; font-family: Courier New, Courier, monospace;&quot;&gt;=&quot;http://www.springframework.org/schema/context&quot;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0b5394; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #741b47; font-family: Courier New, Courier, monospace;&quot;&gt;xmlns:hdp&lt;/span&gt;&lt;span style=&quot;color: #0b5394; font-family: Courier New, Courier, monospace;&quot;&gt;=&quot;http://www.springframework.org/schema/hadoop&quot;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0b5394; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #741b47; font-family: Courier New, Courier, monospace;&quot;&gt;xmlns:p&lt;/span&gt;&lt;span style=&quot;color: #0b5394; font-family: Courier New, Courier, monospace;&quot;&gt;=&quot;http://www.springframework.org/schema/p&quot;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0b5394; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #741b47; font-family: Courier New, Courier, monospace;&quot;&gt;xsi:schemaLocation&lt;/span&gt;&lt;span style=&quot;color: #0b5394; font-family: Courier New, Courier, monospace;&quot;&gt;=&quot;http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsdxmlns&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0b5394; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0b5394; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; http://www.springframework.org/schema/hadoop http://www.springframework.org/schema/hadoop/spring-hadoop.xsd&quot;&lt;/span&gt;&lt;span style=&quot;color: #134f5c; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0b5394; font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt; &lt;span style=&quot;color: #0b5394; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #38761d; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;lt;context:component-scan&lt;/span&gt;&lt;span style=&quot;color: #0b5394; font-family: Courier New, Courier, monospace;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #741b47; font-family: Courier New, Courier, monospace;&quot;&gt;base-package&lt;/span&gt;&lt;span style=&quot;color: #0b5394; font-family: Courier New, Courier, monospace;&quot;&gt;=&quot;springdt&quot; &lt;/span&gt;&lt;span style=&quot;color: #38761d; font-family: Courier New, Courier, monospace;&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0b5394; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #38761d; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;lt;context:property-placeholder&lt;/span&gt;&lt;span style=&quot;color: #0b5394; font-family: Courier New, Courier, monospace;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #741b47; font-family: Courier New, Courier, monospace;&quot;&gt;location&lt;/span&gt;&lt;span style=&quot;color: #0b5394; font-family: Courier New, Courier, monospace;&quot;&gt;=&quot;hbase.properties&quot;&lt;/span&gt;&lt;span style=&quot;color: #38761d; font-family: Courier New, Courier, monospace;&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0b5394; font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt; &lt;span style=&quot;color: #0b5394; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #38761d; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;lt;hdp:configuration&lt;/span&gt;&lt;span style=&quot;color: #0b5394; font-family: Courier New, Courier, monospace;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #741b47; font-family: Courier New, Courier, monospace;&quot;&gt;id&lt;/span&gt;&lt;span style=&quot;color: #0b5394; font-family: Courier New, Courier, monospace;&quot;&gt;=&quot;hadoopConfiguration&quot;&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0b5394; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #444444; font-family: Courier New, Courier, monospace;&quot;&gt;fs.defaultFS=hdfs://127.0.0.1:9000&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0b5394; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #38761d; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;lt;/hdp:configuration&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0b5394; font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt; &lt;span style=&quot;color: #0b5394; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #38761d; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;lt;hdp:hbase-configuration&lt;/span&gt;&lt;span style=&quot;color: #0b5394; font-family: Courier New, Courier, monospace;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #741b47; font-family: Courier New, Courier, monospace;&quot;&gt;configuration-ref&lt;/span&gt;&lt;span style=&quot;color: #0b5394; font-family: Courier New, Courier, monospace;&quot;&gt;=&quot;hadoopConfiguration&quot; zk-quorum=&quot;127.0.0.1&quot; zk-port=&quot;2181&quot;&lt;/span&gt;&lt;span style=&quot;color: #38761d; font-family: Courier New, Courier, monospace;&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0b5394; font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt; &lt;span style=&quot;color: #0b5394; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #38761d; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;lt;bean&lt;/span&gt;&lt;span style=&quot;color: #0b5394; font-family: Courier New, Courier, monospace;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #741b47; font-family: Courier New, Courier, monospace;&quot;&gt;id&lt;/span&gt;&lt;span style=&quot;color: #0b5394; font-family: Courier New, Courier, monospace;&quot;&gt;=&quot;hbaseTemplate&quot; class=&quot;org.springframework.data.hadoop.hbase.HbaseTemplate&quot;&lt;/span&gt;&lt;span style=&quot;color: #741b47; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0b5394; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #38761d; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;lt;property&lt;/span&gt;&lt;span style=&quot;color: #0b5394; font-family: Courier New, Courier, monospace;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #741b47; font-family: Courier New, Courier, monospace;&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color: #0b5394; font-family: Courier New, Courier, monospace;&quot;&gt;=&quot;configuration&quot; &lt;/span&gt;&lt;span style=&quot;color: #38761d; font-family: Courier New, Courier, monospace;&quot;&gt;ref&lt;/span&gt;&lt;span style=&quot;color: #0b5394; font-family: Courier New, Courier, monospace;&quot;&gt;=&quot;hbaseConfiguration&quot;&lt;/span&gt;&lt;span style=&quot;color: #38761d; font-family: Courier New, Courier, monospace;&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0b5394; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #38761d; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;lt;/bean&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #0b5394; white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;&amp;lt;bean&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #0b5394; font-family: Courier New, Courier, monospace;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #741b47; font-family: Courier New, Courier, monospace;&quot;&gt;id&lt;/span&gt;&lt;span style=&quot;color: #0b5394; font-family: Courier New, Courier, monospace;&quot;&gt;=&quot;hBaseService&quot; &lt;/span&gt;&lt;span style=&quot;color: #741b47; font-family: Courier New, Courier, monospace;&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;color: #0b5394; font-family: Courier New, Courier, monospace;&quot;&gt;=&quot;springdt.HBaseService&quot;&lt;/span&gt;&lt;span style=&quot;color: #38761d; font-family: Courier New, Courier, monospace;&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0b5394; font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt; &lt;span style=&quot;color: #38761d; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;lt;/beans&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;The &quot;HbaseService&quot; bean is the only bean of this sample. We will show the code right away.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt; &lt;b style=&quot;background-color: white; color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;4. Write code accessing HBase&lt;/b&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt; &lt;span style=&quot;background-color: white; color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;In this sample we will create a table in HBase called &quot;report&quot;, and try store some data in the table. The table has one column family called &quot;data&quot;, and only one column named &quot;file&quot;. The value of &quot;file&quot; is file name, which could be report name in real life.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: #fff7b2; border-bottom-left-radius: 6px; border-bottom-right-radius: 6px; border-top-left-radius: 6px; border-top-right-radius: 6px; border: 1px solid rgb(187, 187, 187); padding: 5px 10px;&quot;&gt;
&lt;span style=&quot;color: #741b47;&quot;&gt;package&lt;/span&gt; springdt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #741b47;&quot;&gt;import &lt;/span&gt;javax.inject.Inject;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #741b47;&quot;&gt;import&lt;/span&gt; org.apache.hadoop.conf.Configuration;&lt;br /&gt;
&lt;span style=&quot;color: #741b47;&quot;&gt;import&lt;/span&gt; org.apache.hadoop.hbase.HColumnDescriptor;&lt;br /&gt;
&lt;span style=&quot;color: #741b47;&quot;&gt;import &lt;/span&gt;org.apache.hadoop.hbase.HTableDescriptor;&lt;br /&gt;
&lt;span style=&quot;color: #741b47;&quot;&gt;import &lt;/span&gt;org.apache.hadoop.hbase.client.HBaseAdmin;&lt;br /&gt;
&lt;span style=&quot;color: #741b47;&quot;&gt;import &lt;/span&gt;org.apache.hadoop.hbase.client.HTableInterface;&lt;br /&gt;
&lt;span style=&quot;color: #741b47;&quot;&gt;import&lt;/span&gt; org.apache.hadoop.hbase.client.Put;&lt;br /&gt;
&lt;span style=&quot;color: #741b47;&quot;&gt;import &lt;/span&gt;org.apache.hadoop.hbase.util.Bytes;&lt;br /&gt;
&lt;span style=&quot;color: #741b47;&quot;&gt;import &lt;/span&gt;org.springframework.beans.factory.annotation.Autowired;&lt;br /&gt;
&lt;span style=&quot;color: #741b47;&quot;&gt;import&lt;/span&gt; org.springframework.context.support.AbstractApplicationContext;&lt;br /&gt;
&lt;span style=&quot;color: #741b47;&quot;&gt;import&lt;/span&gt; org.springframework.context.support.ClassPathXmlApplicationContext;&lt;br /&gt;
&lt;span style=&quot;color: #741b47;&quot;&gt;import &lt;/span&gt;org.springframework.data.hadoop.hbase.HbaseTemplate;&lt;br /&gt;
&lt;span style=&quot;color: #351c75;&quot;&gt;import&lt;/span&gt; org.springframework.data.hadoop.hbase.TableCallback;&lt;br /&gt;
&lt;span style=&quot;color: #741b47;&quot;&gt;import &lt;/span&gt;org.springframework.stereotype.Service;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #0b5394;&quot;&gt;/**&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0b5394;&quot;&gt;&amp;nbsp;* Demonstrating how to access HBase using Spring Data for Hadoop.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0b5394;&quot;&gt;&amp;nbsp;*&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0b5394;&quot;&gt;&amp;nbsp;* @author swang&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0b5394;&quot;&gt;&amp;nbsp;*&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0b5394;&quot;&gt;&amp;nbsp;*/&lt;/span&gt;&lt;br /&gt;
@Service&lt;br /&gt;
&lt;span style=&quot;color: #741b47;&quot;&gt;public class&lt;/span&gt; HBaseService {&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;@Autowired&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #741b47;&quot;&gt;private&lt;/span&gt; Configuration &lt;span style=&quot;color: #0b5394;&quot;&gt;hbaseConfiguration;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;@Inject&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #741b47;&quot;&gt;private &lt;/span&gt;HbaseTemplate &lt;span style=&quot;color: #0b5394;&quot;&gt;hbTemplate;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #38761d;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;// Table info&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #741b47;&quot;&gt;final&lt;/span&gt; String tableName = &lt;span style=&quot;color: #0b5394;&quot;&gt;&quot;report&quot;;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #741b47;&quot;&gt;final&lt;/span&gt; String columnFamilyData = &lt;span style=&quot;color: #0b5394;&quot;&gt;&quot;data&quot;;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #741b47;&quot;&gt;final&lt;/span&gt; String colFile = &lt;span style=&quot;color: #0b5394;&quot;&gt;&quot;file&quot;;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #741b47;&quot;&gt;final S&lt;/span&gt;tring rowNamePattern = &lt;span style=&quot;color: #0b5394;&quot;&gt;&quot;row&quot;;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #741b47;&quot;&gt;final &lt;/span&gt;String value = &lt;span style=&quot;color: #0b5394;&quot;&gt;&quot;report24.csv-&quot;;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;/**&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; *&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; * @throws Exception&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; */&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #741b47;&quot;&gt;public void &lt;/span&gt;run() &lt;span style=&quot;color: #741b47;&quot;&gt;throws&lt;/span&gt; Exception {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;span style=&quot;color: #38761d;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;// 1. create table&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;createTable();&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;span style=&quot;color: #38761d;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;// 2. add data entry&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;addData();&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;br /&gt;
&lt;span style=&quot;color: #0b5394;&quot;&gt;&lt;br /&gt;
&lt;/span&gt; &lt;span style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;/**&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; * Creates HBase table&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; *&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; * @throws Exception&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; */&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #741b47;&quot;&gt;public void &lt;/span&gt;createTable() &lt;span style=&quot;color: #741b47;&quot;&gt;throws &lt;/span&gt;Exception {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;HBaseAdmin admin = &lt;span style=&quot;color: #741b47;&quot;&gt;new&lt;/span&gt; HBaseAdmin(&lt;span style=&quot;color: #0b5394;&quot;&gt;hbaseConfiguration&lt;/span&gt;);&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;color: #741b47;&quot;&gt;if&lt;/span&gt; (admin.tableExists(&lt;span style=&quot;color: #0b5394;&quot;&gt;tableName)&lt;/span&gt;) {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;admin.disableTable(t&lt;span style=&quot;color: #0b5394;&quot;&gt;ableName)&lt;/span&gt;;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;admin.deleteTable(&lt;span style=&quot;color: #0b5394;&quot;&gt;tableName&lt;/span&gt;);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;}&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;HTableDescriptor tableDes = &lt;span style=&quot;color: #741b47;&quot;&gt;new&lt;/span&gt; HTableDescriptor(&lt;span style=&quot;color: #0b5394;&quot;&gt;tableName)&lt;/span&gt;;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;HColumnDescriptor cf1 = &lt;span style=&quot;color: #741b47;&quot;&gt;new &lt;/span&gt;HColumnDescriptor(&lt;span style=&quot;color: #0b5394;&quot;&gt;columnFamilyData)&lt;/span&gt;;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;tableDes.addFamily(&lt;span style=&quot;color: #0b5394;&quot;&gt;cf1)&lt;/span&gt;;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;admin.createTable(&lt;span style=&quot;color: #351c75;&quot;&gt;t&lt;/span&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;ableDes&lt;/span&gt;);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;/**&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; * Adds data entry for report.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; */&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #741b47;&quot;&gt;private void&lt;/span&gt; addData() {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;hbTemplate.execute(&lt;span style=&quot;color: #0b5394;&quot;&gt;tableName&lt;/span&gt;, &lt;span style=&quot;color: #741b47;&quot;&gt;new&lt;/span&gt; TableCallback&amp;lt;&lt;span style=&quot;color: #741b47;&quot;&gt;Boolean&lt;/span&gt;&amp;gt;() {&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;&lt;span style=&quot;color: #741b47;&quot;&gt;public &lt;/span&gt;Boolean doInTable(HTableInterface &lt;span style=&quot;color: #0b5394;&quot;&gt;table)&lt;/span&gt; &lt;span style=&quot;color: #741b47;&quot;&gt;throws&lt;/span&gt; Throwable {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: #741b47;&quot;&gt;for&lt;/span&gt; (&lt;span style=&quot;color: #741b47;&quot;&gt;int&lt;/span&gt; i = 0; i &amp;lt; 1000; i++) {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;Put p = &lt;span style=&quot;color: #741b47;&quot;&gt;new &lt;/span&gt;Put(Bytes.toBytes(r&lt;span style=&quot;color: #0b5394;&quot;&gt;owNamePattern&lt;/span&gt; + i));&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;p.add(Bytes.toBytes(&lt;span style=&quot;color: #0b5394;&quot;&gt;columnFamilyData)&lt;/span&gt;,&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;       &lt;/span&gt;Bytes.toBytes(&lt;span style=&quot;color: #0b5394;&quot;&gt;colFile&lt;/span&gt;), Bytes.toBytes(&lt;span style=&quot;color: #0b5394;&quot;&gt;value&lt;/span&gt; + i));&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;table.&lt;/span&gt;put(&lt;span style=&quot;color: #0b5394;&quot;&gt;p&lt;/span&gt;);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;}&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: #741b47;&quot;&gt;return new &lt;/span&gt;Boolean(true);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;}&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;});&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #741b47;&quot;&gt;public static void&lt;/span&gt; main(String[] args) &lt;span style=&quot;color: #741b47;&quot;&gt;throws&lt;/span&gt; Exception {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;AbstractApplicationContext ctx = &lt;span style=&quot;color: #741b47;&quot;&gt;new&lt;/span&gt; ClassPathXmlApplicationContext(&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;&quot;&lt;span style=&quot;color: #0b5394;&quot;&gt;SpringBeans.xml&quot;&lt;/span&gt;);&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;HBaseService &lt;span style=&quot;color: #3d85c6;&quot;&gt;hBaseService&lt;/span&gt; = (HBaseService) ctx.getBean(&quot;&lt;span style=&quot;color: #0b5394;&quot;&gt;hBaseService&quot;&lt;/span&gt;);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;hBaseService.run();&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;br /&gt;
}&lt;/div&gt;
&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;The &quot;SpringBeans.xml&quot; we created in step 3 should be put in &quot;src/main/resources&quot;, so that it could be found at runtime.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;b style=&quot;background-color: white; color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;5. Run the sample&lt;/b&gt;&lt;br /&gt;
&lt;b style=&quot;background-color: white; color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;&lt;br /&gt;
&lt;/b&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;We assume you have HBase over Hadoop installed. Make sure the HBase version is compatible with Hadoop. In my case I have &quot;&lt;/span&gt;&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;hbase-1.0.1.1&quot; and &quot;hadoop-2.7.0&quot;.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;Now start HBase server.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;Run &quot;HBaseService&quot; in Eclipse as java application. In Eclipse console &amp;nbsp;you will see output like this:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt; &lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;background-color: #fff7b2; border-bottom-left-radius: 6px; border-bottom-right-radius: 6px; border-top-left-radius: 6px; border-top-right-radius: 6px; border: 1px solid rgb(187, 187, 187); padding: 5px 10px;&quot;&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;i&gt;&lt;br /&gt;
&lt;/i&gt;&lt;/span&gt;&lt;/span&gt; &lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;i&gt;2015-07-25 15:10:52 INFO &amp;nbsp;ClientCnxn:852 - Socket connection established to 127.0.0.1/127.0.0.1:2181, initiating session&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;i&gt;2015-07-25 15:10:52 INFO &amp;nbsp;ClientCnxn:1235 - Session establishment complete on server 127.0.0.1/127.0.0.1:2181, sessionid = 0x14ec4b8cf30000e, negotiated timeout = 90000&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;i&gt;2015-07-25 15:10:53 INFO &amp;nbsp;HBaseAdmin:978 - Started disable of report&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;i&gt;2015-07-25 15:10:55 INFO &amp;nbsp;HBaseAdmin:1033 - Disabled report&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;i&gt;2015-07-25 15:10:55 INFO &amp;nbsp;HBaseAdmin:738 - Deleted report&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;i&gt;&lt;br /&gt;
&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&quot;HBaseService&quot; should have created 1000 ehtries in HBase table &quot;report&quot;. Check this with hbase shell:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;background-color: #fff7b2; border-bottom-left-radius: 6px; border-bottom-right-radius: 6px; border-top-left-radius: 6px; border-top-right-radius: 6px; border: 1px solid rgb(187, 187, 187); padding: 5px 10px;&quot;&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;i&gt;&lt;br /&gt;
&lt;/i&gt;&lt;/span&gt;&lt;/span&gt; &lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;i&gt;hbase(main):003:0&amp;gt; scan &quot;report&quot;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;i style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;ROW &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;COLUMN+CELL&lt;/i&gt;&lt;br /&gt;
&lt;i style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;row0 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;column=data:file, timestamp=1437823593865, value=report24.csv-0&lt;/i&gt;&lt;br /&gt;
&lt;i style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;row1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;column=data:file, timestamp=1437823593897, value=report24.csv-1&lt;/i&gt;&lt;br /&gt;
&lt;i style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;...&lt;/i&gt;&lt;br /&gt;
&lt;i style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;row999 &amp;nbsp; &amp;nbsp; column=data:file, timestamp=1437823603565, value=report24.csv-999&amp;nbsp;&lt;/i&gt;&lt;br /&gt;
&lt;i style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;1000 row(s) in 2.0600 seconds&lt;/i&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; font-weight: bold; line-height: 24px;&quot;&gt;Now we are done with the simple example. Have fun!&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; font-weight: bold; line-height: 24px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; font-weight: bold; line-height: 24px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://milestonenext.blogspot.com/feeds/2010012056636569212/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://milestonenext.blogspot.com/2015/07/hbase-spring-data-sample.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7515187228721563448/posts/default/2010012056636569212'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7515187228721563448/posts/default/2010012056636569212'/><link rel='alternate' type='text/html' href='http://milestonenext.blogspot.com/2015/07/hbase-spring-data-sample.html' title='HBase Spring Data Sample'/><author><name>Beijing Beijing</name><uri>http://www.blogger.com/profile/12013373726184997758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='28' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTm1nk7ZqbPTfBofk6dIg7Zfx820i-FNuXqGbSlZNbRw5-RPJuqgDFNoW_zdgJCMCYj6R5cTGNgNKmwTzeDsEm2EHkqni9ywIanrN-PIRd4Z4yZXUOHhC12zzDid1A1w/s220/profile.png'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi84X1vhjl46s_khx2Yw1GHpMLW3Ccd_B9UT2gPFvAjsp0Mg-qHaQWI2nOVqWrf26gtFhDUTM7helqTd50LCUDZFD6ShoIpSHgaCcnRbedqBYIlgHWoafb8l59Vx84PkyqATIW52EOB45qY/s72-c/hbase1.png" height="72" width="72"/><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7515187228721563448.post-1669838565894017245</id><published>2013-09-13T00:14:00.000-07:00</published><updated>2013-09-13T01:14:35.010-07:00</updated><title type='text'>ActiveMQ Configuration for persistent Message Delivery</title><content type='html'>&lt;br /&gt;
&lt;h4 style=&quot;background-color: white; color: #222222; font-family: Lato, arial, sans-serif; font-size: 13px; line-height: 24px; margin: 0px; position: relative;&quot;&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;Document &amp;nbsp;Version 1.0&lt;/span&gt;&lt;/h4&gt;
&lt;h4 style=&quot;background-color: white; color: #222222; font-family: Lato, arial, sans-serif; font-size: 13px; line-height: 24px; margin: 0px; position: relative;&quot;&gt;
&lt;span style=&quot;background-color: white; color: #666666; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;b&gt;Copyright © 2012-2013 beijing.beijing.012@gmail.com&lt;/b&gt;&lt;/span&gt;&lt;/h4&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: white; color: #666666; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; line-height: 18px;&quot;&gt;Wether message is delivered persistent or not, depends on both message producer. i.e. the client, and configuration of server, in our case ActiveMQ.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;h2&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; line-height: 18px;&quot;&gt;1. On the Client Side&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font-weight: normal; line-height: 18px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/h2&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font-weight: normal; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; line-height: 18px;&quot;&gt;Message Producer can tell ActiveMQ to deliver message in persistent mode in 2 ways:&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;- with MessageProducer#setDeliveryMode(..), this set the&lt;b&gt; default delivery mode&lt;/b&gt; for all messges sent with this producer.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;- MessageProducer# send(..), this set delivery mode on message level, i.e. &amp;nbsp;set delivery mode for each message.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;h2&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; line-height: 18px;&quot;&gt;2. On the Server Side&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font-weight: normal; line-height: 18px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/h2&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;If persistence delivery is not enabled on ActiveMQ, messages will not be delivered in persistence mode even if message producer &amp;nbsp;set&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;nbsp;delivery mode as &quot;&lt;/span&gt;&lt;/span&gt;PERSISTENT&quot;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&lt;b&gt;2.1 Set persistent mode&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;With ActiveMQ, persistent node is set on broker tag of activemq.xml&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;The default:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;lt;broker xmlns=&quot;http://activemq.apache.org/schema/core&quot; brokerName=&quot;localhost&quot; dataDirectory=&quot;${activemq.data}&quot;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;When no persistent properties is set &amp;nbsp;for broker, the default is&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; line-height: 18px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; line-height: 18px;&quot;&gt;persistent=&quot;true&quot;. i.e.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;line-height: 18px;&quot;&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&amp;lt;broker xmlns=&quot;http://activemq.apache.org/schema/core&quot; brokerName=&quot;localhost&quot; dataDirectory=&quot;${activemq.data}&quot; persistent=&quot;true&quot; &amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;
&lt;/span&gt;
&lt;br /&gt;
&lt;div style=&quot;line-height: 18px;&quot;&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;b&gt;2.2 Configure persistence Adapter&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;
&lt;/span&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;When broker is configured to run in persistence mode, it requires a &quot;persistenceAdapter&quot;, for example:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;
&lt;/span&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;div style=&quot;line-height: 18px;&quot;&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 18px;&quot;&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;persistenceAdapter&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 18px;&quot;&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;kahaDB directory=&quot;${activemq.base}/data/kahadb&quot;/&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 18px;&quot;&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/persistenceAdapter&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 18px;&quot;&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 18px;&quot;&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;&quot;&gt;The above is also the default configuration, if no persistence apdapter is configured in activemq.xml&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 18px;&quot;&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 18px;&quot;&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;b&gt;2.3 Pesistence Store Usage&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 18px;&quot;&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div style=&quot;line-height: normal;&quot;&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;Having configured persistence adapter as &quot;khdb&quot;, as next step we need to tell how much disk size is available for &quot;khdb&quot; to store messages:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: normal;&quot;&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;lt;systemUsage&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;systemUsage&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;memoryUsage&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;memoryUsage limit=&quot;64 mb&quot;/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/memoryUsage&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;b&gt; &amp;lt;storeUsage&amp;gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;storeUsage limit=&quot;100 gb&quot;/&amp;gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/storeUsage&amp;gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;tempUsage&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;tempUsage limit=&quot;50 gb&quot;/&amp;gt; &amp;lt;!-- default was 50 gb --&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/tempUsage&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/systemUsage&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/systemUsage&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;When no &quot;systemUsage&quot; section is configured, the ActiveMQ use default 100gb for &quot;khdb&quot; storeUsage.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;When there is no enough space available on the disk, ActiveMQ will show ERROR/WARN message at startup like:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;2013-09-13 09:05:15,136 | WARN &amp;nbsp;| Store limit is 102400 mb, whilst the data directory: /activemq/data/localhost/KahaDB only has 20603 mb of usable space | org.apache.activemq.broker.BrokerService | main&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;ActiveMQ can be started and live with such error/warnings, But if you are running a production system, be sure to check if you really need more disk.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: normal;&quot;&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 18px;&quot;&gt;
&lt;h2&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;2.4 Running in &quot;NON_PERSISTENT&quot; mode&lt;/span&gt;&lt;/h2&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;
&lt;/span&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;When broker is configured with &quot;persistent=false&quot;, then ActiveMQ persists no messges at all in DB even if client set delivery mode as &quot;persistent&quot;.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px;&quot;&gt;Running in &quot;persistent=false&quot; mode, ActiveMQ use default&amp;nbsp;MemoryPersistenceAdapter.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;All messages resides in ActiveMQ&#39; system memory. When the limit of the system usage is reached, message will be stored in &quot;tempStore&quot; on file system.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;lt;systemUsage&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;systemUsage&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;b&gt;&amp;nbsp; &amp;lt;memoryUsage&amp;gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;memoryUsage limit=&quot;10 gb&quot;/&amp;gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/memoryUsage&amp;gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;b&gt;&amp;nbsp;&lt;/b&gt;&amp;lt;storeUsage&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;storeUsage limit=&quot;100 gb&quot;/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/storeUsage&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;b&gt;&amp;lt;tempUsage&amp;gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;tempUsage limit=&quot;50 gb&quot;/&amp;gt; &amp;lt;!-- default was 50 gb --&amp;gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/tempUsage&amp;gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/systemUsage&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/systemUsage&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;Here the &quot;memoryUsage&quot; of system memory, is RAM, and is not the whole memory used by ActiveMQ, but only the memory used for storing messages. When the total available RAM on the machine is less than what is configured above, ActiveMQ can still start and works, but logs error info like:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px;&quot;&gt;2013-09-13 09:49:19,078 | ERROR | Memory Usage for the Broker (10240 mb) is more than the maximum available for the JVM: 981 mb | org.apache.activemq.broker.BrokerService | main&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px;&quot;&gt;My test machine has only 8gb RAM, but here above configuration requires 10gb for ActiveMQ&#39;s in memory store.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px;&quot;&gt;Beside the above error, at sartup, my ActiveMQ show also following error info:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;nbsp;&amp;nbsp;2013-09-13 09:49:19,078 | ERROR | Temporary Store limit is 51200 mb, whilst the temporary data directory: /activemq/data/localhost/tmp_storage only has 20570 mb of usable space |&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px;&quot;&gt;This is because, ActiveMQ is configured to use 50GB temp space on disk, howeve my machine has only about 20gb free.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px;&quot;&gt;The configuration for &quot;storeUsage&quot; here is not used by ActiveMQ, sicnce in non-persistent mode, no data is writen is written to DB.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://milestonenext.blogspot.com/feeds/1669838565894017245/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://milestonenext.blogspot.com/2013/09/activemq-configuration-for-persistent.html#comment-form' title='8 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7515187228721563448/posts/default/1669838565894017245'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7515187228721563448/posts/default/1669838565894017245'/><link rel='alternate' type='text/html' href='http://milestonenext.blogspot.com/2013/09/activemq-configuration-for-persistent.html' title='ActiveMQ Configuration for persistent Message Delivery'/><author><name>Beijing Beijing</name><uri>http://www.blogger.com/profile/12013373726184997758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='28' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTm1nk7ZqbPTfBofk6dIg7Zfx820i-FNuXqGbSlZNbRw5-RPJuqgDFNoW_zdgJCMCYj6R5cTGNgNKmwTzeDsEm2EHkqni9ywIanrN-PIRd4Z4yZXUOHhC12zzDid1A1w/s220/profile.png'/></author><thr:total>8</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7515187228721563448.post-3232761636885622128</id><published>2013-07-15T00:16:00.003-07:00</published><updated>2013-07-15T01:25:53.011-07:00</updated><title type='text'>HTML5 WebSocket Sample with Java Servlet on Server Side  </title><content type='html'>&lt;br /&gt;
&lt;h4 style=&quot;background-color: white; color: #222222; font-family: Lato, arial, sans-serif; line-height: 24px; margin: 0px; position: relative;&quot;&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;Document &amp;nbsp;Version 1.0&lt;/span&gt;&lt;/h4&gt;
&lt;h4 style=&quot;background-color: white; color: #222222; font-family: Lato, arial, sans-serif; line-height: 24px; margin: 0px; position: relative;&quot;&gt;
&lt;span style=&quot;background-color: white; color: #666666; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;b&gt;Copyright © 2012-2013 beijing.beijing.012@gmail.com&lt;/b&gt;&lt;/span&gt;&lt;/h4&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: white; color: #666666; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; line-height: 18px;&quot;&gt;Beside Server-Sent Events, WebSocket is an another important feature introduced by HTML5 for browser to update web page content automatically from server. &amp;nbsp;The most important differences between WebSocket and Server-Sent Events are: &amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; line-height: 18px;&quot;&gt;Server-Sent Events is one way communication whereas WebSocket use full-duplex channel.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; line-height: 18px;&quot;&gt;Server-Sent Event is HTTP, &amp;nbsp;WebSocket introduced new protocol &quot;ws&quot; protocol&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; line-height: 18px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; line-height: 18px;&quot;&gt;Here I am &amp;nbsp;not going compare WebSocket and Server-Sent Events in detail, I will just show &amp;nbsp;you a simple WebSecket sample to get a feeling.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; line-height: 18px;&quot;&gt;A sample of Server-Sent Events could be found here&amp;nbsp;&lt;a href=&quot;http://milestonenext.blogspot.de/2013/07/html5-server-sent-events-sample-with.html&quot;&gt;http://milestonenext.blogspot.de/2013/07/html5-server-sent-events-sample-with.html&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; line-height: 18px;&quot;&gt;In the example below, browser opens a window, send text message to server. Server just send message back to browser, shown in the window. (by the way, the sample could be extended with small effort to work as a chat application ...)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt; &lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;The client is just a html page with embedded javascript. The Server is a Java Servlet web application running on Tomcat 7.0.29. (WebSocket, &quot;ws&quot; protocol support with Tomcat since version 7.0.24 ).&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt; &lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt; &lt;br /&gt;
&lt;h3&gt;
&lt;span style=&quot;background-color: white; color: #351c75; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;&quot;&gt;1. Create a simple web application &quot;WebSocketSample&quot;&lt;/span&gt;&lt;/h3&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: white; color: #351c75; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; line-height: 18px;&quot;&gt;User your favorite IDE (I use Eclipse) to create a Web Application. Be sure to use servlet 3.x style.&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; line-height: 18px;&quot;&gt;The sample web application consists of :&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; line-height: 18px;&quot;&gt;two java classes, which are the server side code&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; line-height: 18px;&quot;&gt;one &quot;html&quot; page which is the client&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small; line-height: 18px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small; line-height: 18px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;h3&gt;
&lt;span style=&quot;background-color: white; color: #351c75; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;&quot;&gt;2. &amp;nbsp;MyWebSocketServlet.java&lt;/span&gt;&lt;/h3&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: white; color: #351c75; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; line-height: 18px;&quot;&gt;The sample uses Tomcat implementation of of &quot;WebSocket&quot;, so we need to have &quot;catalina.jar&quot; on class path.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;Add servlet-api.jar to class path as well.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: #fffff8; border-radius: 6px 6px 6px 6px; border: 1px solid #BBBBBB; padding: 5px 10px 5px;&quot;&gt;
&lt;br /&gt;
package sample;&lt;br /&gt;
&lt;br /&gt;
import java.util.concurrent.ConcurrentHashMap;&lt;br /&gt;
&lt;br /&gt;
import javax.servlet.annotation.WebServlet;&lt;br /&gt;
import javax.servlet.http.HttpServletRequest;&lt;br /&gt;
import javax.servlet.http.HttpSession;&lt;br /&gt;
&lt;br /&gt;
import org.apache.catalina.websocket.StreamInbound;&lt;br /&gt;
import org.apache.catalina.websocket.WebSocketServlet;&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
&amp;nbsp;* WebSocketServlet is contained in catalina.jar. It also needs servlet-api.jar&lt;br /&gt;
&amp;nbsp;* on build path&lt;br /&gt;
&amp;nbsp;*&lt;br /&gt;
&amp;nbsp;* @author wangs&lt;br /&gt;
&amp;nbsp;*&lt;br /&gt;
&amp;nbsp;*/&lt;br /&gt;
@WebServlet(&quot;/wsocket&quot;)&lt;br /&gt;
public class MyWebSocketServlet extends WebSocketServlet {&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;private static final long serialVersionUID = 1L;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;// for new clients, &amp;lt;sessionId, streamInBound&amp;gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;private static ConcurrentHashMap&amp;lt;String, StreamInbound&amp;gt; clients = new ConcurrentHashMap&amp;lt;String, StreamInbound&amp;gt;();&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;@Override&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;protected StreamInbound createWebSocketInbound(String protocol,&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;HttpServletRequest httpServletRequest) {&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;// Check if exists&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;HttpSession session = httpServletRequest.getSession();&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;// find client&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;StreamInbound client = clients.get(session.getId());&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;if (null != client) {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;return client;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;} else {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;client = new MyInBound(httpServletRequest);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;clients.put(session.getId(), client);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;}&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;return client;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;public StreamInbound getClient(String sessionId) {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;return clients.get(sessionId);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;public void addClient(String sessionId, StreamInbound streamInBound) {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;clients.put(sessionId, streamInBound);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;br /&gt;
}&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;
&lt;br /&gt;&lt;span style=&quot;background-color: white; color: #351c75; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;&quot;&gt;3. &amp;nbsp;MyInbund.java&lt;/span&gt;&lt;/h3&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: white; color: #351c75; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: #fffff8;&quot;&gt;Since Tomcat&#39;s&lt;/span&gt;&lt;span style=&quot;background-color: #fffff8;&quot;&gt;&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;WsOutbound has indirect dependency on &quot;tomcat-koyote.jar&quot;, please add this jar to class path to resolve compile error like &quot;&lt;/span&gt;&lt;span style=&quot;background-color: #fffff8;&quot;&gt;the hierarchy of the type ... is inconsistent ...&lt;/span&gt;&lt;span style=&quot;background-color: #fffff8;&quot;&gt;&quot;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: #fffff8; border-radius: 6px 6px 6px 6px; border: 1px solid #BBBBBB; padding: 5px 10px 5px;&quot;&gt;
&lt;br /&gt;
package sample;&lt;br /&gt;
&lt;br /&gt;
import java.io.IOException;&lt;br /&gt;
import java.nio.ByteBuffer;&lt;br /&gt;
import java.nio.CharBuffer;&lt;br /&gt;
&lt;br /&gt;
import javax.servlet.http.HttpServletRequest;&lt;br /&gt;
&lt;br /&gt;
import org.apache.catalina.websocket.MessageInbound;&lt;br /&gt;
import org.apache.catalina.websocket.WsOutbound;&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
&amp;nbsp;* Need tomcat-koyote.jar on class path, otherwise has compile error &quot;the hierarchy of the type ... is inconsistent&quot;&lt;br /&gt;
&amp;nbsp;* @author wangs&lt;br /&gt;
&amp;nbsp;*&lt;br /&gt;
&amp;nbsp;*/&lt;br /&gt;
public class MyInBound extends MessageInbound{&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;private String name;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;private WsOutbound myoutbound;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;public MyInBound(HttpServletRequest httpSerbletRequest) {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;@Override&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;public void onOpen(WsOutbound outbound) {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;System.out.println(&quot;on open..&quot;);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;this.myoutbound = outbound;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;try {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;this.myoutbound.writeTextMessage(CharBuffer.wrap(&quot;hi, what&#39;s your name?&quot;));&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;} catch (Exception e) {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;throw new RuntimeException(e);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;}&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;@Override&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;public void onClose(int status) {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;System.out.println(&quot;Close client&quot;);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;//remove from list&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;@Override&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;protected void onBinaryMessage(ByteBuffer arg0) throws IOException {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;@Override&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;protected void onTextMessage(CharBuffer inChar) throws IOException {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;System.out.println(&quot;Accept msg&quot;);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;CharBuffer outbuf = CharBuffer.wrap(&quot;- &quot; + this.name + &quot; says : &quot;);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;CharBuffer buf = CharBuffer.wrap(inChar);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;if(name != null) {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;this.myoutbound.writeTextMessage(outbuf);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;this.myoutbound.writeTextMessage(buf);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;} else {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;this.name = inChar.toString();&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;CharBuffer welcome = CharBuffer.wrap(&quot;== Welcome &quot; + this.name + &quot;!&quot;);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;this.myoutbound.writeTextMessage(welcome);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;}&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;this.myoutbound.flush();&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;
&lt;br /&gt;&lt;span style=&quot;background-color: white; color: #351c75; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;&quot;&gt;4. &amp;nbsp;wssockrt.html&lt;/span&gt;&lt;/h3&gt;
&lt;div&gt;
&lt;span style=&quot;color: #351c75; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: #fffff8; border-radius: 6px 6px 6px 6px; border: 1px solid #BBBBBB; padding: 5px 10px 5px;&quot;&gt;
&lt;br /&gt;
&amp;lt;!DOCTYPE html&amp;gt;&lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;lt;head&amp;gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&amp;lt;meta charset=&quot;utf-8&quot;&amp;gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&amp;lt;title&amp;gt;Tomcat web socket&amp;lt;/title&amp;gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;var ws = new WebSocket(&quot;ws://localhost:8080/WebSocketSample/wsocket&quot;);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;ws.onopen = function () {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;};&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt; &amp;nbsp; &amp;nbsp;ws.onmessage = function(message) {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;document.getElementById(&quot;msgArea&quot;).textContent += message.data + &quot;\n&quot;; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt; &amp;nbsp; &amp;nbsp;};&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt; &amp;nbsp; &amp;nbsp;function postToServer() {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;ws.send(document.getElementById(&quot;msg&quot;).value);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;document.getElementById(&quot;msg&quot;).value = &quot;&quot;;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;}&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;function closeConnect() {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;ws.close();&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;}&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&amp;lt;/script&amp;gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;lt;/head&amp;gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;lt;body&amp;gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;lt;div&amp;gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&amp;lt;textarea rows=&quot;4&quot; cols=&quot;100&quot; id=&quot;msgArea&quot; readonly&amp;gt;&amp;lt;/textarea&amp;gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&amp;lt;div&amp;gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&amp;lt;input id=&quot;msg&quot; type=&quot;text&quot;/&amp;gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&amp;lt;button type=&quot;submit&quot; id=&quot;sendButton&quot; onclick=&quot;postToServer()&quot;&amp;gt;Send&amp;lt;/button&amp;gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;lt;/body&amp;gt;&lt;br /&gt;
&amp;lt;/html&amp;gt;&lt;/div&gt;
&lt;br /&gt;
&lt;h3&gt;
&lt;br /&gt;&lt;span style=&quot;background-color: white; color: #351c75; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;&quot;&gt;5. &amp;nbsp;Export &quot;.war&quot; and deploy it on a running Tomcat&amp;nbsp;&lt;/span&gt;&lt;/h3&gt;
&lt;br /&gt;
&lt;br /&gt;
Export the &quot;WebSocketSample.war&quot;and deploy it on a running Tomcat server.&lt;br /&gt;
&lt;br /&gt;
Open the link below with browser:&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://localhost:8080/WebSocketSample/wsocket.html&quot;&gt;http://localhost:8080/WebSocketSample/wsocket.html&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
You will see:&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZabUIWbmWZC7C6ouyH-JExQ4Gk24VQtRGwerV2n508Y7_Zcqo-15M-Cg8yOjE_WpwZkvIKuOUOvSJFcIT_S1oCICvhfsTMyr-_T9mR0Bwh3X4xvV444dVOQDSN8gdpuM5ZnVa9b35nDt9/s1600/ws_2.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZabUIWbmWZC7C6ouyH-JExQ4Gk24VQtRGwerV2n508Y7_Zcqo-15M-Cg8yOjE_WpwZkvIKuOUOvSJFcIT_S1oCICvhfsTMyr-_T9mR0Bwh3X4xvV444dVOQDSN8gdpuM5ZnVa9b35nDt9/s1600/ws_2.jpg&quot; height=&quot;106&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now type your name and send:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhtGiEMT_PIKaHHlvLdZhczz_eWOQ-QmX-NAiOtRSuhrWbLp3H5gf9LfsDm9_9VDJSEK-OZStp6O2gch2VNLY6qxi8OR4EmSftgp6ExLenXqTE5WFt51obK3oUfFg6G9gM1DosFNO5OCdxb/s1600/ws_3.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhtGiEMT_PIKaHHlvLdZhczz_eWOQ-QmX-NAiOtRSuhrWbLp3H5gf9LfsDm9_9VDJSEK-OZStp6O2gch2VNLY6qxi8OR4EmSftgp6ExLenXqTE5WFt51obK3oUfFg6G9gM1DosFNO5OCdxb/s1600/ws_3.jpg&quot; height=&quot;123&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
So it woks!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;
&lt;span style=&quot;background-color: white; color: #351c75; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;&quot;&gt;6. &amp;nbsp;The &quot;WebSocket&quot; Header &amp;nbsp;&lt;/span&gt;&lt;/h3&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;When we take a close look at the headers of the Request and Response above:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgzgXMu74WHJUcOZY833SV6tsqT66oo3Xyh1AjHjwqhyphenhyphenMaWcmMLdD8VDOrXVeRmIYgdOz6_AOEl90I7KJ0UItINXkLHIoRyLy-SyQX1LXIu5Y48ohRJ48xggMAAXkCizIlJzXc2OH2JCV1S/s1600/websocket_Header.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgzgXMu74WHJUcOZY833SV6tsqT66oo3Xyh1AjHjwqhyphenhyphenMaWcmMLdD8VDOrXVeRmIYgdOz6_AOEl90I7KJ0UItINXkLHIoRyLy-SyQX1LXIu5Y48ohRJ48xggMAAXkCizIlJzXc2OH2JCV1S/s1600/websocket_Header.jpg&quot; height=&quot;207&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
We will see, browser is not speaking &quot;http&quot; with server any more, &amp;nbsp;now it speaks &quot;websocket&quot; protocol.</content><link rel='replies' type='application/atom+xml' href='http://milestonenext.blogspot.com/feeds/3232761636885622128/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://milestonenext.blogspot.com/2013/07/html5-websocket-sample-with-java.html#comment-form' title='11 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7515187228721563448/posts/default/3232761636885622128'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7515187228721563448/posts/default/3232761636885622128'/><link rel='alternate' type='text/html' href='http://milestonenext.blogspot.com/2013/07/html5-websocket-sample-with-java.html' title='HTML5 WebSocket Sample with Java Servlet on Server Side  '/><author><name>Beijing Beijing</name><uri>http://www.blogger.com/profile/12013373726184997758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='28' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTm1nk7ZqbPTfBofk6dIg7Zfx820i-FNuXqGbSlZNbRw5-RPJuqgDFNoW_zdgJCMCYj6R5cTGNgNKmwTzeDsEm2EHkqni9ywIanrN-PIRd4Z4yZXUOHhC12zzDid1A1w/s220/profile.png'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZabUIWbmWZC7C6ouyH-JExQ4Gk24VQtRGwerV2n508Y7_Zcqo-15M-Cg8yOjE_WpwZkvIKuOUOvSJFcIT_S1oCICvhfsTMyr-_T9mR0Bwh3X4xvV444dVOQDSN8gdpuM5ZnVa9b35nDt9/s72-c/ws_2.jpg" height="72" width="72"/><thr:total>11</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7515187228721563448.post-8636766970844589232</id><published>2013-07-09T13:06:00.001-07:00</published><updated>2013-07-15T00:39:14.730-07:00</updated><title type='text'>HTML5 Server-Sent Events Sample with Java Servlet as Event Server </title><content type='html'>&lt;div style=&quot;background-color: white; color: #222222; font-family: Lato, arial, sans-serif; font-size: 14px; line-height: 24px;&quot;&gt;
&lt;div style=&quot;margin-left: 10px; margin-right: 10px;&quot;&gt;
&lt;h4&gt;
&lt;span style=&quot;color: #666666; font-size: xx-small;&quot;&gt;&lt;b&gt;Document &amp;nbsp;Version 1.0&lt;/b&gt;&lt;/span&gt;&lt;/h4&gt;
&lt;h4&gt;
&lt;span style=&quot;background-color: white; color: #666666; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: xx-small; line-height: 24px;&quot;&gt;&lt;b&gt;Copyright © 2012-2013 beijing.beijing.012@gmail.com&lt;/b&gt;&lt;/span&gt;&lt;/h4&gt;
&lt;/div&gt;
&lt;div class=&quot;releaseinfo&quot; style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; margin-left: 10px; margin-right: 10px;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;span style=&quot;background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt; &lt;span style=&quot;background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt; &lt;span style=&quot;background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;Server-Sent Events is a HTML5 feature which support browse to update page content automatically.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt; &lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;I will show a&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;Server-Sent Events sample which get update of serve time automatically. Server side implementation is a Java Servlet running on Tomcat.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt; &lt;br /&gt;
&lt;h4&gt;
&lt;span style=&quot;background-color: white; color: #351c75; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;1. Create a simple web application:&lt;/span&gt;&lt;/h4&gt;
&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt; &lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjMUhnil_AejMkawreEoFa4kc5wBCJd8Wc-xEe8edE_VBci206gU5s9U0QBUn1BM1chho2VTQinxXTWMghINV-wz4DJY3aW6eQhtSbu8Mm2TEI4UvqKbj8dsY-DFK6s_FS_6DWGxYpZGiF/s1600/sse_1.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjMUhnil_AejMkawreEoFa4kc5wBCJd8Wc-xEe8edE_VBci206gU5s9U0QBUn1BM1chho2VTQinxXTWMghINV-wz4DJY3aW6eQhtSbu8Mm2TEI4UvqKbj8dsY-DFK6s_FS_6DWGxYpZGiF/s1600/sse_1.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h4&gt;
&lt;span style=&quot;font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #351c75; line-height: 18px;&quot;&gt;2. Create a 3.X style Java Servlet &quot;SseServer.java&quot;&lt;/span&gt;&lt;/span&gt;&lt;/h4&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt; &lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;background-color: #fffff8; border-radius: 6px 6px 6px 6px; border: 1px solid #BBBBBB; padding: 5px 10px 5px;&quot;&gt;
package sse;&lt;br /&gt;
&lt;br /&gt;
import java.io.IOException;&lt;br /&gt;
import java.io.PrintWriter;&lt;br /&gt;
import java.util.Date;&lt;br /&gt;
&lt;br /&gt;
import javax.servlet.ServletException;&lt;br /&gt;
import javax.servlet.annotation.WebServlet;&lt;br /&gt;
import javax.servlet.http.HttpServlet;&lt;br /&gt;
import javax.servlet.http.HttpServletRequest;&lt;br /&gt;
import javax.servlet.http.HttpServletResponse;&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
&amp;nbsp;*&lt;br /&gt;
&amp;nbsp;* @author swang&lt;br /&gt;
&amp;nbsp;*&lt;br /&gt;
&amp;nbsp;*/&lt;br /&gt;
@WebServlet(&quot;/SseServer&quot;)&lt;br /&gt;
public class SseServer extends HttpServlet {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;private static final long serialVersionUID = 1L;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;protected void doGet(HttpServletRequest request,&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;HttpServletResponse response) throws ServletException, IOException {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;doPost(request, response);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;protected void doPost(HttpServletRequest request,&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;HttpServletResponse response) throws ServletException, IOException {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;// Besides &quot;text/event-stream;&quot;, Chrome also needs charset, otherwise&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;// does not work&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;// &quot;text/event-stream;charset=UTF-8&quot;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;response.setContentType(&quot;text/event-stream;charset=UTF-8&quot;);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;response.setHeader(&quot;Cache-Control&quot;, &quot;no-cache&quot;);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;response.setHeader(&quot;Connection&quot;, &quot;keep-alive&quot;);&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;PrintWriter out = response.getWriter();&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;while (true) {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;out.print(&quot;id: &quot; + &quot;ServerTime&quot; + &quot;\n&quot;);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;out.print(&quot;data: &quot; + new Date().toLocaleString() + &quot;\n\n&quot;);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;out.flush();&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;// out.close(); //Do not close the writer!&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;try {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;Thread.currentThread().sleep(5000);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;} catch (InterruptedException e) {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;e.printStackTrace();&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;}&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;}&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
Make sure in the Servlet, set content type of response as &quot;&lt;span style=&quot;background-color: #fffff8;&quot;&gt;text/event-stream;charset=UTF-8&lt;/span&gt;&quot;, and NOT&lt;br /&gt;
&lt;span style=&quot;background-color: #fffff8;&quot;&gt;just &quot;text/event-stream&quot;. Otherwise it does not work with Chrome.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #fffff8;&quot;&gt;&lt;br /&gt;
&lt;/span&gt; &lt;span style=&quot;background-color: #fffff8;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;h4&gt;
&lt;span style=&quot;color: #351c75;&quot;&gt; 3. &amp;nbsp;Create a SSE.html file&lt;/span&gt;&lt;/h4&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: #fffff8; border-radius: 6px 6px 6px 6px; border: 1px solid #BBBBBB; padding: 5px 10px 5px;&quot;&gt;
&amp;lt;!DOCTYPE html&amp;gt;&lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
&amp;lt;body&amp;gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;lt;h1&amp;gt;Current Server Time &amp;nbsp;: &amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;lt;div id=&quot;ServerTime&quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;lt;script&amp;gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;if (typeof (EventSource) !== &quot;undefined&quot;) {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;var source = new EventSource(&quot;http://localhost:8080/SSE/SseServer&quot;);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;source.onmessage = function(event) {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;document.getElementById(&quot;ServerTime&quot;).innerHTML += event.data&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;      &lt;/span&gt;+ &quot;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&quot;;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;};&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;} else {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;document.getElementById(&quot;ServerTime&quot;).innerHTML = &quot;Sorry, your browser does not support server-sent events...&quot;;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;}&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;lt;/script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/body&amp;gt;&lt;br /&gt;
&amp;lt;/html&amp;gt;&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;h4&gt;
&lt;span style=&quot;color: #351c75;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/h4&gt;
&lt;h4&gt;
&lt;span style=&quot;color: #351c75;&quot;&gt;4. Deploy the Web Application&lt;/span&gt;&lt;/h4&gt;
&lt;br /&gt;
Export the Web Application as &quot;SSE.war&quot;, and deploy it to a running Tomcat Server.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h4&gt;
&lt;span style=&quot;color: #351c75;&quot;&gt;5. Try accessing the SSE.html use browser&lt;/span&gt;&lt;/h4&gt;
&lt;br /&gt;
Access the SSE.html using link&amp;nbsp;&lt;a href=&quot;http://localhost:8080/SSE/SSE.html&quot;&gt;http://localhost:8080/SSE/SSE.html&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Your browser should shown content as below:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjyOJUNn2wJKs9HPleyVBZVW8NNDU0It_raNFlB0FnaMTysmUjAag0fXq3jfVwx4prV7TmXyd4wjElhlU5EvC6cffoP1_4-iq2HL7RdnnKc3IjpwKHV6M6ur-uWPdZR7WXhN2mh0jsLuzpr/s1600/sse_2.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjyOJUNn2wJKs9HPleyVBZVW8NNDU0It_raNFlB0FnaMTysmUjAag0fXq3jfVwx4prV7TmXyd4wjElhlU5EvC6cffoP1_4-iq2HL7RdnnKc3IjpwKHV6M6ur-uWPdZR7WXhN2mh0jsLuzpr/s1600/sse_2.jpg&quot; height=&quot;201&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
When every 5 seconds, there is new line shown in your browser, congratulations, you have made your first Server-Sent Events Application!&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://milestonenext.blogspot.com/feeds/8636766970844589232/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://milestonenext.blogspot.com/2013/07/html5-server-sent-events-sample-with.html#comment-form' title='13 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7515187228721563448/posts/default/8636766970844589232'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7515187228721563448/posts/default/8636766970844589232'/><link rel='alternate' type='text/html' href='http://milestonenext.blogspot.com/2013/07/html5-server-sent-events-sample-with.html' title='HTML5 Server-Sent Events Sample with Java Servlet as Event Server '/><author><name>Beijing Beijing</name><uri>http://www.blogger.com/profile/12013373726184997758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='28' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTm1nk7ZqbPTfBofk6dIg7Zfx820i-FNuXqGbSlZNbRw5-RPJuqgDFNoW_zdgJCMCYj6R5cTGNgNKmwTzeDsEm2EHkqni9ywIanrN-PIRd4Z4yZXUOHhC12zzDid1A1w/s220/profile.png'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjMUhnil_AejMkawreEoFa4kc5wBCJd8Wc-xEe8edE_VBci206gU5s9U0QBUn1BM1chho2VTQinxXTWMghINV-wz4DJY3aW6eQhtSbu8Mm2TEI4UvqKbj8dsY-DFK6s_FS_6DWGxYpZGiF/s72-c/sse_1.jpg" height="72" width="72"/><thr:total>13</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7515187228721563448.post-7587844623870131515</id><published>2013-07-06T22:36:00.004-07:00</published><updated>2013-07-09T13:06:54.365-07:00</updated><title type='text'>JMX Sample: monitor standalone Application use own JMX Server</title><content type='html'>&lt;div style=&quot;background-color: white; color: #222222; font-family: Lato, arial, sans-serif; font-size: 14px; line-height: 24px;&quot;&gt;&lt;div style=&quot;margin-left: 10px; margin-right: 10px;&quot;&gt;&lt;span style=&quot;color: #666666; font-size: xx-small;&quot;&gt;&lt;b&gt;Document &amp;nbsp;Version 1.0&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;releaseinfo&quot; style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; margin-left: 10px; margin-right: 10px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;span style=&quot;background-color: white; color: #666666; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: xx-small; line-height: 24px;&quot;&gt;&lt;b&gt;Copyright © 2012-2013 beijing.beijing.012@gmail.com&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #666666; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: xx-small; line-height: 24px;&quot;&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/span&gt; &lt;span style=&quot;color: #666666; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: xx-small; line-height: 24px;&quot;&gt;&lt;b&gt;&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;When you are familiar with JBoss, you should have known JMX-console. When you want to monitor you application deployed on JBoss, you might go with following step:&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;&amp;nbsp;wrapp the to be monitored property &amp;nbsp;in a Mbean,&lt;/li&gt;
&lt;li&gt;&amp;nbsp;register the MBean with JBoss&#39; JMX sesrver&lt;/li&gt;
&lt;li&gt;&amp;nbsp;check / manage the properties through JMX-Console&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;But what if you want to monitor a standalone application, and there is no JMX-server to use?&lt;br /&gt;
&lt;br /&gt;
In such case, your will have to start your own JMX-server.&lt;br /&gt;
&lt;br /&gt;
I will show how to use your own JMX-server, to monitor a standalone application which monitors the application&#39;s local time.&lt;br /&gt;
&lt;br /&gt;
&lt;h4&gt;&lt;span style=&quot;color: #351c75;&quot;&gt;1. The MBean&lt;/span&gt;&lt;/h4&gt;&lt;br /&gt;
The MBean interface exposes which methods are monitored by JMX.&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: #fffff8; border-radius: 6px 6px 6px 6px; border: 1px solid #BBBBBB; padding: 5px 10px 5px;&quot;&gt;package mbean;&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
&amp;nbsp;*&lt;br /&gt;
&amp;nbsp;* @author swang&lt;br /&gt;
&amp;nbsp;*&lt;br /&gt;
&amp;nbsp;*/&lt;br /&gt;
public interface MySampleMBean {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;String getServerTime();&lt;br /&gt;
}&lt;br /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
This is the MBean implementation. The property &quot;serverTime&quot; &amp;nbsp;will be updated every 5 seconds. We expect the upated serverTime will be shown to a JMX client when it connects to JXX-Server.&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: #fffff8; border-radius: 6px 6px 6px 6px; border: 1px solid #BBBBBB; padding: 5px 10px 5px;&quot;&gt;package mbean;&lt;br /&gt;
&lt;br /&gt;
import java.util.Date;&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
&amp;nbsp;*&lt;br /&gt;
&amp;nbsp;* @author swang&lt;br /&gt;
&amp;nbsp;*&lt;br /&gt;
&amp;nbsp;*/&lt;br /&gt;
public class MySample implements MySampleMBean, Runnable{&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;private static MySample instance = new MySample();&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;private String serverTime;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;private MySample() {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;}&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;public static MySample getInstance() {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;         &lt;/span&gt;return instance;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;}&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;@Override&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;public String getServerTime() {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;      &lt;/span&gt;return this.serverTime;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;public void setServerTime(String serverTime) {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;      &lt;/span&gt;this.serverTime = serverTime;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;@Override&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;public void run() {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;      &lt;/span&gt;while(true) {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;           &lt;/span&gt;//Updating serverTime every 5 seconds&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;           &lt;/span&gt;setServerTime(new Date().toLocaleString());&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;           &lt;/span&gt;try {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;               &lt;/span&gt;Thread.currentThread().sleep(5000);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;           &lt;/span&gt;} catch (InterruptedException e) {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;              &lt;/span&gt;// TODO Auto-generated catch block&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;              &lt;/span&gt;e.printStackTrace();&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;           &lt;/span&gt;}&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;        &lt;/span&gt;}&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;}&lt;br /&gt;
}&lt;br /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;
&lt;h4&gt;&lt;span style=&quot;color: #351c75;&quot;&gt;2. A JMX Agent&lt;/span&gt;&lt;/h4&gt;&lt;br /&gt;
This is the main class of the program, we call it a JMX agent. It starts a JMX-Server, starts the MBean, and regist the MBean with the JMX-Server.&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: #fffff8; border-radius: 6px 6px 6px 6px; border: 1px solid #BBBBBB; padding: 5px 10px 5px;&quot;&gt;package mbean;&lt;br /&gt;
&lt;br /&gt;
import java.lang.management.ManagementFactory;&lt;br /&gt;
import java.rmi.registry.LocateRegistry;&lt;br /&gt;
import java.util.HashMap;&lt;br /&gt;
&lt;br /&gt;
import javax.management.MBeanServer;&lt;br /&gt;
import javax.management.ObjectName;&lt;br /&gt;
import javax.management.remote.JMXConnectorServer;&lt;br /&gt;
import javax.management.remote.JMXConnectorServerFactory;&lt;br /&gt;
import javax.management.remote.JMXServiceURL;&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
&amp;nbsp;*&lt;br /&gt;
&amp;nbsp;* @author swang&lt;br /&gt;
&amp;nbsp;*&lt;br /&gt;
&amp;nbsp;*/&lt;br /&gt;
public class MyJMXAgent {&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;private static MBeanServer mbs = null;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;public void init() throws Exception {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;      &lt;/span&gt;mbs = ManagementFactory.getPlatformMBeanServer();&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;      &lt;/span&gt;ObjectName objName = new ObjectName(&quot;TestJMXAgent:name=MySampleMBean&quot;);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;mbs.registerMBean(MySample.getInstance(), objName);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;      &lt;/span&gt;String hostname = &quot;localhost&quot;;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;      &lt;/span&gt;int port = 1717;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;      &lt;/span&gt;LocateRegistry.createRegistry(port);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;      &lt;/span&gt;System.setProperty(&quot;java.rmi.server.randomIDs&quot;, &quot;true&quot;);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;      &lt;/span&gt;System.setProperty(&quot;java.rmi.server.hostname&quot;, hostname);&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;      &lt;/span&gt;HashMap&amp;lt;String, Object&amp;gt; env = new HashMap&amp;lt;String, Object&amp;gt;(3);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;      &lt;/span&gt;env.put(&quot;jmx.remote.x.password.file&quot;, &quot;jmxremote.password&quot;);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;      &lt;/span&gt;env.put(&quot;jmx.remote.x.access.file&quot;, &quot;jmxremote.access&quot;);&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;      &lt;/span&gt;JMXServiceURL url = new JMXServiceURL(&quot;service:jmx:rmi://&quot; + hostname&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;+ &quot;:&quot; + port + &quot;/jndi/rmi://&quot; + hostname + &quot;:&quot; + port&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;+ &quot;/jmxrmi&quot;);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;      &lt;/span&gt;JMXConnectorServer cs = JMXConnectorServerFactory&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;.newJMXConnectorServer(url, env, mbs);&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;      &lt;/span&gt;cs.start();&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;      &lt;/span&gt;System.out.println(&quot;Starting JMXConnectorServer on: &quot; + url);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;}&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;public static void main(String[] args) throws Exception {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;      &lt;/span&gt;System.out.println(&quot;jmx agent starting&quot;);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;      &lt;/span&gt;// Start updating MBean&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;      &lt;/span&gt;new Thread(MySample.getInstance()).start();&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;MyJMXAgent agent = new MyJMXAgent();&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;agent.init();&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;}&lt;br /&gt;
}&lt;br /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;h4&gt;&lt;span style=&quot;color: #351c75;&quot;&gt;3. Configuration JMX access:&lt;/span&gt;&lt;/h4&gt;&lt;br /&gt;
Create a &quot;jmxremote.access&quot; file:&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: #fffff8; border-radius: 6px 6px 6px 6px; border: 1px solid #BBBBBB; padding: 5px 10px 5px;&quot;&gt;monitor &amp;nbsp; readonly&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
Create a &quot;jmxremote.password&quot; file:&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: #fffff8; border-radius: 6px 6px 6px 6px; border: 1px solid #BBBBBB; padding: 5px 10px 5px;&quot;&gt;monitor &amp;nbsp; password&lt;/div&gt;&lt;br /&gt;
&lt;h4&gt;&lt;span style=&quot;color: #351c75;&quot;&gt;&lt;br /&gt;
4. Run&amp;nbsp;&lt;span style=&quot;background-color: #fffff8;&quot;&gt;MyJMXAgent as Java application:&lt;/span&gt;&lt;/span&gt;&lt;/h4&gt;&lt;span style=&quot;background-color: #fffff8;&quot;&gt;&lt;br /&gt;
&lt;/span&gt; &lt;br /&gt;
&lt;div style=&quot;background-color: #fffff8; border-radius: 6px 6px 6px 6px; border: 1px solid #BBBBBB; padding: 5px 10px 5px;&quot;&gt;jmx agent starting&lt;br /&gt;
host name: localhost&lt;br /&gt;
Starting JMXConnectorServer on: service:jmx:rmi://localhost:1717/jndi/rmi://localhost:1717/jmxrmi&lt;/div&gt;&lt;br /&gt;
A JMX-Server is now running on localhost:1717, and you could use a JMX-client to connect to it.&lt;br /&gt;
&lt;br /&gt;
&lt;h4&gt;&lt;span style=&quot;color: #351c75;&quot;&gt;5. Connect to JMX-Server with jconsole&lt;/span&gt;&lt;/h4&gt;&lt;div&gt;&lt;span style=&quot;color: #351c75;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;Start jconsole an connect to MyMXAgent:&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0UdUh9PvCU6ej5oTpz-joPgv6m4boQ82DSPHa2uOI2m07h8kpEy8tDNq7PK3Hs9iUrECjX__n7fyNz6_17M440I06-hoMesc7NT6Pz5gWHsbVhQQE3yBF3j_81BCqxQmPvWgR26bS_yaT/s1600/jconsole1.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0UdUh9PvCU6ej5oTpz-joPgv6m4boQ82DSPHa2uOI2m07h8kpEy8tDNq7PK3Hs9iUrECjX__n7fyNz6_17M440I06-hoMesc7NT6Pz5gWHsbVhQQE3yBF3j_81BCqxQmPvWgR26bS_yaT/s1600/jconsole1.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #351c75;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;Check monitored property &quot;serverTime&quot;:&lt;/b&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPKMGduNBGC4D0ejb1-qb8yrQaDorhF1Z-roTzZIbg0sFe0ifDXMJCUxcz_AGyfm2FX2yseTjuEnEwz5AOVtNDc7gCDCkl1-QBXzSNPUN6bAN0HMCum-jb2OCVwuXbStC4sAZIVYZfBQwy/s1600/jconsole2.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPKMGduNBGC4D0ejb1-qb8yrQaDorhF1Z-roTzZIbg0sFe0ifDXMJCUxcz_AGyfm2FX2yseTjuEnEwz5AOVtNDc7gCDCkl1-QBXzSNPUN6bAN0HMCum-jb2OCVwuXbStC4sAZIVYZfBQwy/s1600/jconsole2.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Click &quot;Refresh&quot; button to get the updated &quot;serverTime&quot; :&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;
&lt;/b&gt; &lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDQ88CtN7GQEMQNUtiJWyFlRn8tYW8yOHJvgRWdiTjvM1VB7kA09nMJRkKEqCoIvgoxSESF0iZJ3OUSlU2-wb8vYutb1saCKONFK3IVMbmmji8RaRim_251m6GjY4ovuMyttlm9aPb8YER/s1600/jconsole3.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDQ88CtN7GQEMQNUtiJWyFlRn8tYW8yOHJvgRWdiTjvM1VB7kA09nMJRkKEqCoIvgoxSESF0iZJ3OUSlU2-wb8vYutb1saCKONFK3IVMbmmji8RaRim_251m6GjY4ovuMyttlm9aPb8YER/s1600/jconsole3.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
</content><link rel='replies' type='application/atom+xml' href='http://milestonenext.blogspot.com/feeds/7587844623870131515/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://milestonenext.blogspot.com/2013/07/jmx-sample-monitor-standalone.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7515187228721563448/posts/default/7587844623870131515'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7515187228721563448/posts/default/7587844623870131515'/><link rel='alternate' type='text/html' href='http://milestonenext.blogspot.com/2013/07/jmx-sample-monitor-standalone.html' title='JMX Sample: monitor standalone Application use own JMX Server'/><author><name>Beijing Beijing</name><uri>http://www.blogger.com/profile/12013373726184997758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='28' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTm1nk7ZqbPTfBofk6dIg7Zfx820i-FNuXqGbSlZNbRw5-RPJuqgDFNoW_zdgJCMCYj6R5cTGNgNKmwTzeDsEm2EHkqni9ywIanrN-PIRd4Z4yZXUOHhC12zzDid1A1w/s220/profile.png'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0UdUh9PvCU6ej5oTpz-joPgv6m4boQ82DSPHa2uOI2m07h8kpEy8tDNq7PK3Hs9iUrECjX__n7fyNz6_17M440I06-hoMesc7NT6Pz5gWHsbVhQQE3yBF3j_81BCqxQmPvWgR26bS_yaT/s72-c/jconsole1.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7515187228721563448.post-1102513131632145198</id><published>2013-07-02T13:44:00.000-07:00</published><updated>2013-07-14T23:53:00.524-07:00</updated><title type='text'>Create Document with Digital Signature using GPG on Linux</title><content type='html'>&lt;div style=&quot;background-color: white; color: #222222; font-family: Lato, arial, sans-serif; font-size: 14px; line-height: 24px;&quot;&gt;
&lt;div style=&quot;margin-left: 10px; margin-right: 10px;&quot;&gt;
&lt;span style=&quot;color: #666666; font-size: xx-small;&quot;&gt;Document &amp;nbsp;Version 1.0&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;releaseinfo&quot; style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; margin-left: 10px; margin-right: 10px;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;span style=&quot;background-color: white; color: #666666; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: xx-small; line-height: 24px;&quot;&gt;Copyright © 2012-2013 beijing.beijing.012@gmail.com&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
My friend Tomy has got an offer from GooPle, greate, isn&#39;t it? &amp;nbsp;GooPle! &amp;nbsp;On the Phone, the HR manager, Mr. Bozz of GooPle says, he will sign the contract and send it to Tomy right away as post. But at the same time,&amp;nbsp;Mr. Bozz&amp;nbsp;also pointed out, that Tomy should sign the contract and send it back to GooPle in 8 hours. &amp;nbsp;8 hours? Tomy is even not sure if he could receive the post in 8 hours, since he is living in a small village, the post man comes only once a week...&lt;br /&gt;
&lt;br /&gt;
Of course Tomy do not want to miss this chance, by GooPle. &quot;Sorry sir, &amp;nbsp;but could you sign it and send me as file, and I will sign it with digital signature, so you would get the signed contract in &amp;nbsp;20 minutes &quot;&lt;br /&gt;
&quot;Yes, of course ...&quot;&lt;br /&gt;
&lt;br /&gt;
In the following section, I will show step by step, how does Mr. Bozz prepare the contract, sign it with his digital signature, and how will Tomy verify the signature, and extract the original content of the contract, otherwise the content is encrypted and not readable.&lt;br /&gt;
&lt;br /&gt;
&lt;h4&gt;
&lt;span style=&quot;color: #0b5394;&quot;&gt;Step 1. Mr. Bozz prepare the original contract, and save the file as &quot;contract.txt&quot; :&lt;/span&gt;&lt;/h4&gt;
&lt;br /&gt;
&quot;This is a contract between Mr. Tomy and GooPle ...&quot;&lt;br /&gt;
&lt;br /&gt;
&lt;h4&gt;
&lt;span style=&quot;color: #0b5394;&quot;&gt;Step 2. Mr. Bozz sign the &quot;contract.txt&quot; file with his digital signature&lt;/span&gt;&lt;/h4&gt;
&lt;div&gt;
&lt;span style=&quot;color: #0b5394;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
Mr. Bozz&#39;s computer is a Linux (Mint 14) machine, he knows there is a tool under linux called &quot;GPG (&lt;em style=&quot;background-color: white; color: #444444; font-family: arial, sans-serif; font-size: small; font-style: normal; font-weight: bold; line-height: 16px;&quot;&gt;GNU Privacy Guard&lt;/em&gt;)&quot;, which could be used to create digital signature.&lt;br /&gt;
&lt;br /&gt;
He opens a terminal and types following command:&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: #fffff8; border-radius: 6px 6px 6px 6px; border: 1px solid #BBBBBB; padding: 5px 10px 5px;&quot;&gt;
bozz@PC007x /home/bozz $ gpg --sign contract.txt&lt;/div&gt;
&lt;br /&gt;
Console output shows:&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: #fffff8; border-radius: 6px 6px 6px 6px; border: 1px solid #BBBBBB; padding: 5px 10px 5px;&quot;&gt;
gpg: directory `/home/tomy/.gnupg&#39; created&lt;br /&gt;
gpg: new configuration file `/home/tomy/.gnupg/gpg.conf&#39; created&lt;br /&gt;
gpg: WARNING: options in `/home/tomy/.gnupg/gpg.conf&#39; are not yet active during this run&lt;br /&gt;
gpg: keyring `/home/tomy/.gnupg/secring.gpg&#39; created&lt;br /&gt;
gpg: keyring `/home/tomy/.gnupg/pubring.gpg&#39; created&lt;br /&gt;
gpg: no default secret key: secret key not available&lt;br /&gt;
&lt;span style=&quot;color: #cc0000;&quot;&gt;gpg: signing failed: secret key not available&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
GPG complains here it can not find the private and public key of Mr. Bozz, but these keys are need for creating digital signature.&lt;br /&gt;
&lt;br /&gt;
&lt;h4&gt;
&lt;span style=&quot;color: #0b5394;&quot;&gt;Step3. Mr. Bozz creates his&amp;nbsp;&amp;nbsp;private and public key:&lt;/span&gt;&lt;/h4&gt;
&lt;br /&gt;
To generate keys, Mr. Bozz types following command in the terminal:&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: #fffff8; border-radius: 6px 6px 6px 6px; border: 1px solid #BBBBBB; padding: 5px 10px 5px;&quot;&gt;
bozz@PC007x /home/bozz $ gpg --gen-key&lt;/div&gt;
&lt;br /&gt;
Terminal output:&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: #fffff8; border-radius: 6px 6px 6px 6px; border: 1px solid #BBBBBB; padding: 5px 10px 5px;&quot;&gt;
gpg (GnuPG) 1.4.11; Copyright (C) 2010 Free Software Foundation, Inc.&lt;br /&gt;
This is free software: you are free to change and redistribute it.&lt;br /&gt;
There is NO WARRANTY, to the extent permitted by law.&lt;br /&gt;
&lt;br /&gt;
Please select what kind of key you want:&lt;br /&gt;
&amp;nbsp; &amp;nbsp;(1) RSA and RSA (default)&lt;br /&gt;
&amp;nbsp; &amp;nbsp;(2) DSA and Elgamal&lt;br /&gt;
&amp;nbsp; &amp;nbsp;(3) DSA (sign only)&lt;br /&gt;
&amp;nbsp; &amp;nbsp;(4) RSA (sign only)&lt;br /&gt;
Your selection?&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Type 1 in the terminal and return:&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8; border-radius: 6px 6px 6px 6px; border: 1px solid #BBBBBB; padding: 5px 10px 5px;&quot;&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;div&gt;
RSA keys may be between 1024 and 4096 bits long.&lt;/div&gt;
&lt;div&gt;
What keysize do you want? (2048)&amp;nbsp;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Return to take the default key long.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
Please specify how long the key should be valid.&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 = key does not expire&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;n&amp;gt; &amp;nbsp;= key expires in n days&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;n&amp;gt;w = key expires in n weeks&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;n&amp;gt;m = key expires in n months&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;n&amp;gt;y = key expires in n years&lt;/div&gt;
&lt;div&gt;
Key is valid for? (0)&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
Type return to take the default expire time, i.e. never expires:&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8; border-radius: 6px 6px 6px 6px; border: 1px solid #BBBBBB; padding: 5px 10px 5px;&quot;&gt;
Is this correct? (y/N)&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
Type y and continue with name and email:&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8; border-radius: 6px 6px 6px 6px; border: 1px solid #BBBBBB; padding: 5px 10px 5px;&quot;&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;div&gt;
You need a user ID to identify your key; the software constructs the user ID&lt;/div&gt;
&lt;div&gt;
from the Real Name, Comment and Email Address in this form:&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &quot;Heinrich Heine (Der Dichter) &amp;lt;heinrichh@duesseldorf.de&amp;gt;&quot;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
Real name: bozz&lt;/div&gt;
&lt;div&gt;
Name must be at least 5 characters long&lt;/div&gt;
&lt;div&gt;
Real name: Im Bozz&lt;/div&gt;
&lt;div&gt;
Email address:&amp;nbsp;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Email address: bozz@goople.com&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;
Comment: blabla&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
You selected this USER-ID:&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &quot;Im Bozz (blabla) &amp;lt;bozz@goople.com&amp;gt;&quot;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Change (N)ame, (C)omment, (E)mail or (O)kay/(Q)uit?&amp;nbsp;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
type &quot;O&quot; and return to set 123 as password:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8; border-radius: 6px 6px 6px 6px; border: 1px solid #BBBBBB; padding: 5px 10px 5px;&quot;&gt;
You need a Passphrase to protect your secret key.&lt;br /&gt;
&lt;div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
gpg: gpg-agent is not available in this session&lt;/div&gt;
&lt;div&gt;
Enter passphrase:&amp;nbsp;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
123&lt;/div&gt;
&lt;div&gt;
123&lt;/div&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;div&gt;
gpg: gpg-agent is not available in this session&lt;/div&gt;
&lt;div&gt;
We need to generate a lot of random bytes. It is a good idea to perform&lt;/div&gt;
&lt;div&gt;
some other action (type on the keyboard, move the mouse, utilize the&lt;/div&gt;
&lt;div&gt;
disks) during the prime generation; this gives the random number&lt;/div&gt;
&lt;div&gt;
generator a better chance to gain enough entropy.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Not enough random bytes available. &amp;nbsp;Please do some other work to give&lt;/div&gt;
&lt;div&gt;
the OS a chance to collect more entropy! (Need 236 more bytes)&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
..&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
Move your mouse, or type something with keybord in another terminal, and you will see the gpg process proceeds:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8; border-radius: 6px 6px 6px 6px; border: 1px solid #BBBBBB; padding: 5px 10px 5px;&quot;&gt;
Not enough random bytes available. &amp;nbsp;Please do some other work to give&lt;br /&gt;
&lt;div&gt;
&lt;div&gt;
the OS a chance to collect more entropy! (Need 104 more bytes)&lt;/div&gt;
&lt;div&gt;
..+++++&lt;/div&gt;
&lt;div&gt;
gpg: /home/tomy/.gnupg/trustdb.gpg: trustdb created&lt;/div&gt;
&lt;div&gt;
gpg: key 324B99FD marked as ultimately trusted&lt;/div&gt;
&lt;div&gt;
public and secret key created and signed.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
gpg: checking the trustdb&lt;/div&gt;
&lt;div&gt;
gpg: 3 marginal(s) needed, 1 complete(s) needed, PGP trust model&lt;/div&gt;
&lt;div&gt;
gpg: depth: 0 &amp;nbsp;valid: &amp;nbsp; 1 &amp;nbsp;signed: &amp;nbsp; 0 &amp;nbsp;trust: 0-, 0q, 0n, 0m, 0f, 1u&lt;/div&gt;
&lt;div&gt;
pub &amp;nbsp; 2048R/324B99FD 2013-07-03&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; Key fingerprint = 5799 923C 4123 523E 0567 &amp;nbsp;794F 2E52 B3F5 324B 99FD&lt;/div&gt;
&lt;div&gt;
uid &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Im Bozz (blabla) &amp;lt;bozz@goople.com&amp;gt;&lt;/div&gt;
&lt;div&gt;
sub &amp;nbsp; 2048R/A57E911C 2013-07-03&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
Now the keys are generated.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;h4&gt;
&lt;span style=&quot;color: #0b5394;&quot;&gt;Step4. Mr. Bozz try sign the contract again:&lt;/span&gt;&lt;/h4&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #0b5394;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #0b5394;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div style=&quot;background-color: #fffff8; border-radius: 6px 6px 6px 6px; border: 1px solid #BBBBBB; padding: 5px 10px 5px;&quot;&gt;
bozz@PC007x /home/bozz $&amp;nbsp;gpg --sign contract.txt&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;
You need a passphrase to unlock the secret key for&lt;/div&gt;
&lt;div&gt;
user: &quot;Im Bozz (blabla) &amp;lt;bozz@goople.com&amp;gt;&quot;&lt;/div&gt;
&lt;div&gt;
2048-bit RSA key, ID 324B99FD, created 2013-07-03&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
gpg: gpg-agent is not available in this session&lt;/div&gt;
&lt;div&gt;
Enter passphrase:&amp;nbsp;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
Enter &quot;123&quot; as password, return. The signed contract file is created as &quot;contract.txt.gpg&quot;&amp;nbsp;&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: #fffff8; border-radius: 6px 6px 6px 6px; border: 1px solid #BBBBBB; padding: 5px 10px 5px;&quot;&gt;
&amp;nbsp;bozz@PC007x /home/bozz $&amp;nbsp;ls&lt;br /&gt;
contract.txt &amp;nbsp;contract.txt.gpg&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h4&gt;
&lt;span style=&quot;color: #0b5394;&quot;&gt;Step5. Mr. Bozz send the &quot;contract.txt.gpg&quot; file to Tomy.&lt;/span&gt;&lt;/h4&gt;
&lt;div&gt;
&lt;span style=&quot;color: #0b5394;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #0b5394;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;h4&gt;
&lt;span style=&quot;color: #0b5394;&quot;&gt;Step6. Tomy tries to verify file &quot;contract.txt.gpg&quot;&lt;/span&gt;&lt;/h4&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #0b5394;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #0b5394;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
To verify the file is really from Mr. Bozz from GooPle, Tomy can use GPG utilities. &amp;nbsp;We assume has GPG installed on his machine, and he has created his public and private key as described in Step.3&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
So Tomy types command below to verify the singnature of Mr. Bozz:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
tomy@PC001x /home/tomy $ gpg --verify contract.txt.gpg&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
gpg: Signature made Tue 02 Jul 2013 03:00:40 PM CEST using RSA key ID B06521C9&lt;/div&gt;
&lt;div&gt;
gpg: Can&#39;t check signature: public key not found&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
The above information shows that gpg can not verify the signature, since it is missing the public key of Mr. Bozz public.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
When Tomy tries to read &amp;nbsp;or show the content of the &amp;nbsp;contract &quot;contract.txt.gpg&quot;, he will find that the file is actuall encrypted, and not readable.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;div&gt;
So now Tomy needs to ask Mr. Bozz &amp;nbsp;for his public key.&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #0b5394;&quot;&gt;&lt;br /&gt;
&lt;/span&gt; &lt;br /&gt;
&lt;h4&gt;
&lt;span style=&quot;color: #0b5394;&quot;&gt;Step7. Mr. Bozz exports his public and send it to Tomy&lt;/span&gt;&lt;/h4&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #0b5394;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #0b5394;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
Mr. Bozz exports his public key as file &quot;bozz.asc&quot; usingm command:&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;bozz@PC007x /home/bozz $&amp;nbsp;gpg -a --export &amp;gt; &amp;nbsp;bozz.asc&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A file &quot;bozz.asc&quot; is genereated with the content below:&lt;br /&gt;
===========&lt;br /&gt;
-----BEGIN PGP PUBLIC KEY BLOCK-----&lt;br /&gt;
Version: GnuPG v1.4.11 (GNU/Linux)&lt;br /&gt;
&lt;br /&gt;
mQENBFHSzPABCADfOFyUJOpm+oMx0MgP6cZy1vMLkPpNNwMFTcdBxswx5t9w77XL&lt;br /&gt;
jPR1vw7GytLebmIYQ66NcJX3XETLHHcsSCEZF4ueAGbi/XSeBRWA/hSNGHRORkXa&lt;br /&gt;
Mvmq1uTq+aUbP/teOgfnEJCV1Rn5u1IP9W7GfJM7vNmfgBVwTj464zoePJjiF6Le&lt;br /&gt;
5Wwhkove2hURokltQJSJxFFfEEkEfrRqmAtzKGxxD2UXfAxp+/g1ULFl6J/1zDHN&lt;br /&gt;
Gdv9M6ppT9limlNCAwcRnas+bBvsyNF7sY+5CgX2rc6gusAcqXayqq1Ax5gnkE8V&lt;br /&gt;
14IJVyMbjeY+t84iWAi1eiva/Oq4b7W1dg/7ABEBAAG0Gm1vYmlsZWdhdGUgKG1n&lt;br /&gt;
KSA8bWdAbWcuZGU+iQE4BBMBAgAiBQJR0szwAhsDBgsJCAcDAgYVCAIJCgsEFgID&lt;br /&gt;
AQIeAQIXgAAKCRCYbbznsGUhycDmB/9+xPPIG2+Q5CqlmYqhgG3xsX0mQQW85w0r&lt;br /&gt;
LHJ3ix6Ah51u88OjvQ+57lkP+bE8EGOk6SGn/49OPM1DE5rAczDn9jdbfn8tVJ6k&lt;br /&gt;
pD1JKIPKC9yDhAmxGcRlzTPATJOYva4DMzNa7xFJTy4e97k2xgibESt0E6sh6EF5&lt;br /&gt;
ZtWJHyBAtdvCdZcLQy4bEAW6wOrGPv3T/tr/nW71hD96aGfiluRQ1Y3WfH15nc/u&lt;br /&gt;
CVEJlXmGP2NHHqYVjReMbPqEFfDlh+/tQ+0nvwYHc8p/Ixk6FbAUcbDXaNibZTZN&lt;br /&gt;
fS3F3CO7Oz/u5LM4CbOpTyqMSK6AlMU4kJECHdAAAcMyA4d2jM/guQENBFHSzPAB&lt;br /&gt;
CADAgZmDbU1PkJguIxq/j0fzJirGrE1k/U1rp4asQuKiU3WcVJ07h++yAwcvFz1 J&lt;br /&gt;
RHMyi8qm+Vvbz+wc7ZMUgzbFtH4xvYyNjxkF102crjdaWsIRK9aw5okZI48DK3kN&lt;br /&gt;
lPR2VnwzU6wr6sP77Nr3avFlcIqTFIRAsj9Z2cuMIh8SQ1yzye38ukcodK5zJl5S&lt;br /&gt;
28wyPX59raUOUn6Mm3vlzGAY80m299jgUCLx0TEl/D6nF8T98bZSRqG1xxnwcJGE&lt;br /&gt;
EjvsibzgJ1b6EZ66KHQY4200+gDMeo6MN6PB9TbL8jhViBpAaRAMoL+eoLAWTIq0&lt;br /&gt;
AFdEpvWmUSbRPXiKdA4UszebABEBAAGJAR8EGAECAAkFAlHSzPACGwwACgkQmG28&lt;br /&gt;
57BlIcmY8gf/UJDDYBV+b6Mpwh+/PBQFngnxXiLL4P9Wh3C3M2wHSqS7MWmcUG7B&lt;br /&gt;
qKPffqJyPvy4yxtOn5UxfJggE/SZo93PWsiRHggeBYu7E6qJoXBI2lyf9KHfE5sL&lt;br /&gt;
O6RuQ9OOl8CXh12klCcLzxQUwd42eT68iSS4prCWEIRb0EpLn6cjGAPUBR/rzoqG&lt;br /&gt;
gUG1jP9agh338IdTJOALDCldfHz/pua0ZWay8Oqi0Khi+kbpwCCAnrKppj0WAXlj&lt;br /&gt;
ju4feVCuOcmwa0TB5QbOZwjJs4wMITDza6wauo0ugitn2XlarWp97H2YmLzsfTTH&lt;br /&gt;
kpcAy6oVFGwyS00xBTy9z9Dx2Gc3mOhjug==&lt;br /&gt;
=49J7&lt;br /&gt;
-----END PGP PUBLIC KEY BLOCK-----&lt;br /&gt;
&lt;br /&gt;
============&lt;br /&gt;
&lt;br /&gt;
Mr. Bozz sends his public key, i.e. the file &quot;bozz.asc&quot; to Tomy&lt;br /&gt;
&lt;br /&gt;
&lt;h4&gt;
&lt;span style=&quot;color: #0b5394;&quot;&gt;Step8. Tomy &amp;nbsp;imports Mr. Bozz into gpg as trusted key:&lt;/span&gt;&lt;/h4&gt;
&lt;div&gt;
&lt;span style=&quot;color: #0b5394;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #0b5394;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
tomy@PC001x /home/tomy $ gpg --import bozz.asc&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h4&gt;
&lt;span style=&quot;color: #0b5394;&quot;&gt;Step9. Tomy tries to verify file &quot;contract.txt.gpg&quot; again:&lt;/span&gt;&lt;/h4&gt;
&lt;div&gt;
&lt;span style=&quot;color: #0b5394;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #0b5394;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
tomy@PC001x /home/tomy $gpg --verify contract.txt.gpg&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
gpg: Signature made Tue 02 Jul 2013 03:00:40 PM CEST using RSA key ID B06521C9&lt;/div&gt;
&lt;div&gt;
gpg: Good signature from &quot;Im Bozz (blabla) &amp;lt;bozz@goople.com&amp;gt;&quot;&lt;/div&gt;
&lt;div&gt;
gpg: WARNING: This key is not certified with a trusted signature!&lt;/div&gt;
&lt;div&gt;
gpg: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;There is no indication that the signature belongs to the owner.&lt;/div&gt;
&lt;div&gt;
Primary key fingerprint: 850F 0E98 AF5E 4CD3 D9A9 &amp;nbsp;0E1A 986D BCE7 B065 21C9&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;h4&gt;
&lt;span style=&quot;color: #0b5394;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/h4&gt;
&lt;h4&gt;
&lt;span style=&quot;color: #0b5394;&quot;&gt;Step10. Tomy extracts the content from &quot;contract.ext.gpg:&amp;nbsp;&lt;/span&gt;&lt;/h4&gt;
&lt;div&gt;
&lt;span style=&quot;color: #0b5394;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #0b5394;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
tomy@PC001x /home/tomy $ gpg --output my_contract.txt --decrypt contract.txt.gpg&amp;nbsp;&lt;/div&gt;
&lt;div id=&quot;yui_3_7_2_1_1372875966625_2229&quot;&gt;
gpg: Signature made Tue 02 Jul 2013 03:00:40 PM CEST using RSA key ID B06521C9&lt;/div&gt;
&lt;div id=&quot;yui_3_7_2_1_1372875966625_2228&quot;&gt;
gpg: Good signature from &quot;Im Bozz (blabla) &amp;lt;bozz@goople.com&amp;gt;&quot;&lt;/div&gt;
&lt;div id=&quot;yui_3_7_2_1_1372875966625_2210&quot;&gt;
gpg: WARNING: This key is not certified with a trusted signature!&lt;/div&gt;
&lt;div id=&quot;yui_3_7_2_1_1372875966625_2221&quot;&gt;
gpg: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;There is no indication that the signature belongs to the owner.&lt;/div&gt;
&lt;div id=&quot;yui_3_7_2_1_1372875966625_2222&quot;&gt;
Primary key fingerprint: 850F 0E98 AF5E 4CD3 D9A9 &amp;nbsp;0E1A 986D BCE7 B065 21C9&lt;/div&gt;
&lt;div id=&quot;yui_3_7_2_1_1372875966625_2222&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div id=&quot;yui_3_7_2_1_1372875966625_2222&quot;&gt;
A new file &quot;my_contrct.txt&quot; is created, &amp;nbsp;Tomy can just show the file content with less command:&lt;/div&gt;
&lt;div id=&quot;yui_3_7_2_1_1372875966625_2222&quot;&gt;
tomy@PC001x /home/tomy $ less &amp;nbsp;my_contrct.txt&lt;/div&gt;
&lt;div id=&quot;yui_3_7_2_1_1372875966625_2222&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div id=&quot;yui_3_7_2_1_1372875966625_2222&quot;&gt;
This is a contract between Mr. Tomy and GooPle ...&lt;/div&gt;
&lt;div id=&quot;yui_3_7_2_1_1372875966625_2222&quot;&gt;
my_contrct.txt (END)&lt;/div&gt;
&lt;div id=&quot;yui_3_7_2_1_1372875966625_2222&quot;&gt;
&lt;br /&gt;
We are almost done here.&lt;br /&gt;
When we take another look at the verification information in step 9, we will see there is a warning says:&lt;br /&gt;
&lt;br /&gt;
&quot;WARNING: This key is not certified with a trusted signature! &amp;nbsp;There is no indication that the signature belongs to the owner. &quot;&lt;br /&gt;
&lt;br /&gt;
This is because, the GPG utility of Tomy complains the public key of Mr. Bozz, is not certified by a known third party, a CA(Certificate Authority). &amp;nbsp;The get away with the warning, &amp;nbsp;Mr. Bozz need to have his public key file again signed by a thirty party, whom Tomy trust, i.e. Tomy had imported the 3 party&#39;s public key in his GPG utility.&lt;br /&gt;
&lt;br /&gt;
We assume, Jerry is someone wo Tomy trust, so Tomy will import Jerry&#39;s public key by:&lt;br /&gt;
&lt;br /&gt;
tomy@PC001x /home/tomy $ gpg --import jerry.asc&lt;br /&gt;
&lt;br /&gt;
&lt;h4&gt;
&lt;span style=&quot;color: #0b5394;&quot;&gt;Step11. Mr. Bozz send his public key to Jerry&amp;nbsp;&lt;/span&gt;&lt;/h4&gt;
&lt;div&gt;
&lt;span style=&quot;color: #0b5394;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div id=&quot;yui_3_7_2_1_1372875966625_2222&quot;&gt;
&lt;h4&gt;
&lt;span style=&quot;color: #0b5394;&quot;&gt;Step12. Jerry signs &amp;nbsp;Mr. Bozz public key&lt;/span&gt;&lt;/h4&gt;
&lt;div&gt;
&lt;span style=&quot;color: #0b5394;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;h4&gt;
&lt;span style=&quot;font-weight: normal;&quot;&gt;Jerry imports Bozz&#39;s public key to his GPG utility:&lt;/span&gt;&lt;/h4&gt;
&lt;div&gt;
jerry@PC001x /home/jerry $ gpg --import bozz.asc&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Jerry sign Mr. Bozz&#39; public key using :&lt;/div&gt;
&lt;div&gt;
jerry@PC001x /home/jerry $ gpg --sign-key B06521C9&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Here B06521C9 is the id of Mr Bozz&#39; key.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Jerry export Mr. Bozz&#39;s key as file:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
jerry@PC001x /home/jerry $ &amp;nbsp;gpg -a --export B06521C9 &amp;gt; &amp;nbsp;bozz_signed.asc&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
The public key of Mr. Bozz is now signed by jerry, and stored &amp;nbsp;in file &quot;bozz_signed.asc&quot;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;h4&gt;
&lt;span style=&quot;color: #0b5394;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/h4&gt;
&lt;h4&gt;
&lt;span style=&quot;color: #0b5394;&quot;&gt;Step13. Mr. Bozz &amp;nbsp;signe the contract again.import the signed key &quot;bozz_signed.asc&quot;&lt;/span&gt;&lt;/h4&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #0b5394;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
Mr. Bozz imports the signed key sign the contract again, and send the contract to Tomy&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;h4&gt;
&lt;span style=&quot;color: #0b5394;&quot;&gt;Step14. Tomy verify the new contract file&lt;/span&gt;&lt;/h4&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp;tomy@PC001x /home/tomy $ &amp;nbsp;gpg --verify samp.txt.gpg&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
gpg: Signature made Wed 03 Jul 2013 11:09:12 AM CEST using RSA key ID B06521C9&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
gpg: Good signature from &quot;Im Bozz (blabla) &amp;lt;bozz@goople.com&amp;gt;&quot;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Congratulations! &amp;nbsp;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://milestonenext.blogspot.com/feeds/1102513131632145198/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://milestonenext.blogspot.com/2013/07/create-document-with-digital-signature.html#comment-form' title='12 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7515187228721563448/posts/default/1102513131632145198'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7515187228721563448/posts/default/1102513131632145198'/><link rel='alternate' type='text/html' href='http://milestonenext.blogspot.com/2013/07/create-document-with-digital-signature.html' title='Create Document with Digital Signature using GPG on Linux'/><author><name>Beijing Beijing</name><uri>http://www.blogger.com/profile/12013373726184997758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='28' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTm1nk7ZqbPTfBofk6dIg7Zfx820i-FNuXqGbSlZNbRw5-RPJuqgDFNoW_zdgJCMCYj6R5cTGNgNKmwTzeDsEm2EHkqni9ywIanrN-PIRd4Z4yZXUOHhC12zzDid1A1w/s220/profile.png'/></author><thr:total>12</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7515187228721563448.post-7493287217186113533</id><published>2013-06-23T02:54:00.000-07:00</published><updated>2013-07-03T23:33:27.400-07:00</updated><title type='text'>Initializing Log4j</title><content type='html'>&lt;br /&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: Lato, arial, sans-serif; font-size: 14px; line-height: 24px;&quot;&gt;
&lt;div style=&quot;margin-left: 10px; margin-right: 10px;&quot;&gt;
&lt;span style=&quot;color: #666666; font-size: xx-small;&quot;&gt;Document &amp;nbsp;Version 1.0&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;releaseinfo&quot; style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; margin-left: 10px; margin-right: 10px;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;background-color: white;&quot;&gt;
&lt;div class=&quot;copyright&quot; style=&quot;margin-left: 10px; margin-right: 10px;&quot;&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: 14px; line-height: 24px;&quot;&gt;
&lt;span style=&quot;color: #666666; font-size: xx-small;&quot;&gt;Copyright © 2012-2013 beijing.beijing.012@gmail.com&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: 14px; line-height: 24px;&quot;&gt;
&lt;span style=&quot;color: #666666; font-size: xx-small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;
&lt;span style=&quot;color: #666666; font-size: xx-small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white;&quot;&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;You might have ever seen following warning running your program:&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: #fffff8; border-radius: 6px 6px 6px 6px; border: 1px solid #BBBBBB; padding: 5px 10px 5px;&quot;&gt;
&lt;span style=&quot;color: #222222;&quot;&gt;log4j:WARN No appenders could be found for logger (MyLogger).&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;color: #222222;&quot;&gt;log4j:WARN Please initialize the log4j system properly.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;color: #222222;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt; &lt;span style=&quot;background-color: white; color: #3d85c6; font-family: &#39;Times New Roman&#39;; line-height: normal;&quot;&gt;&lt;b&gt;What does this mean?&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #3d85c6; font-family: &#39;Times New Roman&#39;; line-height: normal;&quot;&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/span&gt; &lt;span style=&quot;background-color: white; color: #222222; font-family: &#39;Times New Roman&#39;; line-height: normal;&quot;&gt;It means Log4j is not initialized for your application.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #222222; font-family: &#39;Times New Roman&#39;; line-height: normal;&quot;&gt;&lt;br /&gt;
&lt;/span&gt; &lt;span style=&quot;background-color: white; color: #222222; font-family: &#39;Times New Roman&#39;; line-height: normal;&quot;&gt;Log4j could be initialized by using Log4j configurators. A more convenient way however is to provide a Log4j configuration file as JVM parameter, and let Log4j do the initialization. I will show you how does this work with a small program &amp;nbsp;now:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;  &lt;span style=&quot;background-color: white; color: #222222; font-family: &#39;Times New Roman&#39;; line-height: normal;&quot;&gt;&lt;br /&gt;
&lt;/span&gt; &lt;span style=&quot;color: #3d85c6; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;b&gt;Sample code:&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: #fffff8; border-radius: 6px 6px 6px 6px; border: 1px solid #BBBBBB; padding: 5px 10px 5px;&quot;&gt;
&lt;br /&gt;
package tryl4j;&lt;br /&gt;
&lt;br /&gt;
import org.apache.log4j.Logger;&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
&amp;nbsp;* @author swang&lt;br /&gt;
&amp;nbsp;*&lt;br /&gt;
&amp;nbsp;*/&lt;br /&gt;
public class TryLog4jInit {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;private static final Logger logger = Logger.getLogger(&quot;MyLogger&quot;);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;public static void main(String[] ages) {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;logger.info(&quot;Did you add &amp;nbsp;a &amp;nbsp;JVM param for initializing log4j?&quot;);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;br /&gt;
&lt;br /&gt;
}&lt;/div&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&lt;b&gt;log4j.properties &amp;nbsp;file&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: #fffff8; border-radius: 6px 6px 6px 6px; border: 1px solid #BBBBBB; padding: 5px 10px 5px;&quot;&gt;
&lt;br /&gt;
# Root logger option&lt;br /&gt;
log4j.rootLogger=INFO, stdout&lt;br /&gt;
&lt;br /&gt;
# Direct log messages to stdout&lt;br /&gt;
log4j.appender.stdout=org.apache.log4j.ConsoleAppender&lt;br /&gt;
log4j.appender.stdout.Target=System.out&lt;br /&gt;
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout&lt;br /&gt;
log4j.appender.stdout.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&lt;b&gt;Run the above class with:&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;-Dlog4j.configuration=&quot;file:/tmp/log4j.properties&quot;&lt;br /&gt;
&lt;br /&gt;
And you will see the warning is not showing up and more, and you &amp;nbsp;see the logged info in console:&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: #fffff8; border-radius: 6px 6px 6px 6px; border: 1px solid #BBBBBB; padding: 5px 10px 5px;&quot;&gt;
&lt;br /&gt;
2013-06-23 12:13:17 INFO &amp;nbsp;MyLogger:16 - Did you add &amp;nbsp;a &amp;nbsp;JVM param for&amp;nbsp;&amp;nbsp;initializing&amp;nbsp;log4j?&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
So the JVM parameter works!&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://milestonenext.blogspot.com/feeds/7493287217186113533/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://milestonenext.blogspot.com/2013/06/initializing-log4j.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7515187228721563448/posts/default/7493287217186113533'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7515187228721563448/posts/default/7493287217186113533'/><link rel='alternate' type='text/html' href='http://milestonenext.blogspot.com/2013/06/initializing-log4j.html' title='Initializing Log4j'/><author><name>Beijing Beijing</name><uri>http://www.blogger.com/profile/12013373726184997758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='28' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTm1nk7ZqbPTfBofk6dIg7Zfx820i-FNuXqGbSlZNbRw5-RPJuqgDFNoW_zdgJCMCYj6R5cTGNgNKmwTzeDsEm2EHkqni9ywIanrN-PIRd4Z4yZXUOHhC12zzDid1A1w/s220/profile.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7515187228721563448.post-1908540803416475794</id><published>2013-02-10T23:18:00.002-08:00</published><updated>2013-06-23T03:06:05.707-07:00</updated><title type='text'>JPQL vs. Criteria</title><content type='html'>&lt;br /&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: Lato, arial, sans-serif; font-size: 14px; line-height: 24px;&quot;&gt;
&lt;div style=&quot;margin-left: 10px; margin-right: 10px;&quot;&gt;
&lt;span style=&quot;color: #666666; font-size: xx-small;&quot;&gt;Document &amp;nbsp;Version 1.0&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;releaseinfo&quot; style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; margin-left: 10px; margin-right: 10px;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;background-color: white;&quot;&gt;
&lt;div class=&quot;copyright&quot; style=&quot;margin-left: 10px; margin-right: 10px;&quot;&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: 14px; line-height: 24px;&quot;&gt;
&lt;span style=&quot;color: #666666; font-size: xx-small;&quot;&gt;Copyright © 2012-2013 beijing.beijing.012@gmail.com&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: 14px; line-height: 24px;&quot;&gt;
&lt;span style=&quot;color: #666666; font-size: xx-small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;&lt;span style=&quot;font-size: xx-small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;
&lt;span style=&quot;background-color: white; font-family: &#39;Times New Roman&#39;; line-height: normal;&quot;&gt;JPA 2.0 introduced Criteria API for persistence entity manipulation. For those who has been working with JPQL, the question he &amp;nbsp;might ask himself is: &amp;nbsp;what does JPA Criteria has that JPQL NOT?&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;
&lt;span style=&quot;background-color: white; font-family: &#39;Times New Roman&#39;; line-height: normal;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222;&quot;&gt;
In the following I will try to compare JPQL and Criteria in the following 3 aspects:&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222;&quot;&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Coding efforts&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Usability&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Performance&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
A simple &amp;nbsp;&quot;User.java&quot; persistence entity will be used in test. To make the test simple, we will just test &quot;SELECT&quot; behavior of the JPQL and Criteria.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;1. The persistence entity &quot;User.java&quot;:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
The &quot;User.java&quot; class has only 2 fields:&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;id, of type Long&lt;/li&gt;
&lt;li&gt;name, &amp;nbsp;of type String&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;b&gt;2. Coding Effort: &quot;SELECT&quot; User&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;br /&gt;
&quot;SELECT&quot; using JPQL:&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: #fffff8; border-radius: 6px 6px 6px 6px; border: 1px solid #BBBBBB; padding: 5px 10px 5px;&quot;&gt;
...&lt;br /&gt;
Query &lt;span style=&quot;color: #0b5394;&quot;&gt;q &lt;/span&gt;= &lt;span style=&quot;color: #0b5394;&quot;&gt;em&lt;/span&gt;.createQuery(&lt;span style=&quot;color: #0b5394;&quot;&gt;&quot;SELECT u From User u WHERE u.name=:name&quot;&lt;/span&gt;,&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;User.&lt;span style=&quot;color: #660000;&quot;&gt;class&lt;/span&gt;);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;q&lt;/span&gt;.setParameter(&lt;span style=&quot;color: #0b5394;&quot;&gt;&quot;name&quot;&lt;/span&gt;,&lt;span style=&quot;color: #0b5394;&quot;&gt; &quot;hehe&quot;&lt;/span&gt;);&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;List&amp;lt;User&amp;gt; &lt;span style=&quot;color: #0b5394;&quot;&gt;result&lt;/span&gt; = &lt;span style=&quot;color: #0b5394;&quot;&gt;q&lt;/span&gt;.getResultList();&lt;br /&gt;
...&lt;/div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&quot;SELECT&quot; using Criteria API:&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: #fffff8; border-radius: 6px 6px 6px 6px; border: 1px solid #BBBBBB; padding: 5px 10px 5px;&quot;&gt;
...&lt;br /&gt;
&lt;br /&gt;
CriteriaQuery&amp;lt;User&amp;gt; query =cb.createQuery(User.class);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;Root&amp;lt;User&amp;gt; aUser = query.from(User.class);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;query.where(cb.equal(aUser.&amp;lt;String&amp;gt;get(&quot;name&quot;), cb.parameter(String.class, &quot;userName&quot;)));&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;TypedQuery&amp;lt;User&amp;gt; tq = em.createQuery(query);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;tq.setParameter(&quot;userName&quot;, &quot;hehe&quot;);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;List&amp;lt;User&amp;gt; result = tq.getResultList();&lt;br /&gt;
...&lt;/div&gt;
&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #222222;&quot;&gt;Apparently the coding effort using JPQL is less than that when using Criteria.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #222222;&quot;&gt;&lt;br /&gt;
&lt;/span&gt; &lt;span style=&quot;background-color: white; color: #222222;&quot;&gt;&lt;br /&gt;
&lt;/span&gt; &lt;span style=&quot;background-color: white; color: #222222;&quot;&gt;&lt;br /&gt;
&lt;/span&gt; &lt;b&gt;3. Usability: &quot;SELECT&quot; User&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;color: #222222;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/b&gt; &lt;span style=&quot;background-color: white; color: #222222;&quot;&gt;For someone who is familar with SQL, he might feel very comfortable with JPQL syntax, however Criteria is not so straightforward.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #222222;&quot;&gt;&lt;br /&gt;
&lt;/span&gt; &lt;span style=&quot;background-color: white; color: #222222;&quot;&gt;For someone who use Criteria, he must also know what is SQL &quot;from&quot;, &quot;where&quot;.., so he is not going to have big problem with JPQL.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #222222;&quot;&gt;&lt;br /&gt;
&lt;/span&gt; &lt;span style=&quot;background-color: white; color: #222222;&quot;&gt;&lt;br /&gt;
&lt;/span&gt; &lt;span style=&quot;background-color: white; color: #222222;&quot;&gt;&lt;b&gt;4. Performance &amp;nbsp;&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;color: #222222;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/b&gt; According to JPA documentation, &amp;nbsp;&quot;JPQL&amp;nbsp;query is parsed for each call&quot;, where Criteria NOT, so criteria should perfoms better.&lt;br /&gt;
&lt;br /&gt;
We will take data retrieve as example, to see if and how much is the performance diference actually.&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;
&lt;/b&gt; &lt;b&gt;Test run 1:&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;
&lt;/b&gt; &lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgU9ciKCLUa_tfxgsvQv-QdN13oROS-9U67J3hRzav_0ZI5R6H83TVm70lk8X6mNsXUBFifBlBoLb6enIgTppiqKg73UBbUHGFnixBzBNxfwatjHe0eiPuNuPn3LQfPCrpPqvXgL0ppaMlR/s1600/jpql_vs_criteria_final_1_good.jpeg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgU9ciKCLUa_tfxgsvQv-QdN13oROS-9U67J3hRzav_0ZI5R6H83TVm70lk8X6mNsXUBFifBlBoLb6enIgTppiqKg73UBbUHGFnixBzBNxfwatjHe0eiPuNuPn3LQfPCrpPqvXgL0ppaMlR/s1600/jpql_vs_criteria_final_1_good.jpeg&quot; height=&quot;400&quot; width=&quot;340&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;b&gt;Test run 2:&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEglHSno70LaX0ZPk-g_4hmd60Mrbsy1yPYXXhrvqPv03C-ggPU5-AL9MrYUzmrIkNKDs_PgT5CGbWlv_Do5Xz7yc2DJYzfxsiBHY000grGidQZ5ub7le8ApzxeiW5EDJ4jMUOp4Hc5D19Zy/s1600/jpql_vs_criteria_final_2_good.jpeg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEglHSno70LaX0ZPk-g_4hmd60Mrbsy1yPYXXhrvqPv03C-ggPU5-AL9MrYUzmrIkNKDs_PgT5CGbWlv_Do5Xz7yc2DJYzfxsiBHY000grGidQZ5ub7le8ApzxeiW5EDJ4jMUOp4Hc5D19Zy/s1600/jpql_vs_criteria_final_2_good.jpeg&quot; height=&quot;400&quot; width=&quot;343&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;b&gt;The averave of 2 test runs:&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhin9xkN2DyI_GmikMJzpNHCXEuXFc8_7-Vqtc-VCx3DCuqDJukmV7mOlbajq-h7T4N3rIsIn_sflemKcmXJKmBV-nng8jyUMxqPBd44UIIFNQM8ZQecC8Jwk45-sk30_qyhxOs70hu0UIh/s1600/jpql_vs_criteria_final_average_good.jpeg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhin9xkN2DyI_GmikMJzpNHCXEuXFc8_7-Vqtc-VCx3DCuqDJukmV7mOlbajq-h7T4N3rIsIn_sflemKcmXJKmBV-nng8jyUMxqPBd44UIIFNQM8ZQecC8Jwk45-sk30_qyhxOs70hu0UIh/s1600/jpql_vs_criteria_final_average_good.jpeg&quot; height=&quot;400&quot; width=&quot;340&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;b&gt;The conclusion:&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://milestonenext.blogspot.com/feeds/1908540803416475794/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://milestonenext.blogspot.com/2013/02/jpql-vs-criteria.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7515187228721563448/posts/default/1908540803416475794'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7515187228721563448/posts/default/1908540803416475794'/><link rel='alternate' type='text/html' href='http://milestonenext.blogspot.com/2013/02/jpql-vs-criteria.html' title='JPQL vs. Criteria'/><author><name>Beijing Beijing</name><uri>http://www.blogger.com/profile/12013373726184997758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='28' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTm1nk7ZqbPTfBofk6dIg7Zfx820i-FNuXqGbSlZNbRw5-RPJuqgDFNoW_zdgJCMCYj6R5cTGNgNKmwTzeDsEm2EHkqni9ywIanrN-PIRd4Z4yZXUOHhC12zzDid1A1w/s220/profile.png'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgU9ciKCLUa_tfxgsvQv-QdN13oROS-9U67J3hRzav_0ZI5R6H83TVm70lk8X6mNsXUBFifBlBoLb6enIgTppiqKg73UBbUHGFnixBzBNxfwatjHe0eiPuNuPn3LQfPCrpPqvXgL0ppaMlR/s72-c/jpql_vs_criteria_final_1_good.jpeg" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7515187228721563448.post-4904673532999718239</id><published>2013-02-08T00:05:00.001-08:00</published><updated>2013-02-08T04:01:47.592-08:00</updated><title type='text'>Deploy JAX-WS Web Service on Tomcat and  JBoss</title><content type='html'>&lt;div style=&quot;background-color: white; color: #222222; font-family: Lato, arial, sans-serif; font-size: 14px; line-height: 24px;&quot;&gt;
&lt;div style=&quot;margin-left: 10px; margin-right: 10px;&quot;&gt;
&lt;span style=&quot;color: #666666; font-size: xx-small;&quot;&gt;Document &amp;nbsp;Version 1.0&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;releaseinfo&quot; style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; margin-left: 10px; margin-right: 10px;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; line-height: 17px;&quot;&gt;
&lt;div class=&quot;copyright&quot; style=&quot;margin-left: 10px; margin-right: 10px;&quot;&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: 14px; line-height: 24px;&quot;&gt;
&lt;span style=&quot;color: #666666; font-size: xx-small;&quot;&gt;Copyright © 2012-2013 beijing.beijing.012@gmail.com&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;
&lt;div style=&quot;color: #222222; font-size: 14px;&quot;&gt;
&lt;span style=&quot;color: #666666; font-size: xx-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #222222; font-size: 14px;&quot;&gt;
&lt;br /&gt;
&lt;h3 style=&quot;font-family: &#39;Times New Roman&#39;; line-height: normal; margin: 0px; position: relative;&quot;&gt;
&lt;span style=&quot;background-color: white; color: #351c75; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14px; font-weight: normal; line-height: 17px;&quot;&gt;&lt;b&gt;Keywords:&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: white; color: #351c75; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14px; font-weight: normal; line-height: 17px;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: white; color: #351c75; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14px; line-height: 17px;&quot;&gt;JAX-WS Web Service example, JAX-WS web service deployment Tomcat,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #351c75; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; line-height: 17px;&quot;&gt;JAX-WS web service deployment JBoss Glassfish, web service tutorial&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: white; color: #351c75; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; line-height: 17px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: white; color: #351c75; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14px; font-weight: normal; line-height: 17px;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;background-color: #b2ab66; border-bottom-left-radius: 2px; border-bottom-right-radius: 2px; border-top-left-radius: 2px; border-top-right-radius: 2px; border: 0px none; padding: 5px 10px;&quot;&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;&lt;b&gt;Table of Contents&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;&lt;b&gt;1. Create a Dynamic Web Project in Eclipse&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;b&gt;2. Implement the &quot;JaxWsSample&quot; Web Service&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;b&gt;3. Deploy the Web Service in JEE Container JBoss7&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;b&gt;4.Test &quot;HelloWorld&quot; Web Service using SAOP UI&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp;4.1 Download and install SOAP UI&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp;4.2 Create a new SOAP UI project&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp;4.3 Call &quot;HelloWorld&quot; Web Service&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;b style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;5. Deploy the Web Service in Tomcat 7&lt;/b&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; 5.1 Download Tomcat Extras &amp;nbsp;- &amp;nbsp;&quot;catalina-ws.jar&quot;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; 5.2 Down JAX-WS RI lib&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; 5.3 Configure JAX.WS Servlet and Listener&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; 5.4 Add &quot;sun-jaxws.xml&quot;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; 5.5 Deploy &quot;JaxWsSample.war&quot; in Tomcat 7&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; 5.6&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;b style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;Test &quot;HelloWorld&quot; Web Service using SAOP UI&lt;/b&gt;&lt;br /&gt;
&lt;b style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;&amp;nbsp; &amp;nbsp; 5.7 Does the &quot;HelloWorld&quot; Web Service still work in JBoss 7 ?&lt;/b&gt;&lt;br /&gt;
&lt;b style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;6. To sum it up&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: white; color: #351c75; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14px; font-weight: normal; line-height: 17px;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; color: #351c75; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14px; font-weight: normal; line-height: 17px;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; color: #351c75; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14px; font-weight: normal; line-height: 17px;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
With JAX-WS framework, developmet of Web Service &amp;nbsp;is made very easier and straightworward. No boilerplate code like interfaces are needed any more, configuration is reduced to minmum... &amp;nbsp;A developer can finally focus on the his work, i.e. the problem to solve.&lt;br /&gt;
&lt;br /&gt;
However, dependend on if&amp;nbsp;the underly container is a JEE container or Servlet container, the packaging, deplyoment, and even accessing of JAX-WS is also slightly different. In this post, we will show what are the differences exactly by implementing a simple web service, first deploly it in JBoss 7 application server, and than migrate to Servlet Container Tomcat 7.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;1. Create a Dynamic Web Project in Eclipse&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
As development tool we will use &quot;Eclipse IDE for Java EE Developers&quot;. We assume you have at least basic knowledge of using Eclipse IDE.&lt;br /&gt;
&lt;br /&gt;
Following the steps to create a dynamic web project in Eclipse:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqG8vTJSnf1FyciMt-rAMSO14S0w1egLYhhhtBCrWPdImIf0gOK7ZWOW7UZoMALgK33h-qCKD-WsWdtDdB3AjZF1Bd0zurWXCxyeQBzDXWYAEv7Z697dyrc7v3A0qrmCMPlmTFP1Vr3uaa/s1600/ws_1.jpeg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqG8vTJSnf1FyciMt-rAMSO14S0w1egLYhhhtBCrWPdImIf0gOK7ZWOW7UZoMALgK33h-qCKD-WsWdtDdB3AjZF1Bd0zurWXCxyeQBzDXWYAEv7Z697dyrc7v3A0qrmCMPlmTFP1Vr3uaa/s1600/ws_1.jpeg&quot; height=&quot;305&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Select &quot;Dynamic Web Project&quot;, click &quot;Next&quot;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgB8wZyeep8hxldOv3FHxsGDcbxVkcmFjWV7T1U2fehbj2Np1_1AJZgxUuHwyXSHhfoVmjCiXNVQqarwDh1Gj-ZCNiJhzq-Ic15da9yYRaQ9SMdKLq2nNr6mUcGlNeJ4OFIrZivf1QW_bJ_/s1600/ws_2.jpeg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgB8wZyeep8hxldOv3FHxsGDcbxVkcmFjWV7T1U2fehbj2Np1_1AJZgxUuHwyXSHhfoVmjCiXNVQqarwDh1Gj-ZCNiJhzq-Ic15da9yYRaQ9SMdKLq2nNr6mUcGlNeJ4OFIrZivf1QW_bJ_/s1600/ws_2.jpeg&quot; height=&quot;320&quot; width=&quot;238&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Type &quot;JaxWsSample&quot; as Project Name. In the dropdown list of &quot;Dynamic web module version&quot;, make sure &quot;3.0&quot; is selected. Click &quot;Next&quot;.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgCBitDuR9U6DGrVLQ1BNztvAgWc7FfIcolyEYA9zamMRch46-pyD6gWZK5QVTSSvScj8XfFQZ_GZG3pA3Huq1MzpzWpGvCuTkqbZDmwQPSynPvlwluCM7evfKy_Bp-dIr2_7QrFmrG3acH/s1600/ws_3.jpeg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgCBitDuR9U6DGrVLQ1BNztvAgWc7FfIcolyEYA9zamMRch46-pyD6gWZK5QVTSSvScj8XfFQZ_GZG3pA3Huq1MzpzWpGvCuTkqbZDmwQPSynPvlwluCM7evfKy_Bp-dIr2_7QrFmrG3acH/s1600/ws_3.jpeg&quot; height=&quot;168&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Select checkbox &quot;Genereate web.xml deployment descriptor&quot;, and click &quot;Finish&quot;.&amp;nbsp;Now you have created a web application project named &quot;JaxWsSample&quot; with following directory structure:&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjPJbu6vbMp8koHt3dC87Rxm0PoxzkOfSBD8R2ke6OCnYQ7A9EcvM06X4uh5JuH43cAy-fYCtgkcgoqC2iAYulMv2o2DM13oOSdBppAahhYoC7EoKu7oT5IBcHRyg_BQfU3irrL0BDr8ZM/s1600/ws_4.jpeg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjPJbu6vbMp8koHt3dC87Rxm0PoxzkOfSBD8R2ke6OCnYQ7A9EcvM06X4uh5JuH43cAy-fYCtgkcgoqC2iAYulMv2o2DM13oOSdBppAahhYoC7EoKu7oT5IBcHRyg_BQfU3irrL0BDr8ZM/s1600/ws_4.jpeg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Click and open the file &quot;web.xml&quot;, you will see the file is almost emtpy except the declaration of name space and schemas. For now will leave this file as it is, since no specific configuration is need to do here for deployment on JEE container.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8; border-radius: 6px 6px 6px 6px; border: 1px solid #BBBBBB; padding: 5px 10px 5px;&quot;&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;lt;?xml&lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt; version&lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;&quot;1.0&lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;&quot; &lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;encoding&lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;&quot;UTF-8&quot;&lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;lt;web-app &lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;xmlns:xsi&lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;&quot;http://www.w3.org/2001/XMLSchema-instance&quot;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;&amp;nbsp;xmlns&lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;&quot;http://java.sun.com/xml/ns/javaee&quot;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;&amp;nbsp;xmlns:web&lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;&quot;http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd&quot;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;&amp;nbsp;xsi:schemaLocation&lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;&quot;http://java.sun.com/xml/ns/javaee&lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #073763;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd&quot;&lt;/span&gt;&lt;span style=&quot;color: #073763;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;id&lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;&quot;WebApp_ID&quot;&lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt; version&lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;&quot;3.0&quot;&lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #274e13;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;display-name&amp;gt;&lt;/span&gt;JaxWsSample&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;lt;/display-name&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;lt;/web-app&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;
&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;
&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;2. Implement the &quot;JaxWsSample&quot; Web Service&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;text-align: left;&quot;&gt;We will create a simple &quot;HelloWorld&quot; web service which has only &amp;nbsp;one operation &quot;sayHello&quot;. As mentioned, for JAX-WS &amp;nbsp;style web service,&amp;nbsp;&lt;/span&gt;boilerplate code like interfaces are NOT needed any more. In our case, the impementation of the &quot;HelloWorld&quot; service contains only one class, i,e. &quot;HelloWorld.java&quot;:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: #fffff8; border-radius: 6px 6px 6px 6px; border: 1px solid #BBBBBB; padding: 5px 10px 5px;&quot;&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #660000;&quot;&gt;package&lt;/span&gt; sample.ws;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #660000;&quot;&gt;impor&lt;/span&gt;t javax.jws.WebMethod;&lt;br /&gt;
&lt;span style=&quot;color: #660000;&quot;&gt;import&lt;/span&gt; javax.jws.WebParam;&lt;br /&gt;
&lt;span style=&quot;color: #660000;&quot;&gt;import&lt;/span&gt; javax.jws.WebService;&lt;br /&gt;
&lt;br /&gt;
@WebService()&lt;br /&gt;
&lt;span style=&quot;color: #660000;&quot;&gt;public class&lt;/span&gt; HelloWorld {&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;       &lt;/span&gt;@WebMethod &amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: #274e13;&quot;&gt;//(operationName = &quot;hello&quot;)&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;       &lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;public&lt;/span&gt; String sayHello(@WebParam(name = &lt;span style=&quot;color: #0b5394;&quot;&gt;&quot;name&quot;&lt;/span&gt;) String name) {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #660000;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #0b5394;&quot;&gt;&quot;Hello &quot;&lt;/span&gt; + name +&lt;span style=&quot;color: #0b5394;&quot;&gt; &quot;!&quot;&lt;/span&gt;;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;       &lt;/span&gt;}&lt;br /&gt;
}&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;3. Deploy the Web Service in JEE Container JBoss 7&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;
To deploy the &quot;HelloWorld&quot; service in a JBoss 7 container, there is no extra coding or configuration necessary.&lt;br /&gt;
&lt;br /&gt;
What still need to be done is nothing else than packaging the &amp;nbsp;&quot;JaxWsSample&quot; in a &quot;war&quot; archive, and put it in the &quot;deployments&quot; folder of a running JBoss 7 container.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Start JBoss 7 Application Server in standalone mode&lt;/li&gt;
&lt;li&gt;Export &amp;nbsp;&quot;JaxWsSample&quot; as &quot;JaxWsSample.war&quot;&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBf9YoE9sWfwVzYfdIYGOPqi2WQsQ_94iC9hTtHaRXCZmipHT6Xg1W9LqHW8iUYLpBuxYFxrMRu_aabvXX499yXITSn8Mr1lbpt1H5DbzeEGVhictfFCjqKvbFE5-8YoFMlz3pF6fQu2j3/s1600/ws_export_war_1.jpeg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBf9YoE9sWfwVzYfdIYGOPqi2WQsQ_94iC9hTtHaRXCZmipHT6Xg1W9LqHW8iUYLpBuxYFxrMRu_aabvXX499yXITSn8Mr1lbpt1H5DbzeEGVhictfFCjqKvbFE5-8YoFMlz3pF6fQu2j3/s1600/ws_export_war_1.jpeg&quot; height=&quot;320&quot; width=&quot;309&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;The &quot;Destination&quot; should point to the &quot;deployments&quot; directory of the JBoss installation:&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZpKBxx0lZlADHeU-YZ7O4YDVIqgfIizuamGHRlFL8xVa17cCl2245jKSYsNurIptMOBLEc_beHU6oW6WEsgzrtL_EXGKXiXGMbLTPmCLncSEwZTjUkWr0hBHKqK3Gqg3ZHJ_apbbXEwcA/s1600/ws_export_war_2.jpeg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZpKBxx0lZlADHeU-YZ7O4YDVIqgfIizuamGHRlFL8xVa17cCl2245jKSYsNurIptMOBLEc_beHU6oW6WEsgzrtL_EXGKXiXGMbLTPmCLncSEwZTjUkWr0hBHKqK3Gqg3ZHJ_apbbXEwcA/s1600/ws_export_war_2.jpeg&quot; height=&quot;198&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
We assume the JBoss is up and running, then click &quot;finish&quot; Button in the above window will &amp;nbsp;export the &quot;JaxWsSinmple.war&quot; to JBoss, and the &quot;war&quot; is deployed in JBoss.&lt;br /&gt;
&lt;br /&gt;
Try opening following URL in your Web Browser &quot;http://localhost:8080/JaxWsSample/HelloWorld?wsdl&quot;, you will be shown the &quot;wsdl&quot; file of the &quot;HelloWorld&quot; web service.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;
&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;
&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;4. Test &quot;HelloWorld&quot; Web Service using SOAP UI&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
To test the &quot;HelloWorld&quot; Web Servcie, we need a Web Service Client. We will use SAOP UI for this.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;4.1 Download &amp;nbsp;and install SOAP UI&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
Download SAOP UI from&amp;nbsp;www.soapui.org. After installation, start SOAP UI.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;4.2 Create a &amp;nbsp;new SAOP UI project&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
Create a Web Service (client) project using following WSDL location:&lt;br /&gt;
&amp;nbsp;&quot;http://localhost:8080/JaxWsSample/HelloWorld?wsd&lt;br /&gt;
&lt;br /&gt;
Check the option &quot;Create sample requests for all operations&quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjgpCyBwy_QrrgS1aqaERnqqU4Dzx_lsbfvhLuT0tlo81guM-xV1QA2mHCFpR16DSYcldj3JTm7UEss9bQF9FRJ5jWAcERKyIXnzBpvXrru4n62gQqWv3tbKXOZYyQA4b9RpY2BiMoHQ7Un/s1600/ws_saopui_1.jpeg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjgpCyBwy_QrrgS1aqaERnqqU4Dzx_lsbfvhLuT0tlo81guM-xV1QA2mHCFpR16DSYcldj3JTm7UEss9bQF9FRJ5jWAcERKyIXnzBpvXrru4n62gQqWv3tbKXOZYyQA4b9RpY2BiMoHQ7Un/s1600/ws_saopui_1.jpeg&quot; height=&quot;193&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
After click on the &quot;OK&quot; button, a &quot;HelloWorld&quot; web service client is created in SOAP UI. Open &quot;Request 1&quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&amp;nbsp;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1M3jhy5T_J7pfZI41nvmU5imGfbqg0b6DkRTM519nES8Dfs0FMTt5fWmPyXF11rU_bfC_jnbWFNlDgL6MUjv505fO-Mb0USSF6tvoOT2pRtDCk0Lwp9Kzkwq2WW3QewWq_0A8jjjgPU35/s1600/ws_saopui_2.jpeg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1M3jhy5T_J7pfZI41nvmU5imGfbqg0b6DkRTM519nES8Dfs0FMTt5fWmPyXF11rU_bfC_jnbWFNlDgL6MUjv505fO-Mb0USSF6tvoOT2pRtDCk0Lwp9Kzkwq2WW3QewWq_0A8jjjgPU35/s1600/ws_saopui_2.jpeg&quot; height=&quot;173&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;span style=&quot;text-align: -webkit-auto;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;span style=&quot;text-align: -webkit-auto;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;span style=&quot;text-align: -webkit-auto;&quot;&gt;&lt;b&gt;4.3 Call &quot;HelloWorld&quot; Web Service&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;span style=&quot;text-align: -webkit-auto;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;span style=&quot;text-align: -webkit-auto;&quot;&gt;Replace the &quot;?&quot; &amp;nbsp;with text &quot;hehe&quot; for the &quot;name&quot; tag of &quot;Request 1&quot;. Click the green run button to execute the &quot;sayHello&quot; web service call.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;span style=&quot;text-align: -webkit-auto;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;span style=&quot;text-align: -webkit-auto;&quot;&gt;The result of the web service call is show in the &quot;response window&quot;:&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;span style=&quot;text-align: -webkit-auto;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjasGpz2Qf8YJBZCDlkHe0fiElt29NIBUfXZYmAANykOPeMQawawpEz1m3ivaEHrXjpNV2BVnAoAooflz_K0rst_TIk1yCVole47gaQ1WmHC52uUbjQigUeJ1vLztOf58xHVqHjH4iTeg1U/s1600/ws_saopui_3.jpeg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjasGpz2Qf8YJBZCDlkHe0fiElt29NIBUfXZYmAANykOPeMQawawpEz1m3ivaEHrXjpNV2BVnAoAooflz_K0rst_TIk1yCVole47gaQ1WmHC52uUbjQigUeJ1vLztOf58xHVqHjH4iTeg1U/s1600/ws_saopui_3.jpeg&quot; height=&quot;91&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;
&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;
&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;5. Deploy the Web Service in Tomcat 7&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In this section we will try to deploy the &quot;HelloWorld&quot; &amp;nbsp;web service in a servlet container, i.e. Tomcat 7.&lt;br /&gt;
&lt;br /&gt;
Different from JEE Conainer, Tomcat does NOT support JAX-WS out of box. To enable JAX-WS, followings have to be done:&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;include &quot;catalina-ws.jar&quot; in Tomcat lib&lt;/li&gt;
&lt;li&gt;include &quot;JAX-WS RI&quot; libs&lt;/li&gt;
&lt;li&gt;configure &quot;jax-ws servlet&quot; in web.xml&lt;/li&gt;
&lt;li&gt;add &quot;sun-jaxws-xml&quot;&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;5.1 Download Tomcat Extras - &quot;catalina-ws.jar&quot;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;br /&gt;
Standard Tomcat delivery does NOT has libs supporting JAX-WS. We need to import &quot;catalina-ws.jar&quot; in Tomcat&#39;s &quot;lib&quot; directory.&amp;nbsp;&quot;catlina-ws.jar&quot; belongs to Tomcat Extras, which could be downloaded here:&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://mirror.synyx.de/apache/tomcat/tomcat-7/v7.0.35/bin/extras/&quot;&gt;http://mirror.synyx.de/apache/tomcat/tomcat-7/v7.0.35/bin/extras/&lt;/a&gt;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;b&gt;5.2 Download JAX-WS RI libs&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
We need to include the JAX-WS runtime libs, i.e. JAX-WS RI (referencial implementation) in Tomcat. The lateste JAX-WS RI (2.2.7) could be downloaded here:&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://jax-ws.java.net/2.2.7/&quot;&gt;http://jax-ws.java.net/2.2.7/&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Download and extract the arcive to you favorite location, for example to:&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: #fffff8; border-radius: 6px 6px 6px 6px; border: 1px solid #BBBBBB; padding: 5px 10px 5px;&quot;&gt;
&lt;br /&gt;
he@linux-7s1k:~/programms/jaxws-ri&amp;gt;&lt;br /&gt;
drwxr-xr-x &amp;nbsp;2 he users &amp;nbsp;4096 13. Aug 13:54 bin&lt;br /&gt;
-rw-r--r-- &amp;nbsp;1 he users &amp;nbsp;7405 13. Aug 13:54 build.xml&lt;br /&gt;
-rw-r--r-- &amp;nbsp;1 he users 38052 13. Aug 13:54 CDDL+GPLv2.txt&lt;br /&gt;
-rw-r--r-- &amp;nbsp;1 he users &amp;nbsp;1673 13. Aug 13:54 distributionREADME_WMforJava2.0.txt&lt;br /&gt;
drwxr-xr-x &amp;nbsp;6 he users &amp;nbsp;4096 13. Aug 13:54 docs&lt;br /&gt;
drwxr-xr-x &amp;nbsp;3 he users &amp;nbsp;4096 &amp;nbsp;6. Jan 18:18 lib&lt;br /&gt;
-rw-r--r-- &amp;nbsp;1 he users 38052 13. Aug 13:54 LICENSE.txt&lt;br /&gt;
-rw-r--r-- &amp;nbsp;1 he users &amp;nbsp;1039 13. Aug 13:54 README&lt;br /&gt;
drwxr-xr-x 39 he users &amp;nbsp;4096 13. Aug 13:54 samples&lt;br /&gt;
-rw-r--r-- &amp;nbsp;1 he users 38607 13. Aug 13:54 ThirdPartyLicense.txt&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
The JAX-WS RI jars could be made available to Tomcat by including them in Tomcat&#39;s lib directory. Or you can include the jars in you Web Application&#39;s lib directory, in such case, the jars will be only available to the including Web Application.&lt;br /&gt;
&lt;br /&gt;
We will take the second option and&amp;nbsp;copy all jar files under&lt;br /&gt;
&lt;br /&gt;
&quot;&lt;span style=&quot;background-color: #fffff8;&quot;&gt;/jaxws-ri/lib/&lt;/span&gt;&quot;&lt;br /&gt;
&lt;br /&gt;
to&lt;br /&gt;
&lt;br /&gt;
&quot;JaxWsSample&quot; Eclipse project, and put the jars under&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&quot;&lt;span style=&quot;background-color: #fffff8;&quot;&gt;/WebContent/WEB-INF/lib&lt;/span&gt;&quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;5.3 Configure jax-ws servlet&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
Change &quot;web.xml&quot; file by adding &amp;nbsp;a &quot;WSServletContextListener&quot; and a &quot;WSServlet&quot;:&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: #fffff8; border-radius: 6px 6px 6px 6px; border: 1px solid #BBBBBB; padding: 5px 10px 5px;&quot;&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;lt;?xml&lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;&amp;nbsp;version&lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;&quot;1.0&lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;&quot;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;encoding&lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;&quot;UTF-8&quot;&lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;lt;web-app&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;xmlns:xsi&lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;&quot;http://www.w3.org/2001/XMLSchema-instance&quot;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;&amp;nbsp;xmlns&lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;&quot;http://java.sun.com/xml/ns/javaee&quot;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;&amp;nbsp;xmlns:web&lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;&quot;http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd&quot;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;&amp;nbsp;xsi:schemaLocation&lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;&quot;http://java.sun.com/xml/ns/javaee&lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #073763;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd&quot;&lt;/span&gt;&lt;span style=&quot;color: #073763;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;id&lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;&quot;WebApp_ID&quot;&lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;&amp;nbsp;version&lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;&quot;3.0&quot;&lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #274e13;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;display-name&amp;gt;&lt;/span&gt;JaxWsSample&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;lt;/display-name&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;listener&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #274e13;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;&amp;lt;listener-class&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #274e13; white-space: pre;&quot;&gt;    &lt;/span&gt;com.sun.xml.ws.transport.http.servlet.WSServletContextListener&lt;br /&gt;
&lt;span style=&quot;color: #274e13;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;&amp;lt;/listener-class&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #274e13;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&amp;lt;/listener&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #274e13;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #274e13;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&amp;lt;servlet&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #274e13;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;&amp;lt;servlet-name&amp;gt;&lt;/span&gt;hello&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;lt;/servlet-name&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #274e13;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;&amp;lt;servlet-class&amp;gt;&lt;/span&gt;com.sun.xml.ws.transport.http.servlet.WSServlet&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;lt;/servlet-class&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #274e13;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;&amp;lt;load-on-startup&amp;gt;1&amp;lt;/load-on-startup&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #274e13;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&amp;lt;/servlet&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #274e13;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&amp;lt;servlet-mapping&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #274e13;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;&amp;lt;servlet-name&amp;gt;&lt;/span&gt;hello&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;lt;/servlet-name&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #274e13;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;&amp;lt;url-pattern&amp;gt;&lt;/span&gt;/hello/*&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;lt;/url-pattern&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #274e13;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&amp;lt;/servlet-mapping&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;lt;/web-app&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;b&gt;5.4 Add &quot;sun-jaxws.xml&quot;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&amp;nbsp; Create a &quot;sun-jaxws.xml&quot; file in &quot;WEN-INF&quot; directory with following content:&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: #fffff8; border-radius: 6px 6px 6px 6px; border: 1px solid #BBBBBB; padding: 5px 10px 5px;&quot;&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;lt;?xml &lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;version&lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;&quot;1.0&quot;&lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt; encoding&lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;&quot;UTF-8&quot;&lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;lt;endpoints&lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt; xmlns&lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;&quot;http://java.sun.com/xml/ns/jax-ws/ri/runtime&quot;&lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt; version&lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;&quot;2.0&quot;&lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #274e13;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;lt;endpoint &lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;&quot;HelloWorld&quot;&lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt; i&lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;mplementation&lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;&quot;sample.ws.HelloWorld&quot;&lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;url-patter&lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;n=&quot;&lt;/span&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;/hello&quot;&lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;lt;/endpoints&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;
&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;5.5 Deploy &quot;JaxWsSample.war&quot; in Tomcat 7&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;br /&gt;
We assume the Tomcat 7 is up and running. Export the &quot;JaxWsSample&quot; project as &quot;war&quot; archive in Tomcat&#39;s &quot;webapps&quot; direcdory. The deployment will be successful ff you see following info in Tomcat console:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: #fffff8; border-radius: 6px 6px 6px 6px; border: 1px solid #BBBBBB; padding: 5px 10px 5px;&quot;&gt;
&lt;br /&gt;
...&lt;br /&gt;
06.02.2013 19:21:49 org.apache.catalina.startup.HostConfig deployWAR&lt;br /&gt;
INFO: Deploying web application archive /home/he/apache-tomcat-7.0.29/webapps/JaxWsSample.war&lt;br /&gt;
06.02.2013 19:21:53 com.sun.xml.ws.transport.http.servlet.WSServletDelegate &amp;lt;init&amp;gt;&lt;br /&gt;
INFO: WSSERVLET14: Initialisierung von JAX-WS-Servlet&lt;br /&gt;
06.02.2013 19:21:53 com.sun.xml.ws.transport.http.servlet.WSServletContextListener contextInitialized&lt;br /&gt;
INFO: WSSERVLET12: Initialisierung von JAX-WS-Kontext-Listener&lt;br /&gt;
06.02.2013 19:21:53 com.sun.xml.ws.transport.http.servlet.WSServletContextListener contextInitialized&lt;br /&gt;
INFO: WSSERVLET12: Initialisierung von JAX-WS-Kontext-Listener&lt;br /&gt;
&lt;div&gt;
...&lt;/div&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
Try opening following URL in your Web Browser &quot;http://localhost:8080/JaxWsSample/&lt;b&gt;hello&lt;/b&gt;?wsdl&quot;, you will be shown the &quot;wsdl&quot; file of the &quot;HelloWorld&quot; web service.&lt;br /&gt;
&lt;br /&gt;
Please NOTE, the URL to Web Service and WSDL is different as those in JBoss.&lt;br /&gt;
In Tomcat:&lt;br /&gt;
http://localhost:8080/JaxWsSample/&lt;b&gt;hello&lt;/b&gt;?wsdl&lt;br /&gt;
&lt;br /&gt;
In JBoss:&lt;br /&gt;
http://localhost:8080/JaxWsSample/&lt;b&gt;HelloWorld&lt;/b&gt;?wsdl&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;5.6 Test &quot;HelloWorld&quot; web service using SAOP UI&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Repeat section 4.2-4.3 to test &quot;HelloWorld&quot; web service, when create web service client in SOAP UI, be sure to use &quot;http://localhost:8080/JaxWsSample/&lt;b&gt;hello&lt;/b&gt;?wsdl&quot; for WSDL location.&lt;br /&gt;
&lt;br /&gt;
When you have followed all the steps without mistake till now, you would see the correct response of &quot;sayHello&quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;5.7 Does the &quot;HalloWorld&quot; web service still work when deployed in JBoss 7&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
Now we have successed &quot;migrated&quot; a JAX-WS web service running on JBoss 7 to Tomcat 7. You might wounder, after all these changes, does the &quot;HelloWorld&quot; service still work in JBoss 7 ? We will find it out now.&lt;br /&gt;
&lt;br /&gt;
Stop Tomcat 7, and hence stop &quot;HelloWorld&quot; in Tomcat.&lt;br /&gt;
Start JBoss 7 standardalone server&lt;br /&gt;
Copy &quot;JaxWsSample.war&quot; from Tomcat &quot;webapps&quot; directory to &amp;nbsp;&lt;span style=&quot;text-align: left;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;text-align: left;&quot;&gt;&quot;deployments&quot; directory of the JBoss installation.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;text-align: left;&quot;&gt;You would see following info in JBoss 7 console:&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8; border-radius: 6px 6px 6px 6px; border: 1px solid #BBBBBB; padding: 5px 10px 5px;&quot;&gt;
&lt;br /&gt;
...&lt;br /&gt;
21:31:33,602 INFO &amp;nbsp;[org.jboss.wsf.stack.cxf.metadata.MetadataBuilder] (MSC service thread 1-2) Add Service&lt;br /&gt;
&amp;nbsp;id=sample.ws.HelloWorld&lt;br /&gt;
&amp;nbsp;address=http://localhost:8080/SampleWS/HelloWorld&lt;br /&gt;
&amp;nbsp;implementor=sample.ws.HelloWorld&lt;br /&gt;
&amp;nbsp;invoker=org.jboss.wsf.stack.cxf.JBossWSInvoker&lt;br /&gt;
&amp;nbsp;serviceName={http://ws.sample/}HelloWorldService&lt;br /&gt;
&amp;nbsp;portName={http://ws.sample/}HelloWorldPort&lt;br /&gt;
&amp;nbsp;wsdlLocation=null&lt;br /&gt;
&amp;nbsp;mtomEnabled=false&lt;br /&gt;
21:31:33,698 INFO &amp;nbsp;[org.jboss.wsf.stack.cxf.metadata.MetadataBuilder] (MSC service thread 1-1) Add Service&lt;br /&gt;
&amp;nbsp;id=sample.ws.HelloWorld&lt;br /&gt;
&amp;nbsp;address=http://localhost:8080/JaxWsSample/HelloWorld&lt;br /&gt;
&amp;nbsp;implementor=sample.ws.HelloWorld&lt;br /&gt;
&amp;nbsp;invoker=org.jboss.wsf.stack.cxf.JBossWSInvoker&lt;br /&gt;
&amp;nbsp;serviceName={http://ws.sample/}HelloWorldService&lt;br /&gt;
&amp;nbsp;portName={http://ws.sample/}HelloWorldPort&lt;br /&gt;
&amp;nbsp;wsdlLocation=null&lt;br /&gt;
&amp;nbsp;mtomEnabled=false&lt;br /&gt;
&lt;div&gt;
..&lt;/div&gt;
&lt;/div&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
The above info indicates that the deployment in JBoss till works!&lt;br /&gt;
&lt;br /&gt;
Further more, you would find that the &quot;HelloWorld&quot; web service works too, and the service is even access able under 2 URLs:&lt;br /&gt;
http://localhost:8080/JaxWsSample/hello?wsdl&lt;br /&gt;
http://localhost:8080/JaxWsSample/HelloWorld?wsdl&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;
&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;6. To sum it up&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;
&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;
</content><link rel='replies' type='application/atom+xml' href='http://milestonenext.blogspot.com/feeds/4904673532999718239/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://milestonenext.blogspot.com/2013/02/jax-ws-web-service-on-tomcat-and-jboss.html#comment-form' title='8 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7515187228721563448/posts/default/4904673532999718239'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7515187228721563448/posts/default/4904673532999718239'/><link rel='alternate' type='text/html' href='http://milestonenext.blogspot.com/2013/02/jax-ws-web-service-on-tomcat-and-jboss.html' title='Deploy JAX-WS Web Service on Tomcat and  JBoss'/><author><name>Beijing Beijing</name><uri>http://www.blogger.com/profile/12013373726184997758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='28' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTm1nk7ZqbPTfBofk6dIg7Zfx820i-FNuXqGbSlZNbRw5-RPJuqgDFNoW_zdgJCMCYj6R5cTGNgNKmwTzeDsEm2EHkqni9ywIanrN-PIRd4Z4yZXUOHhC12zzDid1A1w/s220/profile.png'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqG8vTJSnf1FyciMt-rAMSO14S0w1egLYhhhtBCrWPdImIf0gOK7ZWOW7UZoMALgK33h-qCKD-WsWdtDdB3AjZF1Bd0zurWXCxyeQBzDXWYAEv7Z697dyrc7v3A0qrmCMPlmTFP1Vr3uaa/s72-c/ws_1.jpeg" height="72" width="72"/><thr:total>8</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7515187228721563448.post-104135068032497292</id><published>2012-12-29T22:02:00.002-08:00</published><updated>2013-01-29T05:10:02.884-08:00</updated><title type='text'> Tutorial EJB3 Integration Test  with Arquillian part4 - JBoss 5 managed container and TestNG</title><content type='html'>&lt;div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: Lato, arial, sans-serif; font-size: 14px; line-height: 24px;&quot;&gt;
&lt;div style=&quot;margin-left: 10px; margin-right: 10px;&quot;&gt;
&lt;span style=&quot;color: #666666; font-size: xx-small;&quot;&gt;Document &amp;nbsp;Version 1.0&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;releaseinfo&quot; style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; margin-left: 10px; margin-right: 10px;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div class=&quot;copyright&quot; style=&quot;margin-left: 10px; margin-right: 10px;&quot;&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: 14px; line-height: 24px;&quot;&gt;
&lt;span style=&quot;color: #666666; font-size: xx-small;&quot;&gt;Copyright © 2012-2013 beijing.beijing.012@gmail.com&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div style=&quot;background-color: white; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;h3 style=&quot;font-family: &#39;Times New Roman&#39;; line-height: normal;&quot;&gt;
&lt;span style=&quot;background-color: white; color: #351c75; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14px; font-weight: normal; line-height: 17px;&quot;&gt;&lt;b&gt;Keywords:&lt;/b&gt;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14px; font-weight: normal; line-height: 17px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #351c75; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14px; font-weight: normal; line-height: 17px;&quot;&gt;JEE integration test, JEE unit test, arquillian sample, JBoss 5, JBoss 7, EJB test, arquillian dependencies, arquillian enbedded container, managed&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #351c75; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14px; font-weight: normal; line-height: 17px;&quot;&gt;container, remote container, arquilllian TestNG&lt;/span&gt;&lt;/h3&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: white; color: #351c75; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14px; font-weight: normal; line-height: 17px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;color: #444444;&quot;&gt;&lt;a href=&quot;http://milestonenext.blogspot.de/2012/12/ejb3-integration-test-with-arquillian.html&quot; style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: #444444;&quot;&gt;Part - 1&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;a href=&quot;http://milestonenext.blogspot.de/2012/12/ejb3-integration-test-with-arquillian_17.html&quot; style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: #444444;&quot;&gt;Part - 2&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a href=&quot;http://milestonenext.blogspot.de/2012/12/tutorial-ejb3-integration-test-with.html&quot; style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: #444444;&quot;&gt;Part - 3&lt;/span&gt;&amp;nbsp;&lt;/a&gt;&lt;/span&gt;&lt;span style=&quot;color: #444444; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;a href=&quot;http://milestonenext.blogspot.de/2012/12/tutorial-ejb3-integration-test-with_29.html&quot; style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;Part - 4&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white;&quot;&gt;
&lt;div style=&quot;background-color: #b2ab66; border-bottom-left-radius: 2px; border-bottom-right-radius: 2px; border-top-left-radius: 2px; border-top-right-radius: 2px; border: 0px none; padding: 5px 10px;&quot;&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;&lt;b&gt;Table of Contents&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #444444; line-height: 24px;&quot;&gt;&lt;b&gt;1. Create a simple Maven project in Eclipse&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #444444; line-height: 24px;&quot;&gt;&lt;b&gt;2. Create project&#39;s pom.xml file&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #444444; line-height: 24px;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; 2.1 Replace the JUnit dedendency&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #444444; line-height: 24px;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; 2.2 Replaced the &quot;arquillian-junit-container &amp;nbsp;dedendency&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #444444; line-height: 24px;&quot;&gt;&lt;b&gt;3. Implement source code and test code&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #444444; line-height: 24px;&quot;&gt;&lt;b&gt;4. persistence.xml&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #444444; line-height: 24px;&quot;&gt;&lt;b&gt;5. java:/DefaultDS&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #444444; line-height: 24px;&quot;&gt;&lt;b&gt;6. arquillian.xml&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #444444; line-height: 24px;&quot;&gt;&lt;b&gt;7. Configuring TestNG &quot;testng.xml&quot;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #444444; line-height: 24px;&quot;&gt;&lt;b&gt;8. Run test&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white; line-height: 24px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;span style=&quot;color: #e06666; font-size: large;&quot;&gt;I&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt; prefer TestNG to JUnit mainly for 2 reasons:&lt;/span&gt;&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;color: #444444;&quot;&gt;the various posibilities TestNG provides to configure and group tests.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color: #444444;&quot;&gt;the facilities of TestNG to test thread and concurrencies&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;Having shown Arquillian test with JUnit &amp;nbsp;in the past, in this post we will see :&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;color: #444444;&quot;&gt;how to switch from JUnit to TestNG with Arquillian&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color: #444444;&quot;&gt;JPA / Entity Bean Testing with Arquillian.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b style=&quot;background-color: white; color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;1. Create a simple Maven project in Eclipse&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b style=&quot;background-color: white; color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14px; line-height: 17px;&quot;&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;Follow the section 1 of &quot;&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;EJB3 Integration Test with Arquillian part1-JBoss 7 managed container&quot; to create a new Eclipse project &quot;&lt;/span&gt;testarq_jb5_managed_testng&lt;span style=&quot;background-color: white;&quot;&gt;&quot;. Be sure in step2, to name the ArtifactId as &quot;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14px; line-height: 17px;&quot;&gt;testarq_jb5_managed_testng&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14px; line-height: 17px;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&quot;.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14px; line-height: 17px;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; line-height: 17px;&quot;&gt;&lt;/span&gt;&lt;b style=&quot;background-color: white; color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;2. Create project&#39;s pom.xml file&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b style=&quot;background-color: white; color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
The &quot;pom.xml&quot; for TestNG is just slightly different from that of Turtorial &amp;nbsp;part - 3:&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;span style=&quot;color: #444444;&quot;&gt;&lt;b&gt;2.1 Replace the JUnit dedendency:&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: #fffff8; border-radius: 6px 6px 6px 6px; border: 1px solid #BBBBBB; padding: 5px 10px 5px;&quot;&gt;
&lt;span style=&quot;color: #0b5394; font-family: Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #444444; white-space: pre;&quot;&gt;         &lt;/span&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;junit&lt;/span&gt;&lt;span style=&quot;color: #0b5394; font-family: Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #444444; white-space: pre;&quot;&gt;         &lt;/span&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;junit&lt;/span&gt;&lt;span style=&quot;color: #0b5394; font-family: Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #444444; white-space: pre;&quot;&gt;         &lt;/span&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;&amp;lt;version&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;4.8.1&lt;/span&gt;&lt;span style=&quot;color: #0b5394; font-family: Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;&amp;lt;/version&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span style=&quot;color: #444444;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;&amp;lt;scope&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;test&lt;/span&gt;&lt;span style=&quot;color: #0b5394; font-family: Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;&amp;lt;/scope&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0b5394; font-family: Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;b style=&quot;background-color: #fffff8; color: #444444;&quot;&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b style=&quot;background-color: #fffff8; color: #444444;&quot;&gt;with TestNG dependency:&lt;/b&gt;&lt;br /&gt;
&lt;b style=&quot;background-color: #fffff8; color: #444444;&quot;&gt;&lt;br /&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: #fffff8; border-radius: 6px 6px 6px 6px; border: 1px solid #BBBBBB; padding: 5px 10px 5px;&quot;&gt;
&lt;span style=&quot;color: #0b5394; font-family: Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #444444; white-space: pre;&quot;&gt;         &lt;/span&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;org.testng&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #0b5394; font-family: Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #444444; white-space: pre;&quot;&gt;         &lt;/span&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;testng&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #0b5394; font-family: Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #444444; white-space: pre;&quot;&gt;         &lt;/span&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;&amp;lt;version&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;6.1.1&lt;/span&gt;&lt;span style=&quot;color: #0b5394; font-family: Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;&amp;lt;/version&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span style=&quot;color: #444444;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;&amp;lt;scope&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;test&lt;/span&gt;&lt;span style=&quot;color: #0b5394; font-family: Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;&amp;lt;/scope&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0b5394; font-family: Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #674ea7;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: #674ea7;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;b style=&quot;background-color: #fffff8; color: #444444;&quot;&gt;2.2 Replaced the &quot;arquillian-junit-container &amp;nbsp;dedendency:&lt;/b&gt;&lt;br /&gt;
&lt;b style=&quot;background-color: #fffff8; color: #444444;&quot;&gt;&lt;br /&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: #fffff8; border-radius: 6px 6px 6px 6px; border: 1px solid #BBBBBB; padding: 5px 10px 5px;&quot;&gt;
&lt;span style=&quot;color: #0b5394;&quot;&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0b5394;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;&amp;nbsp;        &lt;/span&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;org.jboss.arquillian.juni&lt;/span&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;t&amp;lt;/groupId&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;         &lt;/span&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;arquillian-junit-container&lt;/span&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;         &lt;/span&gt;&amp;lt;version&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;${version.arquillian_core}&lt;/span&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;&amp;lt;/version&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;          &lt;/span&gt;&amp;lt;scope&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;tes&lt;/span&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;t&amp;lt;/scop&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0b5394;&quot;&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;b style=&quot;color: #444444;&quot;&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b style=&quot;color: #444444;&quot;&gt;with &quot;arquillian-testng-container&quot;:&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0b5394;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: #fffff8; border-radius: 6px 6px 6px 6px; border: 1px solid #BBBBBB; padding: 5px 10px 5px;&quot;&gt;
&lt;span style=&quot;color: #0b5394;&quot;&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0b5394;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;&amp;nbsp;        &lt;/span&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;org.jboss.arquillian.testng&lt;/span&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;         &lt;/span&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;arquillian-testng-container&lt;/span&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;         &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;&amp;lt;version&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;${version.arquillian_core}&lt;/span&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;&amp;lt;/version&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0b5394;&quot;&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;b style=&quot;background-color: white; color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;
&lt;b style=&quot;background-color: white; color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;
&lt;b style=&quot;background-color: white; color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;3. Implement source code and test code&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br style=&quot;background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14px; line-height: 17px;&quot; /&gt;
&lt;span style=&quot;background-color: white; color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: 14px; line-height: 17px;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;As code sample we will take a typical use case in JEE application:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: 14px; line-height: 17px;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;A business layer/class uses a DAO (data access object) to access business data. Here business class and DAO class are both stateless session bean.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: 14px; line-height: 17px;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14px; line-height: 17px;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: 14px; line-height: 17px;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;To implement and test the above use case, we need to create following classes in the &quot;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14px; line-height: 17px;&quot;&gt;testarq_jb5_managed_testng&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: 14px; line-height: 24px;&quot;&gt;&quot; project:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: 14px; line-height: 24px;&quot;&gt;2 for bussiness classes:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: 14px; line-height: 17px;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;b&gt;GrussGottEjbLocal.java&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: 14px; line-height: 17px;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;b&gt;GrussGottEjb.java&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: 14px; line-height: 17px;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14px; line-height: 17px;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: 14px; line-height: 24px;&quot;&gt;2 for DAO classes:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: 14px; line-height: 17px;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;b&gt;UserDaoLocal.java&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: 14px; line-height: 17px;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;b&gt;UserDao.java&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: 14px; line-height: 17px;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: 14px; line-height: 24px;&quot;&gt;The User Entity class:&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: 14px; line-height: 17px;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14px; line-height: 17px;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: 14px; line-height: 24px;&quot;&gt;and the test class:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: 14px; line-height: 17px;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;b&gt;User.java&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: 14px; line-height: 17px;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: 14px; line-height: 24px;&quot;&gt;And the test class:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: 14px; line-height: 24px;&quot;&gt;&lt;b&gt;TestGrussGott.java&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: 14px; line-height: 24px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14px; line-height: 17px;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: 14px; line-height: 17px;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;Now the &quot;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14px; line-height: 17px;&quot;&gt;testarq_jb5_managed_testng&quot;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: 14px; line-height: 24px;&quot;&gt;&amp;nbsp;project in Eclipse will looks like:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: 14px; line-height: 24px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;


&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_Yjpmz_UtJ5HeFwJPezHN3xf7sVqGrCdZVC_-poXiNZKpnb__V8isB140cc4S8KSUdPRoGXnq57_m6eKou3c2vb5e80E7Memj816anZNkzisEqGXt9FV05AsIEswen3X5X1qK6REyNuIr/s1600/tag_cloud12.jpeg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_Yjpmz_UtJ5HeFwJPezHN3xf7sVqGrCdZVC_-poXiNZKpnb__V8isB140cc4S8KSUdPRoGXnq57_m6eKou3c2vb5e80E7Memj816anZNkzisEqGXt9FV05AsIEswen3X5X1qK6REyNuIr/s1600/tag_cloud12.jpeg&quot; height=&quot;320&quot; width=&quot;237&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;b style=&quot;background-color: #fffff8; color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px; text-align: -webkit-auto;&quot;&gt;User.java&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8; border-radius: 6px 6px 6px 6px; border: 1px solid #BBBBBB; padding: 5px 10px 5px;&quot;&gt;
&lt;span style=&quot;color: #660000; font-family: Times, &#39;Times New Roman&#39;, serif; font-size: 14px; line-height: 24px;&quot;&gt;package&lt;/span&gt;&lt;span style=&quot;color: #444444; font-family: Times, &#39;Times New Roman&#39;, serif; font-size: 14px; line-height: 24px;&quot;&gt; test.ejb;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Times, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;color: #660000; font-size: 14px; line-height: 24px;&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;color: #444444; font-size: 14px; line-height: 24px;&quot;&gt; java.io.Serializable;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #660000; font-family: Times, Times New Roman, serif; font-size: 14px; line-height: 24px;&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;color: #444444; font-family: Times, Times New Roman, serif; font-size: 14px; line-height: 24px;&quot;&gt; javax.persistence.Column;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #660000; font-family: Times, Times New Roman, serif; font-size: 14px; line-height: 24px;&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;color: #444444; font-family: Times, Times New Roman, serif; font-size: 14px; line-height: 24px;&quot;&gt; javax.persistence.Entity;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #660000; font-family: Times, Times New Roman, serif; font-size: 14px; line-height: 24px;&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;color: #444444; font-family: Times, Times New Roman, serif; font-size: 14px; line-height: 24px;&quot;&gt; javax.persistence.GeneratedValue;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #660000; font-family: Times, Times New Roman, serif; font-size: 14px; line-height: 24px;&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;color: #444444; font-family: Times, Times New Roman, serif; font-size: 14px; line-height: 24px;&quot;&gt; javax.persistence.Id;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #660000; font-family: Times, Times New Roman, serif; font-size: 14px; line-height: 24px;&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;color: #444444; font-family: Times, Times New Roman, serif; font-size: 14px; line-height: 24px;&quot;&gt; javax.persistence.Version;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Times, Times New Roman, serif; font-size: 14px; line-height: 24px;&quot;&gt;@Entity&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #660000; font-family: Times, Times New Roman, serif; font-size: 14px; line-height: 24px;&quot;&gt;public class&lt;/span&gt;&lt;span style=&quot;color: #444444; font-family: Times, Times New Roman, serif; font-size: 14px; line-height: 24px;&quot;&gt; User&lt;/span&gt;&lt;span style=&quot;color: #660000; font-family: Times, Times New Roman, serif; font-size: 14px; line-height: 24px;&quot;&gt; implements&lt;/span&gt;&lt;span style=&quot;color: #444444; font-family: Times, Times New Roman, serif; font-size: 14px; line-height: 24px;&quot;&gt; Serializable {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Times, Times New Roman, serif; font-size: 14px; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span style=&quot;color: #444444;&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;private static final long&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #444444; font-family: Times, Times New Roman, serif; font-size: 14px; line-height: 24px;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #351c75; font-family: Times, Times New Roman, serif; font-size: 14px; line-height: 24px;&quot;&gt;serialVersionUID&lt;/span&gt;&lt;span style=&quot;color: #444444; font-family: Times, Times New Roman, serif; font-size: 14px; line-height: 24px;&quot;&gt; = 1L;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Times, Times New Roman, serif; font-size: 14px; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;       &lt;/span&gt;@Id&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Times, Times New Roman, serif; font-size: 14px; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;       &lt;/span&gt;@GeneratedValue&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Times, Times New Roman, serif; font-size: 14px; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #444444; white-space: pre;&quot;&gt;       &lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;private&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #444444; font-family: Times, Times New Roman, serif; font-size: 14px; line-height: 24px;&quot;&gt; Long&lt;/span&gt;&lt;span style=&quot;color: #351c75; font-family: Times, Times New Roman, serif; font-size: 14px; line-height: 24px;&quot;&gt; id&lt;/span&gt;&lt;span style=&quot;color: #444444; font-family: Times, Times New Roman, serif; font-size: 14px; line-height: 24px;&quot;&gt;;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Times, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;color: #444444; font-size: 14px; line-height: 24px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #444444; white-space: pre;&quot;&gt;       &lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;@Column(nullable = &lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;false,&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt; unique = &lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;true&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Times, Times New Roman, serif; font-size: 14px; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #444444; white-space: pre;&quot;&gt;       &lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;private&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #444444; font-family: Times, Times New Roman, serif; font-size: 14px; line-height: 24px;&quot;&gt; String &lt;/span&gt;&lt;span style=&quot;color: #351c75; font-family: Times, Times New Roman, serif; font-size: 14px; line-height: 24px;&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color: #444444; font-family: Times, Times New Roman, serif; font-size: 14px; line-height: 24px;&quot;&gt;;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Times, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;color: #444444; font-size: 14px; line-height: 24px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #444444; white-space: pre;&quot;&gt;       &lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;// private Long version;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Times, Times New Roman, serif; font-size: 14px; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;       &lt;/span&gt;@Version&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Times, Times New Roman, serif; font-size: 14px; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span style=&quot;color: #444444;&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;private long&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #444444; font-family: Times, Times New Roman, serif; font-size: 14px; line-height: 24px;&quot;&gt; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #351c75; font-family: Times, Times New Roman, serif; font-size: 14px; line-height: 24px;&quot;&gt;version&lt;/span&gt;&lt;span style=&quot;color: #444444; font-family: Times, Times New Roman, serif; font-size: 14px; line-height: 24px;&quot;&gt;;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Times, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;color: #444444; font-size: 14px; line-height: 24px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #444444; white-space: pre;&quot;&gt;       &lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt; Long getId() {&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Times, Times New Roman, serif; font-size: 14px; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #444444; white-space: pre;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;return&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #444444; font-family: Times, Times New Roman, serif; font-size: 14px; line-height: 24px;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #351c75; font-family: Times, Times New Roman, serif; font-size: 14px; line-height: 24px;&quot;&gt;id&lt;/span&gt;&lt;span style=&quot;color: #444444; font-family: Times, Times New Roman, serif; font-size: 14px; line-height: 24px;&quot;&gt;;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Times, Times New Roman, serif; font-size: 14px; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;       &lt;/span&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Times, Times New Roman, serif; font-size: 14px; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span style=&quot;color: #444444;&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;public&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #660000; font-family: Times, Times New Roman, serif; font-size: 14px; line-height: 24px;&quot;&gt; void&lt;/span&gt;&lt;span style=&quot;color: #444444; font-family: Times, Times New Roman, serif; font-size: 14px; line-height: 24px;&quot;&gt; setId(Long id) {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Times, Times New Roman, serif; font-size: 14px; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #444444; white-space: pre;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;this&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #444444; font-family: Times, Times New Roman, serif; font-size: 14px; line-height: 24px;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0b5394; font-family: Times, Times New Roman, serif; font-size: 14px; line-height: 24px;&quot;&gt;id&lt;/span&gt;&lt;span style=&quot;color: #444444; font-family: Times, Times New Roman, serif; font-size: 14px; line-height: 24px;&quot;&gt; = id;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Times, Times New Roman, serif; font-size: 14px; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;       &lt;/span&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Times, Times New Roman, serif; font-size: 14px; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #444444; white-space: pre;&quot;&gt;       &lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;public&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #444444; font-family: Times, Times New Roman, serif; font-size: 14px; line-height: 24px;&quot;&gt; String getName() {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Times, Times New Roman, serif; font-size: 14px; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #444444; white-space: pre;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;return&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #444444; font-family: Times, Times New Roman, serif; font-size: 14px; line-height: 24px;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #0b5394; font-family: Times, Times New Roman, serif; font-size: 14px; line-height: 24px;&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color: #444444; font-family: Times, Times New Roman, serif; font-size: 14px; line-height: 24px;&quot;&gt;;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Times, Times New Roman, serif; font-size: 14px; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;       &lt;/span&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Times, Times New Roman, serif; font-size: 14px; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #444444; white-space: pre;&quot;&gt;       &lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;public void&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #444444; font-family: Times, Times New Roman, serif; font-size: 14px; line-height: 24px;&quot;&gt; setName(String name) {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Times, Times New Roman, serif; font-size: 14px; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span style=&quot;color: #444444;&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;this.&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #351c75; font-family: Times, Times New Roman, serif; font-size: 14px; line-height: 24px;&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color: #444444; font-family: Times, Times New Roman, serif; font-size: 14px; line-height: 24px;&quot;&gt; = name;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Times, Times New Roman, serif; font-size: 14px; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;       &lt;/span&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Times, Times New Roman, serif; font-size: 14px; line-height: 24px;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: 14px; line-height: 24px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: 14px; line-height: 24px;&quot;&gt;
&lt;b style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b style=&quot;background-color: white;&quot;&gt;UserDaoLocal.java&lt;/b&gt;&lt;/div&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;background-color: #fffff8; border-radius: 6px 6px 6px 6px; border: 1px solid #BBBBBB; padding: 5px 10px 5px;&quot;&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;&lt;span style=&quot;color: #660000;&quot;&gt;package&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt; test.ejb;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;/div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #660000; font-size: 14px; line-height: 24px;&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;color: #444444; font-size: 14px; line-height: 24px;&quot;&gt; javax.ejb.Local;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #444444; font-size: 14px; line-height: 24px;&quot;&gt;@Local&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #660000; font-size: 14px; line-height: 24px;&quot;&gt;public interface&lt;/span&gt;&lt;span style=&quot;color: #444444; font-size: 14px; line-height: 24px;&quot;&gt; UserDaoLocal {&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #444444; white-space: pre;&quot;&gt;       &lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;public void&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #444444; font-size: 14px; line-height: 24px;&quot;&gt; persist(User halloEntity);&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span style=&quot;color: #444444;&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;public&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #444444; font-size: 14px; line-height: 24px;&quot;&gt; User findById(Long id);&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #444444; white-space: pre;&quot;&gt;       &lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;public&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #444444; font-size: 14px; line-height: 24px;&quot;&gt; User findByName(String name);&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #444444; font-size: 14px; line-height: 24px;&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: 14px; font-weight: bold; line-height: 24px;&quot;&gt;
&lt;b style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b style=&quot;background-color: white;&quot;&gt;UserDao.java&lt;/b&gt;&lt;br /&gt;
&lt;b style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;background-color: #fffff8; border-radius: 6px 6px 6px 6px; border: 1px solid #BBBBBB; padding: 5px 10px 5px;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #660000; font-size: 14px; line-height: 24px;&quot;&gt;package&lt;/span&gt;&lt;span style=&quot;color: #444444; font-size: 14px; line-height: 24px;&quot;&gt; test.ejb;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #660000; font-size: 14px; line-height: 24px;&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;color: #444444; font-size: 14px; line-height: 24px;&quot;&gt; javax.ejb.Stateless;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #660000; font-size: 14px; line-height: 24px;&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;color: #444444; font-size: 14px; line-height: 24px;&quot;&gt; javax.persistence.EntityManager;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #660000; font-size: 14px; line-height: 24px;&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;color: #444444; font-size: 14px; line-height: 24px;&quot;&gt; javax.persistence.PersistenceContext;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #660000; font-size: 14px; line-height: 24px;&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;color: #444444; font-size: 14px; line-height: 24px;&quot;&gt; javax.persistence.Query;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #444444; font-size: 14px; line-height: 24px;&quot;&gt;@Stateless&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #660000; font-size: 14px; line-height: 24px;&quot;&gt;public class&lt;/span&gt;&lt;span style=&quot;color: #444444; font-size: 14px; line-height: 24px;&quot;&gt; UserDao &lt;/span&gt;&lt;span style=&quot;color: #660000; font-size: 14px; line-height: 24px;&quot;&gt;implements&lt;/span&gt;&lt;span style=&quot;color: #444444; font-size: 14px; line-height: 24px;&quot;&gt; UserDaoLocal {&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #444444; font-size: 14px; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;       &lt;/span&gt;@PersistenceContext&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #444444; font-size: 14px; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;       &lt;/span&gt;EntityManager &lt;/span&gt;&lt;span style=&quot;color: #0b5394; font-size: 14px; line-height: 24px;&quot;&gt;em&lt;/span&gt;&lt;span style=&quot;color: #444444; font-size: 14px; line-height: 24px;&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #444444; font-size: 14px; line-height: 24px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #444444; font-size: 14px; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;       &lt;/span&gt;@Override&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #444444; white-space: pre;&quot;&gt;       &lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;public void&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #444444; font-size: 14px; line-height: 24px;&quot;&gt; persist(User halloEntity) {&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #444444; white-space: pre;&quot;&gt;              &lt;/span&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;em&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #444444; font-size: 14px; line-height: 24px;&quot;&gt;.persist(halloEntity);&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #444444; font-size: 14px; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;       &lt;/span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;       &lt;/span&gt;@Override&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #444444; white-space: pre;&quot;&gt;       &lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;public&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #444444; font-size: 14px; line-height: 24px;&quot;&gt; User findById(Long id) {&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #444444; font-size: 14px; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;             &lt;/span&gt;return &lt;/span&gt;&lt;span style=&quot;color: #0b5394; font-size: 14px; line-height: 24px;&quot;&gt;em&lt;/span&gt;&lt;span style=&quot;color: #444444; font-size: 14px; line-height: 24px;&quot;&gt;.find(User.&lt;/span&gt;&lt;span style=&quot;color: #660000; font-size: 14px; line-height: 24px;&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;color: #444444; font-size: 14px; line-height: 24px;&quot;&gt;, id);&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; font-size: 14px; line-height: 24px; white-space: pre;&quot;&gt;       &lt;/span&gt;&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; font-size: 14px; line-height: 24px;&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;       &lt;/span&gt;@Override&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span style=&quot;color: #444444;&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;public&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #444444; font-size: 14px; line-height: 24px;&quot;&gt; User findByName(String name) {&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #444444; font-size: 14px; line-height: 24px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #444444; font-size: 14px; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;             &lt;/span&gt;String qfind = &quot;&lt;/span&gt;&lt;span style=&quot;color: #0b5394; font-size: 14px; line-height: 24px;&quot;&gt;select x from User x where x.name= :name&lt;/span&gt;&lt;span style=&quot;color: #444444; font-size: 14px; line-height: 24px;&quot;&gt;&quot;;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #444444; font-size: 14px; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;             &lt;/span&gt;Query findByName= em.createQuery(qfind);&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #444444; font-size: 14px; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;             &lt;/span&gt;findByName.setParameter(&quot;&lt;/span&gt;&lt;span style=&quot;color: #0b5394; font-size: 14px; line-height: 24px;&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color: #444444; font-size: 14px; line-height: 24px;&quot;&gt;&quot;, name);&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;font-size: 14px; line-height: 24px; white-space: pre;&quot;&gt;&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #444444; white-space: pre;&quot;&gt;             &lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;return&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #444444; font-size: 14px; line-height: 24px;&quot;&gt; (User)findByNamet.getSingleResult();&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #444444; font-size: 14px; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;      &lt;/span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #444444; font-size: 14px; line-height: 24px;&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: 14px; font-weight: bold; line-height: 24px;&quot;&gt;
&lt;br /&gt;
&lt;b style=&quot;background-color: white;&quot;&gt;GrussGottEjbLocal.java&lt;/b&gt;&lt;br /&gt;
&lt;b style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8; border-radius: 6px 6px 6px 6px; border: 1px solid #BBBBBB; padding: 5px 10px 5px;&quot;&gt;
&lt;span style=&quot;color: #660000; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: 14px; line-height: 24px;&quot;&gt;package&lt;/span&gt;&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: 14px; line-height: 24px;&quot;&gt; test.ejb;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #660000; font-size: 14px; line-height: 24px;&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;color: #444444; font-size: 14px; line-height: 24px;&quot;&gt; javax.ejb.Local;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #444444; font-size: 14px; line-height: 24px;&quot;&gt;@Local&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;&lt;span style=&quot;color: #660000;&quot;&gt;public interface&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt; GrussGottEjbLocal {&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #444444; white-space: pre;&quot;&gt;       &lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;public void&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt; newUser(User use);&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #444444; white-space: pre;&quot;&gt;       &lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt; User findUserByName(String name);&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #444444; font-size: 14px; line-height: 24px;&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: 14px; font-weight: bold; line-height: 24px;&quot;&gt;
&lt;b style=&quot;background-color: white;&quot;&gt;GrussGottEjb.java&lt;/b&gt;&lt;br /&gt;
&lt;b style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8; border-radius: 6px 6px 6px 6px; border: 1px solid #BBBBBB; padding: 5px 10px 5px;&quot;&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;&lt;span style=&quot;color: #660000;&quot;&gt;package&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt; test.ejb;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;&lt;span style=&quot;color: #660000;&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt; javax.ejb.EJB;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #444444; font-size: 14px; line-height: 24px;&quot;&gt;import javax.ejb.Stateless;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #444444; font-size: 14px; line-height: 24px;&quot;&gt;@Stateless&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #660000; font-size: 14px; line-height: 24px;&quot;&gt;public class&lt;/span&gt;&lt;span style=&quot;color: #444444; font-size: 14px; line-height: 24px;&quot;&gt; GrussGottEjb &lt;/span&gt;&lt;span style=&quot;color: #660000; font-size: 14px; line-height: 24px;&quot;&gt;implements&lt;/span&gt;&lt;span style=&quot;color: #444444; font-size: 14px; line-height: 24px;&quot;&gt; GrussGottEjbLocal {&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #444444; font-size: 14px; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;       &lt;/span&gt;@EJB&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #444444; font-size: 14px; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;       &lt;/span&gt;UserDaoLocal &lt;/span&gt;&lt;span style=&quot;color: #0b5394; font-size: 14px; line-height: 24px;&quot;&gt;userDao&lt;/span&gt;&lt;span style=&quot;color: #444444; font-size: 14px; line-height: 24px;&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #444444; font-size: 14px; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;       &lt;/span&gt;@Override&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #444444; white-space: pre;&quot;&gt;       &lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;public void&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #444444; font-size: 14px; line-height: 24px;&quot;&gt; newUser(User user) {&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #444444; white-space: pre;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;userDao&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #444444; font-size: 14px; line-height: 24px;&quot;&gt;.persist(user);&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #444444; font-size: 14px; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;       &lt;/span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #444444; font-size: 14px; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;       &lt;/span&gt;@Override&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #444444; white-space: pre;&quot;&gt;       &lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;public&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #444444; font-size: 14px; line-height: 24px;&quot;&gt; User findUserByName(String name) {&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #444444; white-space: pre;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;return&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #0b5394; font-size: 14px; line-height: 24px;&quot;&gt; userDao&lt;/span&gt;&lt;span style=&quot;color: #444444; font-size: 14px; line-height: 24px;&quot;&gt;.findByName(name);&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #444444; font-size: 14px; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;       &lt;/span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #444444; font-size: 14px; line-height: 24px;&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: #674ea7; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: #674ea7; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;b style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: 14px; line-height: 24px;&quot;&gt;TestGrussGott.java&lt;/b&gt;&lt;br /&gt;
&lt;b style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: 14px; line-height: 24px;&quot;&gt;&lt;br /&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;div style=&quot;border-bottom-left-radius: 6px; border-bottom-right-radius: 6px; border-top-left-radius: 6px; border-top-right-radius: 6px; border: 1px solid rgb(187, 187, 187); padding: 5px 10px;&quot;&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #660000; font-size: 14px; line-height: 24px;&quot;&gt;package&lt;/span&gt;&lt;span style=&quot;color: #444444; font-size: 14px; line-height: 24px;&quot;&gt; test.ejb;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #660000; font-size: 14px; line-height: 24px;&quot;&gt;import &lt;/span&gt;&lt;span style=&quot;color: #444444; font-size: 14px; line-height: 24px;&quot;&gt;javax.ejb.EJB;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #660000; font-size: 14px; line-height: 24px;&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;color: #444444; font-size: 14px; line-height: 24px;&quot;&gt; org.jboss.arquillian.container.test.api.Deployment;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #660000; font-size: 14px; line-height: 24px;&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;color: #444444; font-size: 14px; line-height: 24px;&quot;&gt; org.jboss.arquillian.testng.Arquillian;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #660000; font-size: 14px; line-height: 24px;&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;color: #444444; font-size: 14px; line-height: 24px;&quot;&gt; org.jboss.shrinkwrap.api.ShrinkWrap;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #660000; font-size: 14px; line-height: 24px;&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;color: #444444; font-size: 14px; line-height: 24px;&quot;&gt; org.jboss.shrinkwrap.api.spec.JavaArchive;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;color: #660000;&quot;&gt;import&lt;/span&gt; &lt;/span&gt;&lt;span style=&quot;background-color: #fffff8; color: #444444;&quot;&gt;org.testng.Assert;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #660000; font-size: 14px; line-height: 24px;&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;color: #444444; font-size: 14px; line-height: 24px;&quot;&gt; org.testng.annotations.Test;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #0b5394; font-size: 14px; line-height: 24px;&quot;&gt;/**&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #0b5394; font-size: 14px; line-height: 24px;&quot;&gt;&amp;nbsp;*&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #0b5394; font-size: 14px; line-height: 24px;&quot;&gt;&amp;nbsp;* @author he&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #0b5394; font-size: 14px; line-height: 24px;&quot;&gt;&amp;nbsp;*&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #0b5394; font-size: 14px; line-height: 24px;&quot;&gt;&amp;nbsp;*/&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #38761d; font-size: 14px; line-height: 24px;&quot;&gt;// @RunWith(Arquillian.class)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #660000; font-size: 14px; line-height: 24px;&quot;&gt;public class&lt;/span&gt;&lt;span style=&quot;color: #444444; font-size: 14px; line-height: 24px;&quot;&gt; TestGrussGott extends&amp;nbsp;Arquillian&amp;nbsp;{&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #444444; font-size: 14px; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;       &lt;/span&gt;@Deployment&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #444444; white-space: pre;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;public static &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #444444; font-size: 14px; line-height: 24px;&quot;&gt;JavaArchive createDeployment() {&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #444444; font-size: 14px; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;        &lt;/span&gt;JavaArchive jar = ShrinkWrap.create(JavaArchive.&lt;/span&gt;&lt;span style=&quot;color: #660000; font-size: 14px; line-height: 24px;&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;color: #444444; font-size: 14px; line-height: 24px;&quot;&gt;, &quot;&lt;/span&gt;&lt;span style=&quot;color: #0b5394; font-size: 14px; line-height: 24px;&quot;&gt;hgrussEjb.jar&lt;/span&gt;&lt;span style=&quot;color: #444444; font-size: 14px; line-height: 24px;&quot;&gt;&quot;);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #444444; font-size: 14px; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;        &lt;/span&gt;jar.addPackage(User.class.getPackage());&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #444444; font-size: 14px; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;        &lt;/span&gt;jar.addAsResource(&quot;&lt;/span&gt;&lt;span style=&quot;color: #0b5394; font-size: 14px; line-height: 24px;&quot;&gt;test-persistence.xml&lt;/span&gt;&lt;span style=&quot;color: #444444; font-size: 14px; line-height: 24px;&quot;&gt;&quot;, &quot;&lt;/span&gt;&lt;span style=&quot;color: #0b5394; font-size: 14px; line-height: 24px;&quot;&gt;META-INF/persistence.xml&lt;/span&gt;&lt;span style=&quot;color: #444444; font-size: 14px; line-height: 24px;&quot;&gt;&quot;);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span style=&quot;color: #444444;&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;// jar.addClass(GrussGottEjbLocal.class).addClass(GrussGottEjb.class);&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #38761d; font-size: 14px; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;        &lt;/span&gt;// jar.addClass(UserDao.class).addClass(UserDaoLocal.class);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #38761d; font-size: 14px; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;        &lt;/span&gt;// jar.addAsManifestResource(EmptyAsset.INSTANCE, &quot;beans.xml&quot;);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #444444; white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #444444; font-size: 14px; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;        &lt;/span&gt;System.&lt;/span&gt;&lt;span style=&quot;color: #0b5394; font-size: 14px; line-height: 24px;&quot;&gt;out&lt;/span&gt;&lt;span style=&quot;color: #444444; font-size: 14px; line-height: 24px;&quot;&gt;.println(jar.toString(&lt;/span&gt;&lt;span style=&quot;color: #660000; font-size: 14px; line-height: 24px;&quot;&gt;true&lt;/span&gt;&lt;span style=&quot;color: #444444; font-size: 14px; line-height: 24px;&quot;&gt;));&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #444444; white-space: pre;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;return&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #444444; font-size: 14px; line-height: 24px;&quot;&gt; jar;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #444444; font-size: 14px; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;       &lt;/span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #444444; white-space: pre;&quot;&gt;       &lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;@EJB(mappedName = &quot;&lt;/span&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;test/GrussGottEjb/local&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;&quot;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #444444; font-size: 14px; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;       &lt;/span&gt;GrussGottEjbLocal &lt;/span&gt;&lt;span style=&quot;color: #0b5394; font-size: 14px; line-height: 24px;&quot;&gt;grusEjb&lt;/span&gt;&lt;span style=&quot;color: #444444; font-size: 14px; line-height: 24px;&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span style=&quot;color: #444444;&quot;&gt;     &lt;/span&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;// injecting em does not work for jb5 + arquillian, just use DAOs and&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #38761d; font-size: 14px; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;       &lt;/span&gt;// business methods for inserting, deleting of entities&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #38761d; font-size: 14px; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;       &lt;/span&gt;// @PersistenceContext&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #38761d; font-size: 14px; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;       &lt;/span&gt;// EntityManager em;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;       &lt;/span&gt;@Test&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #444444; white-space: pre;&quot;&gt;       &lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;public void&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #444444; font-size: 14px; line-height: 24px;&quot;&gt; sayHalloTxt() &lt;/span&gt;&lt;span style=&quot;color: #660000; font-size: 14px; line-height: 24px;&quot;&gt;throws&lt;/span&gt;&lt;span style=&quot;color: #444444; font-size: 14px; line-height: 24px;&quot;&gt; Exception {&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #444444; font-size: 14px; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;            &lt;/span&gt;User hehe = &lt;/span&gt;&lt;span style=&quot;color: #660000; font-size: 14px; line-height: 24px;&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;color: #444444; font-size: 14px; line-height: 24px;&quot;&gt; User();&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #444444; font-size: 14px; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;            &lt;/span&gt;hehe.setName(&quot;&lt;/span&gt;&lt;span style=&quot;color: #0b5394; font-size: 14px; line-height: 24px;&quot;&gt;hehe&lt;/span&gt;&lt;span style=&quot;color: #444444; font-size: 14px; line-height: 24px;&quot;&gt;&quot;);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #444444; white-space: pre;&quot;&gt;            &lt;/span&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;grusEjb&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #444444; font-size: 14px; line-height: 24px;&quot;&gt;.newUser(hehe);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #444444; white-space: pre;&quot;&gt;            &lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;User result = &lt;/span&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;grusEjb&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;.findUserByName(&quot;&lt;/span&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;hehe&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;&quot;);&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #444444; font-size: 14px; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;            &lt;/span&gt;Assert.assertEquals(&quot;&lt;/span&gt;&lt;span style=&quot;color: #660000; font-size: 14px; line-height: 24px;&quot;&gt;hehe&lt;/span&gt;&lt;span style=&quot;color: #444444; font-size: 14px; line-height: 24px;&quot;&gt;&quot;, result.getName());&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #444444; white-space: pre;&quot;&gt;            &lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;System.&lt;/span&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;out&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;.println(&quot;&lt;/span&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;#### found db entry text= &lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;&quot; + result.getName()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #444444; font-size: 14px; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;              &lt;/span&gt;+ &quot;&lt;/span&gt;&lt;span style=&quot;color: #0b5394; font-size: 14px; line-height: 24px;&quot;&gt; id=&lt;/span&gt;&lt;span style=&quot;color: #444444; font-size: 14px; line-height: 24px;&quot;&gt;&quot; + result.getId());&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #444444; font-size: 14px; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;           &lt;/span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #444444; font-size: 14px; line-height: 24px;&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #674ea7; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;div style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: 14px; font-weight: bold; line-height: 24px;&quot;&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;color: #444444; font-weight: bold; line-height: 24px;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Explaination to &quot;TestGrussGott.java&quot;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;color: #444444; line-height: 24px;&quot;&gt;
&lt;/div&gt;
&lt;ul style=&quot;line-height: 24px;&quot;&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Different from Arquillian JUnit test, &quot;&lt;/span&gt;&lt;span style=&quot;color: #cc0000; font-family: Arial, Helvetica, sans-serif;&quot;&gt;@RunWith(Arquillian.class)&quot;,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;is not supported by TestNG. For TestNG , test class should subclass &quot;&lt;/span&gt;&lt;span style=&quot;color: #674ea7; font-family: Arial, Helvetica, sans-serif;&quot;&gt;org.jboss.arquillian.testng.Arquillian&lt;/span&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&quot;.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Instead of adding class one by one to test archive, we add all classes in a package using &quot;&lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #674ea7; font-family: Arial, Helvetica, sans-serif; white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #674ea7; font-family: Arial, Helvetica, sans-serif;&quot;&gt;jar.&lt;/span&gt;&lt;span style=&quot;color: #cc0000; font-family: Arial, Helvetica, sans-serif;&quot;&gt;addPackage&lt;/span&gt;&lt;span style=&quot;color: #674ea7; font-family: Arial, Helvetica, sans-serif;&quot;&gt;(package_name)&lt;/span&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&quot;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;For JPA / Hibernate, test archive needs a &quot;persistence.xml&quot; file. This file should be added to test archive&#39;s &quot;META-INF&quot; folder. &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;The line &quot;&lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #674ea7; font-family: Arial, Helvetica, sans-serif; white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #674ea7; font-family: Arial, Helvetica, sans-serif;&quot;&gt;jar.addAsResource(&lt;/span&gt;&lt;span style=&quot;color: #cc0000; font-family: Arial, Helvetica, sans-serif;&quot;&gt;&quot;test-persistence.xml&quot;, &quot;META-INF/persistence.xml&quot;&lt;/span&gt;&lt;span style=&quot;color: #674ea7; font-family: Arial, Helvetica, sans-serif;&quot;&gt;);&lt;/span&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&quot; says:&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;line-height: 24px;&quot;&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&quot;add test-persistence.xml to test archive in META-INF folder, and rename the file to persistence.xml&quot;.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #444444; line-height: 24px;&quot;&gt;
&lt;/div&gt;
&lt;ul style=&quot;line-height: 24px;&quot;&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Use of EntityManager in test class&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;color: #444444; line-height: 24px;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Whe you are familiar with persistence test with Springframework, you might remember, that you could&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;inject an EntityManager in Spring test class, and use EntityManager to prepare test data. But &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;unfortunately, for currently, Arquillian 1.0.3.Final + arquillian-jbossas-managed-5.1, &amp;nbsp;does not support such &lt;/span&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;a feature.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: 14px; font-weight: bold; line-height: 24px;&quot;&gt;
&lt;b style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; font-weight: bold; line-height: 24px;&quot;&gt;
&lt;b style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;4. persistence.xml&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;As mentioned in section 3, Arquillian needs a &quot;persistence.xml&quot; for JPA / Hibernate to work. Such a &quot;persistence.xml&quot; is created only for test purpose, and is normally different from the one used in production environment. &amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;We will create a &quot;test-persistence.xml&quot; file in &quot;src/test/resources&quot; folder. Arquillian takes care of renameing it to &quot;persistence.xml&quot; and packing this it in the deplyoment archive.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;
&lt;span style=&quot;color: #e69138;&quot;&gt;! You may wunder why we don&#39;t just name the original file as &quot;persistence.xml&quot;?&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;
&lt;span style=&quot;color: #e69138;&quot;&gt;&amp;nbsp;The answer is, we just want to avoid this file been taken mistakenly to be used for production environment.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;
&lt;span style=&quot;color: #e69138;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: 14px; font-weight: bold; line-height: 24px;&quot;&gt;
The content of test-persistence.xml:&lt;/div&gt;
&lt;br /&gt;
&lt;b style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8; border-radius: 6px 6px 6px 6px; border: 1px solid #BBBBBB; padding: 5px 10px 5px;&quot;&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; font-size: 14px; line-height: 24px;&quot;&gt;&amp;lt;?xml &lt;/span&gt;&lt;span style=&quot;color: #660000; font-size: 14px; line-height: 24px;&quot;&gt;version&lt;/span&gt;&lt;span style=&quot;color: #274e13; font-size: 14px; line-height: 24px;&quot;&gt;=&quot;&lt;/span&gt;&lt;span style=&quot;color: #0b5394; font-size: 14px; line-height: 24px;&quot;&gt;1.0&lt;/span&gt;&lt;span style=&quot;color: #274e13; font-size: 14px; line-height: 24px;&quot;&gt;&quot; &lt;/span&gt;&lt;span style=&quot;color: #660000; font-size: 14px; line-height: 24px;&quot;&gt;encodin&lt;/span&gt;&lt;span style=&quot;color: #274e13; font-size: 14px; line-height: 24px;&quot;&gt;g=&quot;&lt;/span&gt;&lt;span style=&quot;color: #0b5394; font-size: 14px; line-height: 24px;&quot;&gt;UTF-8&lt;/span&gt;&lt;span style=&quot;color: #274e13; font-size: 14px; line-height: 24px;&quot;&gt;&quot;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; font-size: 14px; line-height: 24px;&quot;&gt;&amp;lt;persistence&lt;/span&gt;&lt;span style=&quot;color: #660000; font-size: 14px; line-height: 24px;&quot;&gt; version&lt;/span&gt;&lt;span style=&quot;color: #274e13; font-size: 14px; line-height: 24px;&quot;&gt;=&quot;&lt;/span&gt;&lt;span style=&quot;color: #0b5394; font-size: 14px; line-height: 24px;&quot;&gt;2.0&lt;/span&gt;&lt;span style=&quot;color: #274e13; font-size: 14px; line-height: 24px;&quot;&gt;&quot; xmlns=&quot;&lt;/span&gt;&lt;span style=&quot;color: #0b5394; font-size: 14px; line-height: 24px;&quot;&gt;http://java.sun.com/xml/ns/persistence&lt;/span&gt;&lt;span style=&quot;color: #274e13; font-size: 14px; line-height: 24px;&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; font-size: 14px; line-height: 24px;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #660000; font-size: 14px; line-height: 24px;&quot;&gt; xmlns:xsi&lt;/span&gt;&lt;span style=&quot;color: #274e13; font-size: 14px; line-height: 24px;&quot;&gt;=&quot;&lt;/span&gt;&lt;span style=&quot;color: #0b5394; font-size: 14px; line-height: 24px;&quot;&gt;http://www.w3.org/2001/XMLSchema-instance&lt;/span&gt;&lt;span style=&quot;color: #274e13; font-size: 14px; line-height: 24px;&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; font-size: 14px; line-height: 24px;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #660000; font-size: 14px; line-height: 24px;&quot;&gt; xsi:schemaLocation&lt;/span&gt;&lt;span style=&quot;color: #274e13; font-size: 14px; line-height: 24px;&quot;&gt;=&quot;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; font-size: 14px; line-height: 24px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #0b5394; font-size: 14px; line-height: 24px;&quot;&gt;http://java.sun.com/xml/ns/persistence&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; font-size: 14px; line-height: 24px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #0b5394; font-size: 14px; line-height: 24px;&quot;&gt;http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd&lt;/span&gt;&lt;span style=&quot;color: #274e13; font-size: 14px; line-height: 24px;&quot;&gt;&quot;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; font-size: 14px; line-height: 24px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;lt;persistence-unit &lt;/span&gt;&lt;span style=&quot;color: #660000; font-size: 14px; line-height: 24px;&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color: #274e13; font-size: 14px; line-height: 24px;&quot;&gt;=&quot;&lt;/span&gt;&lt;span style=&quot;color: #0b5394; font-size: 14px; line-height: 24px;&quot;&gt;testPU&lt;/span&gt;&lt;span style=&quot;color: #274e13; font-size: 14px; line-height: 24px;&quot;&gt;&quot;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; font-size: 14px; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;jta-data-source&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #444444; font-size: 14px; line-height: 24px;&quot;&gt;java:/DefaultDS&lt;/span&gt;&lt;span style=&quot;color: #274e13; font-size: 14px; line-height: 24px;&quot;&gt;&amp;lt;/jta-data-source&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; font-size: 14px; line-height: 24px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;properties&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; font-size: 14px; line-height: 24px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;property &lt;/span&gt;&lt;span style=&quot;color: #660000; font-size: 14px; line-height: 24px;&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color: #274e13; font-size: 14px; line-height: 24px;&quot;&gt;=&quot;&lt;/span&gt;&lt;span style=&quot;color: #0b5394; font-size: 14px; line-height: 24px;&quot;&gt;hibernate.hbm2ddl.auto&lt;/span&gt;&lt;span style=&quot;color: #274e13; font-size: 14px; line-height: 24px;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #660000; font-size: 14px; line-height: 24px;&quot;&gt; value&lt;/span&gt;&lt;span style=&quot;color: #274e13; font-size: 14px; line-height: 24px;&quot;&gt;=&quot;&lt;/span&gt;&lt;span style=&quot;color: #0b5394; font-size: 14px; line-height: 24px;&quot;&gt;create-drop&lt;/span&gt;&lt;span style=&quot;color: #274e13; font-size: 14px; line-height: 24px;&quot;&gt;&quot;/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; font-size: 14px; line-height: 24px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;property &lt;/span&gt;&lt;span style=&quot;color: #660000; font-size: 14px; line-height: 24px;&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color: #274e13; font-size: 14px; line-height: 24px;&quot;&gt;=&quot;&lt;/span&gt;&lt;span style=&quot;color: #0b5394; font-size: 14px; line-height: 24px;&quot;&gt;hibernate.show_sq&lt;/span&gt;&lt;span style=&quot;color: #274e13; font-size: 14px; line-height: 24px;&quot;&gt;l&quot; &lt;/span&gt;&lt;span style=&quot;color: #660000; font-size: 14px; line-height: 24px;&quot;&gt;value&lt;/span&gt;&lt;span style=&quot;color: #274e13; font-size: 14px; line-height: 24px;&quot;&gt;=&quot;&lt;/span&gt;&lt;span style=&quot;color: #0b5394; font-size: 14px; line-height: 24px;&quot;&gt;true&lt;/span&gt;&lt;span style=&quot;color: #274e13; font-size: 14px; line-height: 24px;&quot;&gt;&quot;/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; font-size: 14px; line-height: 24px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/properties&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; font-size: 14px; line-height: 24px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/persistence-unit&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; font-size: 14px; line-height: 24px;&quot;&gt;&amp;lt;/persistence&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: 14px; font-weight: bold; line-height: 24px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b style=&quot;background-color: white; color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; font-weight: bold; line-height: 24px;&quot;&gt;5.&amp;nbsp;&lt;/b&gt;&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;b&gt;java:/DefaultDS&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;span style=&quot;color: #444444;&quot;&gt;The &quot;persistence.xml&quot; also contains data source configuration:&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;span style=&quot;color: #444444;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: #fffff8; border-radius: 6px 6px 6px 6px; border: 1px solid #BBBBBB; padding: 5px 10px 5px;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;&amp;lt;jta-data-source&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;java:/DefaultDS&lt;/span&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;&amp;lt;/jta-data-source&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: #e06666; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;As data source will use the embedded hsqldb. The hsqldb is included in JBoss 5.1.0. &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;We just assume:&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;you have a &quot;hsqldb-ds.xml&quot; in &amp;nbsp;&quot;jbossHome/server/default/deploy&quot;,&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;the data source configuration works&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;the data source is bund to jndi &quot;java:/defaultDS&quot;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;b style=&quot;background-color: white; color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;6. arquillian.xml&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b style=&quot;background-color: white; color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;arquillian.xml should also be put in the folder &quot;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: 14px; line-height: 24px;&quot;&gt;src/test/resources&lt;/span&gt;&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: 14px; line-height: 24px;&quot;&gt;&quot; :&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: 14px; line-height: 24px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;/span&gt;

&lt;br /&gt;
&lt;div style=&quot;background-color: #fffff8; border-radius: 6px 6px 6px 6px; border: 1px solid #BBBBBB; padding: 5px 10px 5px;&quot;&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; font-size: 14px; line-height: 24px;&quot;&gt;&amp;lt;?xml &lt;/span&gt;&lt;span style=&quot;color: #660000; font-size: 14px; line-height: 24px;&quot;&gt;version&lt;/span&gt;&lt;span style=&quot;color: #274e13; font-size: 14px; line-height: 24px;&quot;&gt;=&quot;&lt;/span&gt;&lt;span style=&quot;color: #0b5394; font-size: 14px; line-height: 24px;&quot;&gt;1.0&lt;/span&gt;&lt;span style=&quot;color: #274e13; font-size: 14px; line-height: 24px;&quot;&gt;&quot; &lt;/span&gt;&lt;span style=&quot;color: #660000; font-size: 14px; line-height: 24px;&quot;&gt;encoding&lt;/span&gt;&lt;span style=&quot;color: #274e13; font-size: 14px; line-height: 24px;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #0b5394; font-size: 14px; line-height: 24px;&quot;&gt;&quot;UTF-8&lt;/span&gt;&lt;span style=&quot;color: #274e13; font-size: 14px; line-height: 24px;&quot;&gt;&quot;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; font-size: 14px; line-height: 24px;&quot;&gt;&amp;lt;arquillian&lt;/span&gt;&lt;span style=&quot;color: #660000; font-size: 14px; line-height: 24px;&quot;&gt; xmlns:xsi&lt;/span&gt;&lt;span style=&quot;color: #274e13; font-size: 14px; line-height: 24px;&quot;&gt;=&quot;&lt;/span&gt;&lt;span style=&quot;color: #0b5394; font-size: 14px; line-height: 24px;&quot;&gt;http://www.w3.org/2001/XMLSchema-instance&lt;/span&gt;&lt;span style=&quot;color: #274e13; font-size: 14px; line-height: 24px;&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #274e13; white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;xmlns=&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #0b5394; font-size: 14px; line-height: 24px;&quot;&gt;&quot;http://jboss.org/schema/arquillian&quot;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #660000; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: 14px; line-height: 24px; white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #660000; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: 14px; line-height: 24px;&quot;&gt;xsi:schemaLocation=&lt;/span&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;&quot;http:/&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; font-size: 14px; line-height: 24px;&quot;&gt;/jboss.org/schema/arquillian http://jboss.org/schema/arquillian/arquillian_1_0.xsd&quot;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #274e13; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: 14px; line-height: 24px;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #274e13; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #274e13; white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;lt;container &lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;qualifier=&lt;/span&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;&quot;jboss5&quot;&lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;default=&lt;/span&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;&quot;true&quot;&lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; font-size: 14px; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;       &lt;/span&gt;&amp;lt;configuration&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; font-size: 14px; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;         &lt;/span&gt;&amp;lt;property&lt;/span&gt;&lt;span style=&quot;color: #660000; font-size: 14px; line-height: 24px;&quot;&gt; name=&lt;/span&gt;&lt;span style=&quot;color: #0b5394; font-size: 14px; line-height: 24px;&quot;&gt;&quot;jbossHome&quot;&lt;/span&gt;&lt;span style=&quot;color: #274e13; font-size: 14px; line-height: 24px;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #444444; font-size: 14px; line-height: 24px;&quot;&gt;/home/he/programms/jboss-5.1.0.GA&lt;/span&gt;&lt;span style=&quot;color: #274e13; font-size: 14px; line-height: 24px;&quot;&gt;&amp;lt;/property&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; font-size: 14px; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;         &lt;/span&gt;&amp;lt;property &lt;/span&gt;&lt;span style=&quot;color: #660000; font-size: 14px; line-height: 24px;&quot;&gt;name=&lt;/span&gt;&lt;span style=&quot;color: #0b5394; font-size: 14px; line-height: 24px;&quot;&gt;&quot;profileName&quot;&lt;/span&gt;&lt;span style=&quot;color: #274e13; font-size: 14px; line-height: 24px;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #444444; font-size: 14px; line-height: 24px;&quot;&gt;default&lt;/span&gt;&lt;span style=&quot;color: #274e13; font-size: 14px; line-height: 24px;&quot;&gt;&amp;lt;/property&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; font-size: 14px; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;         &lt;/span&gt;&amp;lt;property &lt;/span&gt;&lt;span style=&quot;color: #660000; font-size: 14px; line-height: 24px;&quot;&gt;name=&lt;/span&gt;&lt;span style=&quot;color: #0b5394; font-size: 14px; line-height: 24px;&quot;&gt;&quot;javaVmArguments&quot;&lt;/span&gt;&lt;span style=&quot;color: #274e13; font-size: 14px; line-height: 24px;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #444444; font-size: 14px; line-height: 24px;&quot;&gt;-Xmx512m -XX:MaxPermSize=256m&lt;/span&gt;&lt;span style=&quot;color: #274e13; font-size: 14px; line-height: 24px;&quot;&gt;&amp;lt;/property&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;&amp;lt;!-- unfountunally, change system properties, i.e. the -D properties does not work: here the loglevel change doen&#39;t work. Nor does it work with adding the -D param in above javaVmArguments. As workaround, just change the log appender threadhold in JBoss directly.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #0b5394; font-size: 14px; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; --&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; font-size: 14px; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;       &lt;/span&gt;&amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&amp;lt;property &lt;/span&gt;&lt;span style=&quot;color: #660000; font-size: 14px; line-height: 24px;&quot;&gt;name=&lt;/span&gt;&lt;span style=&quot;color: #0b5394; font-size: 14px; line-height: 24px;&quot;&gt;&quot;jboss.server.log.threshold&quot;&lt;/span&gt;&lt;span style=&quot;color: #274e13; font-size: 14px; line-height: 24px;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #444444; font-size: 14px; line-height: 24px;&quot;&gt;INFO&lt;/span&gt;&lt;span style=&quot;color: #274e13; font-size: 14px; line-height: 24px;&quot;&gt;&amp;lt;/property&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; font-size: 14px; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;        &lt;/span&gt;&amp;lt;/configuration&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; font-size: 14px; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;&amp;lt;/container&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; font-size: 14px; line-height: 24px;&quot;&gt;&amp;lt;/arquillian&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;&lt;span style=&quot;color: #8e7cc3;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;b style=&quot;background-color: white; color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;7. Configuring TestNG &quot;testng.xml&quot;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b style=&quot;background-color: white; color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;We still need to configuration TestNG. TestNG provides the conveniece to group tests, and decide which tests are to be executed with changing the test classes.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;We will create a &quot;testng.xml&quot; file in &quot;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: 14px; line-height: 24px;&quot;&gt;&quot;src/test/resources&lt;/span&gt;&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: 14px; line-height: 24px;&quot;&gt;&quot;:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: #fffff8; border-radius: 6px 6px 6px 6px; border: 1px solid #BBBBBB; padding: 5px 10px 5px;&quot;&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #274e13; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&amp;lt;!DOCTYPE suite SYSTEM &quot;http://testng.org/testng-1.0.dtd&quot; &amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #274e13; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&amp;lt;suite &lt;/span&gt;&lt;span style=&quot;color: #660000; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;name=&lt;/span&gt;&lt;span style=&quot;color: #0b5394; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&quot;Suite 1&quot;&lt;/span&gt;&lt;span style=&quot;color: #274e13; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #274e13; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;test &lt;/span&gt;&lt;span style=&quot;color: #660000; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;name=&lt;/span&gt;&lt;span style=&quot;color: #0b5394; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&quot;testNG test1&quot;&lt;/span&gt;&lt;span style=&quot;color: #274e13; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #274e13; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;classes&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #274e13; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;class &lt;/span&gt;&lt;span style=&quot;color: #660000; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;name=&lt;/span&gt;&lt;span style=&quot;color: #0b5394; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&quot;test.ejb.TestGrussGott&quot;&lt;/span&gt;&lt;span style=&quot;color: #274e13; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt; /&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #274e13; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/classes&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #274e13; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/test&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #274e13; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&amp;lt;/suite&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;div style=&quot;color: #444444; font-weight: bold; line-height: 24px;&quot;&gt;
&lt;span style=&quot;background-color: white; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: large;&quot;&gt;8. Run test&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #444444; font-size: 14px; line-height: 24px;&quot;&gt;
&lt;span style=&quot;background-color: white; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;Now everything is set, we are ready to run the test.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-size: 14px; font-weight: bold; line-height: 24px;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;background-color: white; font-family: Arial, Helvetica, Geneva, sans-serif; font-weight: normal;&quot;&gt;
&lt;div style=&quot;color: #222222;&quot;&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;Run Maven tests using following command&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: #fffff8; border-bottom-left-radius: 6px; border-bottom-right-radius: 6px; border-top-left-radius: 6px; border-top-right-radius: 6px; border: 1px solid rgb(187, 187, 187); color: #222222; padding: 5px 10px;&quot;&gt;
&lt;span style=&quot;background-color: white; color: #8e7cc3; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; color: #8e7cc3; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&amp;gt; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #8e7cc3; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;mvn clean test -Parquillian-jbossas-managed_5_1&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #8e7cc3; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;span style=&quot;color: #8e7cc3; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;When you have followed all the steps till now, &amp;nbsp;you would have seen test result like this in the console:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: #fffff8; border-radius: 6px 6px 6px 6px; border: 1px solid #BBBBBB; padding: 5px 10px 5px;&quot;&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #8e7cc3; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;-------------------------------------------------------&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #8e7cc3; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;&amp;nbsp;T E S T S&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #8e7cc3; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;-------------------------------------------------------&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #8e7cc3; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;Running test.ejb.TestGrussGott&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #8e7cc3; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;Configuring TestNG with: org.apache.maven.surefire.testng.conf.TestNGMapConfigurator@1cb25f1&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #8e7cc3; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;30.12.2012 07:43:47 org.jboss.arquillian.container.impl.MapObject populate&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #8e7cc3; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;WARNUNG: Configuration contain properties not supported by the backing object org.jboss.arquillian.container.jbossas.managed_5_1.JBossASConfiguration&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #8e7cc3; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;Unused property entries: {jboss.server.log.threshold=INFO}&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #8e7cc3; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;Supported property names: [shutdownTimeoutInSeconds, javaVmArguments, javaHome, partition, jbossHome, bindAddress, httpPort, startupTimeoutInSeconds, useRmiPortForAliveCheck, portBindingSet, profileName, rmiPort]&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #8e7cc3; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;Starting server &quot;default&quot;, with command (start timeout is 120 seconds ):&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #8e7cc3; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;/usr/java/jdk1.6.0_32/bin/java -cp /home/he/programms/jboss-5.1.0.GA/bin/run.jar:/usr/java/jdk1.6.0_32/lib/tools.jar -Xmx512m -XX:MaxPermSize=256m -Djbosstest.udp.ip_ttl=0 -Djava.endorsed.dirs=/home/he/programms/jboss-5.1.0.GA/lib/endorsed -Djboss.server.log.threshold=DEBUG -Djava.endorsed.dirs=/home/he/programms/jboss-5.1.0.GA/lib/endorsed/ -Dxb.builder.useUnorderedSequence=true org.jboss.Main -c default -b localhost -g 13bea8d5080&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #8e7cc3; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;Server started.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #8e7cc3; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;log4j:WARN No appenders could be found for logger (org.jboss.security.SecurityAssociation).&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #8e7cc3; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;log4j:WARN Please initialize the log4j system properly.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #8e7cc3; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;hgrussEjb.jar:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #8e7cc3; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;/META-INF/&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #8e7cc3; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;/META-INF/persistence.xml&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #8e7cc3; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;/test/&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #8e7cc3; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;/test/ejb/&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #8e7cc3; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;/test/ejb/GrussGottEjbLocal.class&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #8e7cc3; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;/test/ejb/UserDao.class&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #8e7cc3; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;/test/ejb/GrussGottEjb.class&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #8e7cc3; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;/test/ejb/TestGrussGott.class&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #8e7cc3; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;/test/ejb/UserDaoLocal.class&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #8e7cc3; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;/test/ejb/User.class&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #8e7cc3; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;Shutting down server: default&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #8e7cc3; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;shutdownTimeout will be=45&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #8e7cc3; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;Server stopped.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #8e7cc3; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 162.169 sec&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #8e7cc3; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #8e7cc3; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;Results :&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #8e7cc3; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #8e7cc3; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;Tests run: 1, Failures: 0, Errors: 0, Skipped: 0&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #8e7cc3; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #8e7cc3; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;[INFO] ------------------------------------------------------------------------&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #8e7cc3; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;[INFO] BUILD SUCCESS&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #8e7cc3; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;[INFO] ------------------------------------------------------------------------&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #8e7cc3; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;[INFO] Total time: 3:16.269s&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #8e7cc3; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;[INFO] Finished at: Sun Dec 30 07:46:25 CET 2012&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #8e7cc3; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;[INFO] Final Memory: 28M/167M&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #8e7cc3; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;[INFO] ------------------------------------------------------------------------&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: 14px; line-height: 24px;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;span style=&quot;color: #8e7cc3; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: 14px; font-weight: normal; line-height: 24px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;
&lt;span style=&quot;color: #444444; font-size: x-small;&quot;&gt;&lt;a href=&quot;http://milestonenext.blogspot.de/2012/12/ejb3-integration-test-with-arquillian.html&quot;&gt;Part - 1&lt;/a&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;a href=&quot;http://milestonenext.blogspot.de/2012/12/ejb3-integration-test-with-arquillian_17.html&quot;&gt;Part - 2&lt;/a&gt;&amp;nbsp; &amp;nbsp;&lt;a href=&quot;http://milestonenext.blogspot.de/2012/12/tutorial-ejb3-integration-test-with.html&quot;&gt;Part - 3&amp;nbsp;&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;a href=&quot;http://milestonenext.blogspot.de/2012/12/tutorial-ejb3-integration-test-with_29.html&quot;&gt;Part - 4&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;color: #444444; font-size: 14px; font-weight: bold; line-height: 24px;&quot;&gt;
&lt;span style=&quot;background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-weight: normal;&quot;&gt;&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://milestonenext.blogspot.com/feeds/104135068032497292/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://milestonenext.blogspot.com/2012/12/tutorial-ejb3-integration-test-with_29.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7515187228721563448/posts/default/104135068032497292'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7515187228721563448/posts/default/104135068032497292'/><link rel='alternate' type='text/html' href='http://milestonenext.blogspot.com/2012/12/tutorial-ejb3-integration-test-with_29.html' title=' Tutorial EJB3 Integration Test  with Arquillian part4 - JBoss 5 managed container and TestNG'/><author><name>Beijing Beijing</name><uri>http://www.blogger.com/profile/12013373726184997758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='28' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTm1nk7ZqbPTfBofk6dIg7Zfx820i-FNuXqGbSlZNbRw5-RPJuqgDFNoW_zdgJCMCYj6R5cTGNgNKmwTzeDsEm2EHkqni9ywIanrN-PIRd4Z4yZXUOHhC12zzDid1A1w/s220/profile.png'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_Yjpmz_UtJ5HeFwJPezHN3xf7sVqGrCdZVC_-poXiNZKpnb__V8isB140cc4S8KSUdPRoGXnq57_m6eKou3c2vb5e80E7Memj816anZNkzisEqGXt9FV05AsIEswen3X5X1qK6REyNuIr/s72-c/tag_cloud12.jpeg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7515187228721563448.post-2999317879528320439</id><published>2012-12-18T12:04:00.001-08:00</published><updated>2013-01-28T05:26:24.782-08:00</updated><title type='text'>Tutorial EJB3 Integration Test  with Arquillian part3 - JBoss 5 managed container</title><content type='html'>&lt;div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: Lato, arial, sans-serif; line-height: 24px;&quot;&gt;
&lt;div style=&quot;margin-left: 10px; margin-right: 10px;&quot;&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;Document &amp;nbsp;Version 1.0&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;releaseinfo&quot; style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; margin-left: 10px; margin-right: 10px;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div class=&quot;copyright&quot; style=&quot;margin-left: 10px; margin-right: 10px;&quot;&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;Copyright © 2012 beijing.beijing.012@gmail.com&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: 14px; line-height: 24px;&quot;&gt;
&lt;span style=&quot;color: #666666; font-size: xx-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #666666; font-size: xx-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;h3 style=&quot;font-family: &#39;Times New Roman&#39;; line-height: normal;&quot;&gt;
&lt;span style=&quot;background-color: white; color: #351c75; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14px; font-weight: normal; line-height: 17px;&quot;&gt;&lt;b&gt;Keywords:&lt;/b&gt;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14px; font-weight: normal; line-height: 17px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #351c75; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14px; font-weight: normal; line-height: 17px;&quot;&gt;JEE integration test, JEE unit test, arquillian sample, JBoss 5, JBoss 7, EJB test, arquillian dependencies, arquillian enbedded container, managed&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #351c75; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14px; font-weight: normal; line-height: 17px;&quot;&gt;container, remote container, arquillian JUnit&lt;/span&gt;&lt;/h3&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: white; color: #351c75; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14px; font-weight: normal; line-height: 17px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;a href=&quot;http://milestonenext.blogspot.de/2012/12/ejb3-integration-test-with-arquillian.html&quot; style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: #444444;&quot;&gt;Part - 1&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #444444; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;a href=&quot;http://milestonenext.blogspot.de/2012/12/ejb3-integration-test-with-arquillian_17.html&quot; style=&quot;color: #222222; font-size: small;&quot;&gt;Part - 2&lt;/a&gt;&lt;span style=&quot;color: #444444; font-size: x-small;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;a href=&quot;http://milestonenext.blogspot.de/2012/12/tutorial-ejb3-integration-test-with.html&quot; style=&quot;font-size: small;&quot;&gt;Part - 3&lt;/a&gt;&lt;/span&gt;&lt;a href=&quot;http://milestonenext.blogspot.de/2012/12/tutorial-ejb3-integration-test-with.html&quot; style=&quot;color: #222222; font-size: small;&quot;&gt;&amp;nbsp;&lt;/a&gt;&lt;span style=&quot;color: #444444; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;a href=&quot;http://milestonenext.blogspot.de/2012/12/tutorial-ejb3-integration-test-with_29.html&quot; style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: #444444;&quot;&gt;Part - 4&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;
&lt;div style=&quot;color: #222222;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;border-bottom-left-radius: 2px; border-bottom-right-radius: 2px; border-top-left-radius: 2px; border-top-right-radius: 2px; border: 0px none; padding: 5px 10px;&quot;&gt;
&lt;div style=&quot;background-color: #b2ab66;&quot;&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;b style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;Table of Contents&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #b2ab66;&quot;&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; 1. Create a simple Maven project in Eclipse&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; 2. Create project&#39;s pom.xml file&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; 3. Implement source code and test code&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; 4. Download JBoss &quot;jboss-5.1.0.GA&quot;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; 5. arquillian.xml&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; 6. Run the tests&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 6.1 Set system properties &quot;PATH&quot; and &quot;JAVA_HOME&quot;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 6.2 Run tests6.2 Run tests&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; 7. Finding the EJB with annotation&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; 8. Run test again&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; 9. Troubleshooting&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;span style=&quot;color: #cc0000; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #cc0000; font-size: large;&quot;&gt;I&lt;/span&gt;n the part 1-2 of the &quot;Tutorial EJB3 Integration Test with Arquillian&quot; we successfully tested EJB with Arquillian, deployed on JBoss 7 managed and remote container.&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
But there are still cases, where upgrade to JBoss 7 is not an &amp;nbsp;option, for whateve resons, therefore Arquillian test need to be done in older version of JBoss containers. Compare to the Arquillian test with &amp;nbsp;JBoss 7, Arquillian test with older JBoss &amp;nbsp;versionis are not so good documented.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
In the part 3-5 of this serial &amp;nbsp;I would try to to provide an &quot;one stop&quot; guide to setting up Arquillian with JBoss 5 container.&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: white; color: #674ea7; font-size: large;&quot;&gt;Arquillian part3 - JBoss 5 managed container&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #674ea7; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;b style=&quot;background-color: white; color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;1. Create a simple Maven project in Eclipse&lt;/b&gt;&lt;br /&gt;
&lt;b style=&quot;background-color: white; color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;&lt;br /&gt;&lt;/b&gt;
&lt;span style=&quot;background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;Follow the section 1 of &quot;&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;EJB3 Integration Test with Arquillian part1-JBoss 7 managed container&quot; to create a new Eclipse project &quot;&lt;/span&gt;testarq_jb5_managed&lt;span style=&quot;background-color: white;&quot;&gt;&quot;. Be sure in step2, to name the ArtifactId as &quot;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;&quot;&gt;testarq_jb5_managed&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&quot;.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;b style=&quot;background-color: white; color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;2. Create project&#39;s pom.xml file&lt;/b&gt;&lt;br /&gt;
&lt;b style=&quot;background-color: white; color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;&lt;br /&gt;&lt;/b&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;As you may remember, for Arquillian with JBoss 7, there is a dependency in pom.xml file called &quot;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;arquillian-bom&lt;/span&gt;&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;&quot;. We used this bom dependency to resolve all the Aquillian and JBoss artifacts. But unfortunately for JBoss 5, I could not find such a bom dependency, so all the dependencies in this pom.xml need to be configured &quot;manually&quot;.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;Create a &quot;pom.xml&quot; file in the &quot;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;&quot;&gt;testarq_jb5_managed&lt;/span&gt;&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;&quot; project, which we created in section 1. Replace the content of &quot;pom.xml&quot; will the content below:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div style=&quot;border-bottom-left-radius: 6px; border-bottom-right-radius: 6px; border-top-left-radius: 6px; border-top-right-radius: 6px; border: 1px solid rgb(187, 187, 187); padding: 5px 10px;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: #fffff8; color: #274e13; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;&amp;lt;project &lt;/span&gt;&lt;span style=&quot;background-color: #fffff8; color: #660000; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;xmlns=&lt;/span&gt;&lt;span style=&quot;background-color: #fffff8; color: #0b5394; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;&quot;http://maven.apache.org/POM/4.0.0&quot; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: x-small; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #274e13; white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;xsi:schemaLocation=&lt;/span&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;&quot;http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd&quot;&lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: x-small; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #274e13; white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;lt;modelVersion&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;4.0.0&lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;lt;/modelVersion&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: x-small; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #274e13; white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;testarg&lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: x-small; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #274e13; white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;testarq_jb5_1_managed&lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: x-small; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #274e13; white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;lt;version&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;0.0.1&lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;lt;/version&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: x-small; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #274e13; white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;lt;description&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;test arr&lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;lt;/description&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; font-size: x-small; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;lt;properties&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: x-small; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #274e13; white-space: pre;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;lt;project.build.sourceEncoding&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;UTF-8&lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;lt;/project.build.sourceEncoding&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: x-small; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;       &lt;/span&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;&amp;lt;!-- 1.0.3.Final 1.0.0.Alpha5 --&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: x-small; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #274e13; white-space: pre;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;lt;version.arquillian_core&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;1.0.3.Final&lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;lt;/version.arquillian_core&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: x-small; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #274e13; white-space: pre;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;lt;version.org.jboss.jbossas&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;5.1.0.GA&lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;lt;/version.org.jboss.jbossas&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: x-small; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #274e13; white-space: pre;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;lt;version.org.jboss.jbossas_server-manager&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;1.0.3.GA&lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;lt;/version.org.jboss.jbossas_server-manager&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: x-small; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #274e13; white-space: pre;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;lt;version.ejb3_api&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;3.1.0&lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;lt;/version.ejb3_api&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; font-size: x-small; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;lt;/properties&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; font-size: x-small; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;lt;repositories&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: x-small; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;&amp;lt;!-- Use this repository you could find all jars for jb5. it compiles.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #0b5394; font-size: x-small; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;         &lt;/span&gt;Test runs with error.. --&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; font-size: x-small; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;        &lt;/span&gt;&amp;lt;repository&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; font-size: x-small; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;              &lt;/span&gt;&amp;lt;id&amp;gt;maven-us.nuxeo.org&amp;lt;/id&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: x-small; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #274e13; white-space: pre;&quot;&gt;             &lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;lt;url&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;https://maven-us.nuxeo.org/nexus/content/repositories/public&lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;lt;/url&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; font-size: x-small; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;        &lt;/span&gt;&amp;lt;/repository&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; font-size: x-small; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;lt;/repositories&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; font-size: x-small; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;lt;build&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; font-size: x-small; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;        &lt;/span&gt;&amp;lt;plugins&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; font-size: x-small; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;               &lt;/span&gt;&amp;lt;plugin&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: x-small; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #274e13; white-space: pre;&quot;&gt;                      &lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;maven-compiler-plugin&lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: x-small; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #274e13; white-space: pre;&quot;&gt;                      &lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;lt;version&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;2.3.2&lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;lt;/version&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; font-size: x-small; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                     &lt;/span&gt;&amp;lt;configuration&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: x-small; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #274e13; white-space: pre;&quot;&gt;                           &lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;lt;source&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;1.6&lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;lt;/source&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: x-small; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #274e13; white-space: pre;&quot;&gt;                           &lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;lt;target&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;1.6&lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;lt;/target&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; font-size: x-small; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                           &lt;/span&gt;&amp;lt;/configuration&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; font-size: x-small; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;              &lt;/span&gt;&amp;lt;/plugin&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; font-size: x-small; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;              &lt;/span&gt;&amp;lt;plugin&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: x-small; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #274e13; white-space: pre;&quot;&gt;                    &lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;maven-surefire-plugin&lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: x-small; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #274e13; white-space: pre;&quot;&gt;                    &lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;lt;version&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;2.12&lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;lt;/version&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; font-size: x-small; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                    &lt;/span&gt;&amp;lt;/plugin&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; font-size: x-small; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;        &lt;/span&gt;&amp;lt;/plugins&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;&lt;span style=&quot;color: #274e13; font-size: x-small;&quot;&gt;&amp;lt;/build&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; font-size: x-small; line-height: 24px;&quot;&gt;&amp;lt;dependencies&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; font-size: x-small; line-height: 24px;&quot;&gt;&amp;lt;/dependencies&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; font-size: x-small; line-height: 24px;&quot;&gt;&amp;lt;profiles&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; font-size: x-small; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;        &lt;/span&gt;&amp;lt;profile&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;              &lt;/span&gt;&amp;lt;id&amp;gt;a&lt;/span&gt;&lt;span style=&quot;color: #444444; line-height: 24px;&quot;&gt;rquillian-jbossas-managed_5_1&lt;/span&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&amp;lt;/id&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; font-size: x-small; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;              &lt;/span&gt;&amp;lt;dependencies&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; font-size: x-small; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                    &lt;/span&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                          &lt;/span&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #444444; line-height: 24px;&quot;&gt;junit&lt;/span&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                          &lt;/span&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #444444; line-height: 24px;&quot;&gt;junit&lt;/span&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                          &lt;/span&gt;&amp;lt;version&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #444444; line-height: 24px;&quot;&gt;4.8.1&lt;/span&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&amp;lt;/version&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                          &lt;/span&gt;&amp;lt;scope&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #444444; line-height: 24px;&quot;&gt;test&lt;/span&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&amp;lt;/scope&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; font-size: x-small; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;              &lt;/span&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; font-size: x-small; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;              &lt;/span&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                    &lt;/span&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #444444; line-height: 24px;&quot;&gt;org.jboss.arquillian.container&lt;/span&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                    &lt;/span&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #444444; line-height: 24px;&quot;&gt;arquillian-jbossas-managed-5.1&lt;/span&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                    &lt;/span&gt;&amp;lt;version&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #444444; line-height: 24px;&quot;&gt;1.0.0.CR3&lt;/span&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&amp;lt;/version&amp;gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                    &lt;/span&gt;&amp;lt;scope&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #444444; line-height: 24px;&quot;&gt;test&lt;/span&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&amp;lt;/scope&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; font-size: x-small; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;              &lt;/span&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; font-size: x-small; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;              &lt;/span&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                    &lt;/span&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #444444; line-height: 24px;&quot;&gt;org.jboss.jbossas&lt;/span&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                    &lt;/span&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #444444; line-height: 24px;&quot;&gt;jboss-server-manager&lt;/span&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                    &lt;/span&gt;&amp;lt;version&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #444444; line-height: 24px;&quot;&gt;1.0.3.GA&lt;/span&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&amp;lt;/version&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                    &lt;/span&gt;&amp;lt;scope&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #444444; line-height: 24px;&quot;&gt;test&lt;/span&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&amp;lt;/scope&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; font-size: x-small; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                &lt;/span&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; font-size: x-small; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;               &lt;/span&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                      &lt;/span&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #444444; line-height: 24px;&quot;&gt;org.jboss.jbossas&lt;/span&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                      &lt;/span&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #444444; line-height: 24px;&quot;&gt;jboss-as-client&lt;/span&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                     &lt;/span&gt;&amp;lt;version&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #444444; line-height: 24px;&quot;&gt;5.1.0.GA&lt;/span&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&amp;lt;/version&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                     &lt;/span&gt;&amp;lt;type&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #444444; line-height: 24px;&quot;&gt;pom&lt;/span&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&amp;lt;/type&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                     &lt;/span&gt;&amp;lt;scope&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #444444; line-height: 24px;&quot;&gt;provided&lt;/span&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&amp;lt;/scope&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: x-small; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;background-color: #fffff8; color: #274e13; white-space: pre;&quot;&gt;                     &lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;&amp;lt;!-- it is the javassist:javassist:jar:3.4.GA: , causing method not&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white; color: #0b5394; font-size: x-small; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                          &lt;/span&gt;found exception. But exclude this lib caused class not found exception so&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white; color: #0b5394; font-size: x-small; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                           &lt;/span&gt;now first exclude this, and then try introducing a correct javasist lib --&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; font-size: x-small; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                      &lt;/span&gt;&amp;lt;exclusions&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; font-size: x-small; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                           &lt;/span&gt;&amp;lt;exclusion&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                                 &lt;/span&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #444444; line-height: 24px;&quot;&gt;javassist&lt;/span&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                                 &lt;/span&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #444444; line-height: 24px;&quot;&gt;javassist&lt;/span&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; font-size: x-small; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                                 &lt;/span&gt;&amp;lt;/exclusion&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; font-size: x-small; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                           &lt;/span&gt;&amp;lt;/exclusions&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; font-size: x-small; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                &lt;/span&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; font-size: x-small; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                &lt;/span&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                          &lt;/span&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #444444; line-height: 24px;&quot;&gt;javassist&lt;/span&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                          &lt;/span&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #444444; line-height: 24px;&quot;&gt;javassist&lt;/span&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                          &lt;/span&gt;&amp;lt;version&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #444444; line-height: 24px;&quot;&gt;3.9.0.GA&lt;/span&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&amp;lt;/version&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                          &lt;/span&gt;&amp;lt;scope&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #444444; line-height: 24px;&quot;&gt;provided&lt;/span&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&amp;lt;/scope&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; font-size: x-small; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                 &lt;/span&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; font-size: x-small; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                 &lt;/span&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                          &lt;/span&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #444444; line-height: 24px;&quot;&gt;org.jboss.arquillian.junit&lt;/span&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                          &lt;/span&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #444444; line-height: 24px;&quot;&gt;arquillian-junit-container&lt;/span&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                          &lt;/span&gt;&amp;lt;version&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #444444; line-height: 24px;&quot;&gt;${version.arquillian_core}&lt;/span&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&amp;lt;/version&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                          &lt;/span&gt;&amp;lt;scope&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #444444; line-height: 24px;&quot;&gt;test&lt;/span&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&amp;lt;/scope&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; font-size: x-small; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                 &lt;/span&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; font-size: x-small; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                 &lt;/span&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                           &lt;/span&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #444444; line-height: 24px;&quot;&gt;org.jboss.arquillian.container&lt;/span&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                           &lt;/span&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #444444; line-height: 24px;&quot;&gt;arquillian-container-sp&lt;/span&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;i&amp;lt;/artifactId&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                           &lt;/span&gt;&amp;lt;version&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #444444; line-height: 24px;&quot;&gt;${version.arquillian_core}&lt;/span&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&amp;lt;/version&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                           &lt;/span&gt;&amp;lt;scope&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #444444; line-height: 24px;&quot;&gt;test&lt;/span&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&amp;lt;/scope&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; font-size: x-small; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                   &lt;/span&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; font-size: x-small; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                   &lt;/span&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                            &lt;/span&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #444444; line-height: 24px;&quot;&gt;trove&lt;/span&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                            &lt;/span&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #444444; line-height: 24px;&quot;&gt;trove&lt;/span&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                            &lt;/span&gt;&amp;lt;version&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #444444; line-height: 24px;&quot;&gt;1.0.2&lt;/span&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&amp;lt;/version&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                            &lt;/span&gt;&amp;lt;scope&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #444444; line-height: 24px;&quot;&gt;test&lt;/span&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&amp;lt;/scope&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; font-size: x-small; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                    &lt;/span&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; font-size: x-small; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;              &lt;/span&gt;&amp;lt;/dependencies&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; font-size: x-small; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;           &lt;/span&gt;&amp;lt;/profile&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; font-size: x-small; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;       &lt;/span&gt;&amp;lt;/profiles&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; font-size: x-small; line-height: 24px;&quot;&gt;&amp;lt;/project&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;span style=&quot;color: #674ea7; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;&amp;nbsp;! Instead of using the default &quot;maven central repository&quot;, we have to switch repository to &quot;&lt;/span&gt;&lt;i style=&quot;color: #cc0000; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: small; line-height: 24px;&quot;&gt;maven-us.nuxeo.org&lt;/i&gt;&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;&quot;, as configured in the repositories section of the above &quot;pom.xml&quot; file.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;Maven could not find some dependencies in &quot;central maven repository&quot; ( maybe they were removed, or not hosted there at all °_°).&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;b style=&quot;background-color: white; color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: 14px; line-height: 24px;&quot;&gt;3. Implement source code and test code&lt;/b&gt;&lt;br /&gt;
&lt;br style=&quot;background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14px; line-height: 17px;&quot; /&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;As code sample we will take a typical use case in JEE application:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;A business layer/class uses a DAO (data access object) to access business data. Here business class and DAO class are both stateless session bean.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;To implement and test the above use case, we need to create following classes in the &quot;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;&quot;&gt;testarq_jb5_managed&lt;/span&gt;&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;&quot; project:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;2 for bussiness classes:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;b&gt;GrussGottEjbLocal.java&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;b&gt;GrussGottEjb.java&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;2 for DAO classes:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;b&gt;HalloDaoLocal.java&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;b&gt;HalloDao.java&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;and the test class:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;b&gt;TestGrussGott.java&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;

&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;Now the &quot;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;&quot;&gt;testarq_jb5_managed&quot;&lt;/span&gt;&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;&amp;nbsp;project in Eclipse will looks like:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small; line-height: 24px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEha05pVGWbT10zj3HUB1TEZYrZNZrmQWankIQ_qwukrfFal3dmRKFBcuVniglMwwmm7D911n17ufJTVrJwZl26KpYhYIC6C4oecpaOGMvUWpphNfeESFh7iMO44oAD6gCnnCEsWYkGc5ner/s1600/arquillian_create_maven_pro_jb7_10.jpeg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEha05pVGWbT10zj3HUB1TEZYrZNZrmQWankIQ_qwukrfFal3dmRKFBcuVniglMwwmm7D911n17ufJTVrJwZl26KpYhYIC6C4oecpaOGMvUWpphNfeESFh7iMO44oAD6gCnnCEsWYkGc5ner/s1600/arquillian_create_maven_pro_jb7_10.jpeg&quot; height=&quot;320&quot; width=&quot;290&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small; line-height: 24px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;Replace the content of java files with following contents:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: #fffff8; border-radius: 6px 6px 6px 6px; border: 1px solid #BBBBBB; padding: 5px 10px 5px;&quot;&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small; line-height: 24px;&quot;&gt;&lt;b&gt;HalloDaoLocal.java&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;span style=&quot;color: #660000;&quot;&gt;package&lt;/span&gt;&lt;span style=&quot;color: #674ea7;&quot;&gt; &lt;/span&gt;test.ejb;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;span style=&quot;color: #660000;&quot;&gt;import&lt;/span&gt; javax.ejb.Local;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;@Local&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;span style=&quot;color: #660000;&quot;&gt;public interface&lt;/span&gt; HalloDaoLocal {&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;public&lt;/span&gt; String getText();&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #674ea7; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;background-color: #fffff8; border-radius: 6px 6px 6px 6px; border: 1px solid #BBBBBB; padding: 5px 10px 5px;&quot;&gt;
&lt;br /&gt;
&lt;div style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: small; line-height: 24px;&quot;&gt;
&lt;b&gt;HalloDao.java&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;span style=&quot;color: #660000;&quot;&gt;package&lt;/span&gt; test.ejb;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;span style=&quot;color: #660000;&quot;&gt;import&lt;/span&gt; javax.ejb.Stateless;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;@Stateless&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;span style=&quot;color: #660000;&quot;&gt;public class&lt;/span&gt; HalloDao &lt;span style=&quot;color: #660000;&quot;&gt;implements&lt;/span&gt; HalloDaoLocal {&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;@Override&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;span style=&quot;color: #660000;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;public&lt;/span&gt; String getText() {&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #0b5394;&quot;&gt;&quot;!&quot;&lt;/span&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: small; line-height: 24px;&quot;&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; font-size: small; line-height: 24px;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #444444;&quot;&gt;!&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;color: #444444;&quot;&gt;&quot;HalloDao&quot; is still not realy a DAO, it is not equipted &amp;nbsp;with any persistence or database utilities.&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;b&gt;Persistence with JPA / Hibernate will be shown in the part 4 of this serial. For now, we just want to simulate calling a session bean in an other session bean, therefore, no accessing database is really necessary. &amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8; border-radius: 6px 6px 6px 6px; border: 1px solid #BBBBBB; padding: 5px 10px 5px;&quot;&gt;
&lt;br /&gt;
&lt;div style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: small; line-height: 24px;&quot;&gt;
&lt;b&gt;GrussGottEjbLocal.java&lt;/b&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;span style=&quot;color: #660000;&quot;&gt;package&lt;/span&gt; test.ejb;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;span style=&quot;color: #660000;&quot;&gt;import&lt;/span&gt; javax.ejb.Local;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;@Local&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;span style=&quot;color: #660000;&quot;&gt;public interface&lt;/span&gt; GrussGottEjbLocal {&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;public&lt;/span&gt; String sayHello(String name);&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;span style=&quot;color: #660000;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;public&lt;/span&gt; String sayHelloTxt(String name);&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: small; line-height: 24px;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: small; line-height: 24px;&quot;&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8; border-radius: 6px 6px 6px 6px; border: 1px solid #BBBBBB; padding: 5px 10px 5px;&quot;&gt;
&lt;br /&gt;
&lt;b style=&quot;background-color: white; color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: small; line-height: 24px;&quot;&gt;GrussGottEjb.java&lt;/b&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;span style=&quot;color: #660000;&quot;&gt;package&lt;/span&gt; test.ejb;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;span style=&quot;color: #660000;&quot;&gt;import&lt;/span&gt; javax.ejb.EJB;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;span style=&quot;color: #660000;&quot;&gt;import&lt;/span&gt; javax.ejb.Stateless;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;@Stateless&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;span style=&quot;color: #660000;&quot;&gt;public class&lt;/span&gt; GrussGottEjb &lt;span style=&quot;color: #660000;&quot;&gt;implements&lt;/span&gt; GrussGottEjbLocal {&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;@EJB&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;HalloDaoLocal &lt;span style=&quot;color: #0b5394;&quot;&gt;halloDao&lt;/span&gt;;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;@Override&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;span style=&quot;color: #660000;&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;public&lt;/span&gt; String sayHello(String name) {&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;span style=&quot;color: #660000;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #660000;&quot;&gt;&quot;Hallo &quot;&lt;/span&gt; &amp;nbsp;+ name;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;font-weight: bold; white-space: pre;&quot;&gt;     &lt;/span&gt;@Override&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;public&lt;/span&gt; String sayHelloTxt(String name) {&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;      &lt;/span&gt;String txt = &lt;span style=&quot;color: #0b5394;&quot;&gt;halloDao&lt;/span&gt;.getText();&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;span style=&quot;color: #660000;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;return&lt;/span&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt; &quot;Hallo &quot;&lt;/span&gt; + name + txt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8; border-radius: 6px 6px 6px 6px; border: 1px solid #BBBBBB; padding: 5px 10px 5px;&quot;&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: 14px; line-height: 24px;&quot;&gt;&lt;b&gt;TestGrussGott.java&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;div style=&quot;background-color: white;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;&lt;span style=&quot;color: #660000;&quot;&gt;package&lt;/span&gt; test.ejb;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;&lt;span style=&quot;color: #660000;&quot;&gt;import&lt;/span&gt; javax.ejb.EJB;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;&lt;span style=&quot;color: #660000;&quot;&gt;import&lt;/span&gt; junit.framework.Assert;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;&lt;span style=&quot;color: #660000;&quot;&gt;import&lt;/span&gt; org.jboss.arquillian.container.test.api.Deployment;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;&lt;span style=&quot;color: #660000;&quot;&gt;import&lt;/span&gt; org.jboss.arquillian.junit.Arquillian;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;&lt;span style=&quot;color: #660000;&quot;&gt;import&lt;/span&gt; org.jboss.shrinkwrap.api.ShrinkWrap;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;&lt;span style=&quot;color: #660000;&quot;&gt;import&lt;/span&gt; org.jboss.shrinkwrap.api.asset.EmptyAsset;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;&lt;span style=&quot;color: #660000;&quot;&gt;import&lt;/span&gt; org.jboss.shrinkwrap.api.spec.JavaArchive;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;&lt;span style=&quot;color: #660000;&quot;&gt;import &lt;/span&gt;org.junit.Test;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;&lt;span style=&quot;color: #660000;&quot;&gt;import&lt;/span&gt; org.junit.runner.RunWith;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #0b5394; font-size: 14px; line-height: 24px;&quot;&gt;/**&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #0b5394; font-size: 14px; line-height: 24px;&quot;&gt;&amp;nbsp;* @author he&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #0b5394; font-size: 14px; line-height: 24px;&quot;&gt;&amp;nbsp;*&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #0b5394; font-size: 14px; line-height: 24px;&quot;&gt;&amp;nbsp;*/&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;@RunWith(Arquillian.&lt;span style=&quot;color: #660000;&quot;&gt;class&lt;/span&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;&lt;span style=&quot;color: #660000;&quot;&gt;public class&lt;/span&gt; TestGrussGott {&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;@Deployment&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;public static&lt;/span&gt; JavaArchive createDeployment() {&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;      &lt;/span&gt;JavaArchive jar = ShrinkWrap.create(JavaArchive.&lt;span style=&quot;color: #660000;&quot;&gt;class&lt;/span&gt;, &lt;span style=&quot;color: #0b5394;&quot;&gt;&quot;hgrussEjb.jar&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;      &lt;/span&gt;jar.addClass(GrussGottEjbLocal.&lt;span style=&quot;color: #660000;&quot;&gt;class&lt;/span&gt;).addClass(GrussGottEjb.&lt;span style=&quot;color: #660000;&quot;&gt;class&lt;/span&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;      &lt;/span&gt;jar.addClass(HalloDao.&lt;span style=&quot;color: #660000;&quot;&gt;class&lt;/span&gt;).addClass(HalloDaoLocal.&lt;span style=&quot;color: #660000;&quot;&gt;class&lt;/span&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;span style=&quot;color: #274e13;&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;//jar.addAsManifestResource(EmptyAsset.INSTANCE, &quot;beans.xml&quot;);&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;      &lt;/span&gt;System.&lt;span style=&quot;color: #073763;&quot;&gt;out&lt;/span&gt;.println(jar.toString(&lt;span style=&quot;color: #660000;&quot;&gt;true&lt;/span&gt;));&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;span style=&quot;color: #660000;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;return&lt;/span&gt; jar;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;font-size: 14px; line-height: 24px; white-space: pre;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;@EJB&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;GrussGottEjbLocal &lt;span style=&quot;color: #0b5394;&quot;&gt;grusEjb&lt;/span&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;@Test&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;public void&lt;/span&gt; sayHallo() {&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;      &lt;/span&gt;String result = &lt;span style=&quot;color: #0b5394;&quot;&gt;grusEjb&lt;/span&gt;.sayHello(&lt;span style=&quot;color: #0b5394;&quot;&gt;&quot;hehe&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;      &lt;/span&gt;Assert.assertEquals(&lt;span style=&quot;color: #0b5394;&quot;&gt;&quot;Hallo hehe&quot;&lt;/span&gt;, result);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;@Test&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;public void&lt;/span&gt; sayHalloTxt() {&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;      &lt;/span&gt;String result = &lt;span style=&quot;color: #0b5394;&quot;&gt;grusEjb&lt;/span&gt;.sayHelloTxt(&lt;span style=&quot;color: #0b5394;&quot;&gt;&quot;hehe&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;      &lt;/span&gt;Assert.assertEquals&lt;span style=&quot;color: #0b5394;&quot;&gt;(&quot;Hallo hehe!&quot;&lt;/span&gt;, result);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;background-color: white;&quot;&gt;
&lt;div style=&quot;color: #222222; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: 14px; font-weight: bold; line-height: 24px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; font-weight: bold; line-height: 24px;&quot;&gt;
&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;color: #444444;&quot;&gt;! In the &quot;TestGrussGott.java&quot;&amp;nbsp; the line for &quot;beans.xml&quot; is commented out. This line is put here only to show, that unlike Arquillian test with JBoss 7 container, for Arquillian test with JBoss 5 container, the &quot;beans.xml&quot; is not needed. &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; font-weight: bold; line-height: 24px;&quot;&gt;
&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;color: #444444;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;b&gt;&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;4. Download JBoss &quot;&lt;/span&gt;&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;jboss-5.1.0.GA&quot;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; font-weight: normal; line-height: 24px;&quot;&gt;Dowload the JBoss server &amp;nbsp;from www.jboss.org, and extract it to your favorite location.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; font-weight: normal; line-height: 24px;&quot;&gt;On my machine , I extracted jboss to:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: #fffff8; border-radius: 6px 6px 6px 6px; border: 1px solid #BBBBBB; padding: 5px 10px 5px;&quot;&gt;
&lt;b style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;/home/he/&lt;/span&gt;&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;jboss-5.1.0.GA&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; font-weight: normal; line-height: 24px;&quot;&gt;As usual, we need to set up PATH and JAVA_HOME system variables for jboss. When you have followed the part 1-2 of this turorial serial, where JBoss 7 is used, you mus have PATH and JAVA_HOME set to your jdk7 installation. This should be changed to a jdk6 location.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;Following is the setting on my machine:&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: #fffff8; border-radius: 6px 6px 6px 6px; border: 1px solid #BBBBBB; padding: 5px 10px 5px;&quot;&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;&amp;gt; &amp;nbsp;export JAVA_HOME=/usr/java/jdk1.6.0_32/&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&amp;gt; &amp;nbsp;export PATH=/usr/java/jdk1.6.0_32/bin:$PATH&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-weight: normal; line-height: 24px;&quot;&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;b style=&quot;color: black; font-family: &#39;Times New Roman&#39;; line-height: normal;&quot;&gt;&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;5. arquillian.xml&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;b style=&quot;color: black; font-family: &#39;Times New Roman&#39;; line-height: normal;&quot;&gt;&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 24px;&quot;&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;We still need to tell Arquillian where to find JBosss installation, and which JBoss instance is to be managed by Arquillian.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 24px;&quot;&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;Create an &quot;arquillian.xml&quot; in the folder&quot;src/test/resources&quot; with the content below:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8; border-radius: 6px 6px 6px 6px; border: 1px solid #BBBBBB; padding: 5px 10px 5px;&quot;&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;span style=&quot;color: #274e13; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small; line-height: 24px;&quot;&gt;&amp;lt;?xml &lt;/span&gt;&lt;span style=&quot;color: #660000; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small; line-height: 24px;&quot;&gt;version&lt;/span&gt;&lt;span style=&quot;color: #274e13; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small; line-height: 24px;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #0b5394; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small; line-height: 24px;&quot;&gt;&quot;1.0&lt;/span&gt;&lt;span style=&quot;color: #274e13; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small; line-height: 24px;&quot;&gt;&quot; &lt;/span&gt;&lt;span style=&quot;color: #660000; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small; line-height: 24px;&quot;&gt;encoding&lt;/span&gt;&lt;span style=&quot;color: #274e13; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small; line-height: 24px;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #0b5394; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small; line-height: 24px;&quot;&gt;&quot;UTF-8&quot;&lt;/span&gt;&lt;span style=&quot;color: #274e13; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small; line-height: 24px;&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #274e13; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small; line-height: 24px;&quot;&gt;&amp;lt;arquillian&lt;/span&gt;&lt;span style=&quot;color: #660000; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small; line-height: 24px;&quot;&gt; xmlns:xsi&lt;/span&gt;&lt;span style=&quot;color: #274e13; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small; line-height: 24px;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #0b5394; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small; line-height: 24px;&quot;&gt;&quot;http://www.w3.org/2001/XMLSchema-instance&quot;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #274e13; white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;xmlns&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #274e13; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small; line-height: 24px;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #0b5394; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small; line-height: 24px;&quot;&gt;&quot;http://jboss.org/schema/arquillian&quot;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #274e13; white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;xsi:schemaLocation&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #274e13; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small; line-height: 24px;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #0b5394; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small; line-height: 24px;&quot;&gt;&quot;http://jboss.org/schema/arquillian http://jboss.org/schema/arquillian/arquillian_1_0.xsd&quot;&lt;/span&gt;&lt;span style=&quot;color: #274e13; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small; line-height: 24px;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #274e13; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small; line-height: 24px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #274e13; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;&amp;lt;container&lt;/span&gt;&lt;span style=&quot;color: #660000; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small; line-height: 24px;&quot;&gt; qualifier&lt;/span&gt;&lt;span style=&quot;color: #274e13; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small; line-height: 24px;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #0b5394; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small; line-height: 24px;&quot;&gt;&quot;jboss5&quot;&lt;/span&gt;&lt;span style=&quot;color: #274e13; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small; line-height: 24px;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #660000; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small; line-height: 24px;&quot;&gt;default&lt;/span&gt;&lt;span style=&quot;color: #274e13; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small; line-height: 24px;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #0b5394; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small; line-height: 24px;&quot;&gt;&quot;true&quot;&lt;/span&gt;&lt;span style=&quot;color: #274e13; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small; line-height: 24px;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #274e13; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;        &lt;/span&gt;&amp;lt;configuration&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: #274e13; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;            &lt;/span&gt;&amp;lt;property&lt;/span&gt;&lt;span style=&quot;color: #660000; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small; line-height: 24px;&quot;&gt; name&lt;/span&gt;&lt;span style=&quot;color: #274e13; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small; line-height: 24px;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #0b5394; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small; line-height: 24px;&quot;&gt;&quot;jbossHome&quot;&lt;/span&gt;&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small; line-height: 24px;&quot;&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;gt;&lt;/span&gt;path_2_your_jboss/jboss-5.1.0.GA&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;lt;/property&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;span style=&quot;color: #274e13; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;            &lt;/span&gt;&amp;lt;property &lt;/span&gt;&lt;span style=&quot;color: #660000; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small; line-height: 24px;&quot;&gt;name=&lt;/span&gt;&lt;span style=&quot;color: #0b5394; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small; line-height: 24px;&quot;&gt;&quot;profileName&quot;&lt;/span&gt;&lt;span style=&quot;color: #274e13; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small; line-height: 24px;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small; line-height: 24px;&quot;&gt;default&lt;/span&gt;&lt;span style=&quot;color: #274e13; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small; line-height: 24px;&quot;&gt;&amp;lt;/property&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #274e13; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;        &lt;/span&gt;&amp;lt;/configuration&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #274e13; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;&amp;lt;/container&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #274e13; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small; line-height: 24px;&quot;&gt;&amp;lt;/arquillian&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; font-weight: bold; line-height: 24px;&quot;&gt;
&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;color: #444444;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;
&lt;b style=&quot;font-family: &#39;Times New Roman&#39;; line-height: normal;&quot;&gt;&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;6. Run the tests&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b style=&quot;font-family: &#39;Times New Roman&#39;; line-height: normal;&quot;&gt;&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;We have learned how to run the Maven test in Eclipse. Now we will try runing the tests using command line.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;b&gt;6.1 Set system properties &quot;PATH&quot; and &quot;JAVA_HOME&quot;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;Make sure you have correctly set &quot;PATH&quot; and &quot;JAVA_HOME&quot;. In case of linux you could check this using following command:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8; border-radius: 6px 6px 6px 6px; border: 1px solid #BBBBBB; padding: 5px 10px 5px;&quot;&gt;
&lt;br /&gt;
&lt;div style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&amp;gt; which java&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;/usr/java/jdk1.6.0_32/bin/java&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&amp;gt; echo $JAVA_HOME&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div style=&quot;background-color: white;&quot;&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;/usr/java/jdk1.6.0_32/&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;div style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; font-weight: bold; line-height: 24px;&quot;&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;Command to set the properties:&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: #fffff8; border-radius: 6px 6px 6px 6px; border: 1px solid #BBBBBB; padding: 5px 10px 5px;&quot;&gt;
&lt;span style=&quot;background-color: white; color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;&amp;nbsp; export JAVA_HOME=/usr/java/jdk1.6.0_32/&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;background-color: white;&quot;&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&amp;nbsp; export PATH=/usr/java/jdk1.6.0_32/bin:$PATH&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; font-weight: bold; line-height: 24px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; font-weight: bold; line-height: 24px;&quot;&gt;6.2 Run tests&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; font-weight: bold; line-height: 24px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;Run Maven tests using following command:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8; border-radius: 6px 6px 6px 6px; border: 1px solid #BBBBBB; padding: 5px 10px 5px;&quot;&gt;
&lt;span style=&quot;background-color: white; color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;&amp;gt; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; line-height: 24px;&quot;&gt;&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;mvn clean test -Parquillian-jbossas-managed_5_1&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; font-weight: bold; line-height: 24px;&quot;&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
When you have followed all the steps till now, with no mistakes, the test results will be :&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;div style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjF-OAkbCA456OHmx3Cg4j9uz4ocLvWzpiEP0-Gk7AQ_goN32lGuM-0waOhgKQ5FsQjRGeANZFjqIEkq0rA56ZcydbJ47-fVJABhV5kPaQ7U0LczC_PE1AR2IVW-YRStRXfMI0QKVu6ohRI/s1600/arquillian_create_maven_pro_jb7_11.jpeg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjF-OAkbCA456OHmx3Cg4j9uz4ocLvWzpiEP0-Gk7AQ_goN32lGuM-0waOhgKQ5FsQjRGeANZFjqIEkq0rA56ZcydbJ47-fVJABhV5kPaQ7U0LczC_PE1AR2IVW-YRStRXfMI0QKVu6ohRI/s1600/arquillian_create_maven_pro_jb7_11.jpeg&quot; height=&quot;260&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;b style=&quot;background-color: white; color: #444444;&quot;&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b style=&quot;background-color: white; color: #444444;&quot;&gt;Test Failed!&lt;/b&gt;&lt;/div&gt;
&lt;span style=&quot;background-color: white; color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;To find out more details about the test failure, we will have a close look at the maven/surefile test report, &amp;nbsp;this is the &quot;&lt;/span&gt;&lt;span style=&quot;background-color: white; line-height: 24px;&quot;&gt;&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;test.ejb.TestGrussGott.txt&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;&quot; in /target/surefile-reports/:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: #fffff8; border-radius: 6px 6px 6px 6px; border: 1px solid #BBBBBB; padding: 5px 10px 5px;&quot;&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: white;&quot;&gt;
&lt;span style=&quot;background-color: white; color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;...&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #444444; font-size: 14px; line-height: 24px;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;-------------------------------------------------------------------------------&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #444444; font-size: 14px; line-height: 24px;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;Test set: test.ejb.TestGrussGott&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #444444; font-size: 14px; line-height: 24px;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;-------------------------------------------------------------------------------&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #444444; font-size: 14px; line-height: 24px;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;Tests run: 2, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 124.531 sec &amp;lt;&amp;lt;&amp;lt; FAILURE!&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #444444; font-size: 14px; line-height: 24px;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;sayHallo(test.ejb.TestGrussGott) &amp;nbsp;Time elapsed: 1.442 sec &amp;nbsp;&amp;lt;&amp;lt;&amp;lt; ERROR!&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #444444; font-size: 14px; line-height: 24px;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;java.lang.NullPointerException&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #444444; font-size: 14px; line-height: 24px;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;at test.ejb.TestGrussGott.sayHallo(TestGrussGott.java:48)&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #444444; font-size: 14px; line-height: 24px;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #444444; font-size: 14px; line-height: 24px;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #444444; font-size: 14px; line-height: 24px;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;....&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div style=&quot;line-height: 24px;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #444444;&quot;&gt;The Exception above says that in the &quot;TestGrussGott,java&quot;, we have a problem on the line :&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8; border-radius: 6px 6px 6px 6px; border: 1px solid #BBBBBB; padding: 5px 10px 5px;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8; border-radius: 6px 6px 6px 6px; border: 1px solid #BBBBBB; padding: 5px 10px 5px;&quot;&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: white;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #674ea7; font-size: 14px; line-height: 24px;&quot;&gt;...&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #674ea7; font-size: 14px; line-height: 24px;&quot;&gt;@Test&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #674ea7; white-space: pre;&quot;&gt;     &lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;public void&lt;/span&gt;&lt;span style=&quot;color: #674ea7;&quot;&gt; sayHallo() {&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;span style=&quot;color: #cc0000;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc0000;&quot;&gt;String result = grusEjb.sayHello(&quot;hehe&quot;);&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #674ea7; white-space: pre;&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;color: #674ea7;&quot;&gt;Assert.assertEquals(&lt;/span&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;&quot;Hallo hehe&quot;&lt;/span&gt;&lt;span style=&quot;color: #674ea7;&quot;&gt;, result);&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #674ea7; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #674ea7; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;...&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;font-size: 14px; font-style: italic; line-height: 24px;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;font-style: normal;&quot;&gt;
&lt;span style=&quot;color: #674ea7; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #444444; line-height: 24px;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;Here we have a NullPointerException for the object &quot;grusEjb&quot;, i.e. &quot;grusEjb&quot; is null. This objected was injected in test class using @EJB annotation:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: black; font-family: &#39;Times New Roman&#39;; font-size: medium; font-style: normal; line-height: normal;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #674ea7; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;@EJB&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: black; font-family: &#39;Times New Roman&#39;; font-size: medium; font-style: normal; line-height: normal;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #674ea7; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;GrussGottEjbLocal grusEjb;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #674ea7; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: black; font-family: &#39;Times New Roman&#39;; font-style: normal; line-height: normal;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;i style=&quot;background-color: white; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #444444; display: inline !important;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;We remember in the test cases using JBoss 7, we have always been doing like this, why this time failed?&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;Actually, our problem lies really in this place, in the @EJB annotation!&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;To put it short:&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;Arquillian can not find the &quot;GrussGottEjb&quot; using only @EJB, althrough the bean is deployed in JBoss.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-style: italic;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-style: italic;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;b style=&quot;font-family: &#39;Times New Roman&#39;; font-style: normal;&quot;&gt;&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;7. Finding the EJB with annotation&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;b style=&quot;font-family: &#39;Times New Roman&#39;; font-style: normal;&quot;&gt;&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;When only @EJB is used, Arquillian tries to look up the &quot;GrussGottEjb&quot; session bean using following JNDI (could be seen in JBoss server.log):&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8; border-radius: 6px 6px 6px 6px; border: 1px solid #BBBBBB; padding: 5px 10px 5px;&quot;&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: white; color: #444444;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;i&gt;....&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;i&gt;FINE &amp;nbsp;[org.jboss.arquillian.test.spi.TestEnricher]&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #444444;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;i&gt;(http-localhost%2F127.0.0.1-8080-2) Could not lookup @javax.ejb.EJB(beanName=, mappedName=, beanInterface=class java.lang.Object, description=, name=),&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #444444;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;i&gt;other Enrichers might, move on. Exception: No EJB found in JNDI,&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #444444;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;i&gt;tried the following names: java:global/test.ear/test/GrussGottEjbLocalBean,&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;i&gt;&lt;span style=&quot;color: #444444;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #444444;&quot;&gt;java:&lt;/span&gt;&lt;span style=&quot;color: #cc0000;&quot;&gt;global&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;/test.ear/test/GrussGottEjbLocal,&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;i&gt;&lt;b&gt;&lt;span style=&quot;color: #444444;&quot;&gt;java:&lt;/span&gt;&lt;span style=&quot;color: #cc0000;&quot;&gt;global&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;/test/GrussGottEjbLocal,&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;i&gt;&lt;b&gt;&lt;span style=&quot;color: #444444;&quot;&gt;java:&lt;/span&gt;&lt;span style=&quot;color: #cc0000;&quot;&gt;globa&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;l/test/GrussGottEjbLocalBean,&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;i&gt;&lt;b&gt;&lt;span style=&quot;color: #444444;&quot;&gt;java&lt;/span&gt;&lt;span style=&quot;color: #cc0000;&quot;&gt;:global&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;/test/GrussGottEjbLocal/no-interface,&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #444444;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;i&gt;&lt;b&gt;test/GrussGottEjbLocalBean/local,&amp;nbsp;&lt;/b&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #444444;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;i&gt;&lt;b&gt;test/GrussGottEjbLocalBean/remote,&amp;nbsp;&lt;/b&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #444444;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;i&gt;&lt;b&gt;test/GrussGottEjbLocal/no-interface,&amp;nbsp;&lt;/b&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #444444;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;i&gt;&lt;b&gt;GrussGottEjbLocalBean/local,&lt;/b&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #444444;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;i&gt;&lt;b&gt;&amp;nbsp;GrussGottEjbLocalBean/remote,&amp;nbsp;&lt;/b&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #444444;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;i&gt;&lt;b&gt;GrussGottEjbLocal/no-interface,&lt;/b&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #444444;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;i&gt;&lt;b&gt;&amp;nbsp;ejblocal:test.ejb.GrussGottEjbLocal,&amp;nbsp;&lt;/b&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #444444;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;i&gt;&lt;b&gt;test.ejb.GrussGottEjbLocal,&lt;/b&gt;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;i&gt;&lt;b&gt;....&lt;/b&gt;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;i&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;But, when the &quot;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #674ea7; line-height: 24px;&quot;&gt;hgrussEjb.jar&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 24px;&quot;&gt;&quot; is deployed by Arquillian in JBoss, it is bund to the following JNDI as shown in JBoss &quot;server.log&quot;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 24px;&quot;&gt;:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: #fffff8; border-radius: 6px 6px 6px 6px; border: 1px solid #BBBBBB; padding: 5px 10px 5px;&quot;&gt;
...&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: white; color: #444444;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;i&gt;&lt;b&gt;jndi:test/GrussGottEjb/local-test.ejb.GrussGottEjbLocal&lt;/b&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;i&gt;&lt;b&gt;&lt;i style=&quot;background-color: white;&quot;&gt;&lt;/i&gt;&lt;/b&gt;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; display: inline !important;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;i&gt;&lt;b&gt;&lt;i style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;color: #444444;&quot;&gt;jndi:&lt;/span&gt;&lt;span style=&quot;color: #cc0000;&quot;&gt;test/GrussGottEjb/local&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #444444;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;i&gt;&lt;b&gt;jndi:test/GrussGottEjb/remote&lt;/b&gt;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;i&gt;&lt;b&gt;...&lt;/b&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;font-style: italic;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;Now problem is clear: using @EJB only is not enough!&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;The solution is actually easy. &amp;nbsp;In the &quot;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-style: italic; line-height: 24px;&quot;&gt;TestGrussGott,java&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 24px;&quot;&gt;&quot;, just change the annotation &amp;nbsp;from:&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-size: 14px; line-height: 24px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #674ea7; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;@EJB&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;
&lt;/span&gt;
&lt;br /&gt;
&lt;div style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #674ea7; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;GrussGottEjbLocal grusEjb;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;
&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #444444; font-size: 14px; line-height: 24px;&quot;&gt;to :&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;&lt;span style=&quot;color: #674ea7;&quot;&gt;&amp;nbsp;@EJB(mappedName=&quot;&lt;/span&gt;&lt;span style=&quot;color: #cc0000;&quot;&gt;test/GrussGottEjb/local&lt;/span&gt;&lt;span style=&quot;color: #674ea7;&quot;&gt;&quot;)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #674ea7; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;GrussGottEjbLocal grusEjb;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;
&lt;span style=&quot;background-color: white; color: #444444; font-size: 14px; line-height: 24px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;8. Run test again&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white; color: #444444; font-size: 14px; line-height: 24px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;div style=&quot;font-family: &#39;Times New Roman&#39;; line-height: normal;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;
&lt;/span&gt;
&lt;br /&gt;
&lt;div style=&quot;display: inline !important;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #444444;&quot;&gt;&amp;nbsp;Now run the test again:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #444444;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8; border-radius: 6px 6px 6px 6px; border: 1px solid #BBBBBB; padding: 5px 10px 5px;&quot;&gt;
&lt;span style=&quot;background-color: white; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;&amp;gt; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: black; font-family: &#39;Times New Roman&#39;; line-height: 24px;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;mvn clean test -Parquillian-jbossas-managed_5_1&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;
&lt;/span&gt;
&lt;br /&gt;
&lt;div style=&quot;color: #444444; font-style: italic; line-height: 24px;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white; color: black; font-family: &#39;Times New Roman&#39;; font-style: normal;&quot;&gt;&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;
&lt;/span&gt;
&lt;br /&gt;
&lt;div style=&quot;color: #444444; font-style: italic; line-height: 24px;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white; color: black; font-family: &#39;Times New Roman&#39;; font-style: normal;&quot;&gt;&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;And you would see in the console:&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;
&lt;/span&gt;
&lt;br /&gt;
&lt;div style=&quot;color: #444444; font-size: 14px; font-style: italic; line-height: 24px;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white; color: black; font-family: &#39;Times New Roman&#39;; font-style: normal;&quot;&gt;&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;
&lt;/span&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhfTSxn5rQy6DfIF_huJnDRR2loB8UL2XMWXPLO9SYRTQGYIkXBRd6Yt5sq5uWqcef2rf-8lcGIPefRqHWCzmLJnCQJmWVrBWuUzYhA4fX_HozGAui0vLZXZI4TRY8hbjZc0z0NwiFoSt0v/s1600/arquillian_create_maven_pro_jb7_12.jpeg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhfTSxn5rQy6DfIF_huJnDRR2loB8UL2XMWXPLO9SYRTQGYIkXBRd6Yt5sq5uWqcef2rf-8lcGIPefRqHWCzmLJnCQJmWVrBWuUzYhA4fX_HozGAui0vLZXZI4TRY8hbjZc0z0NwiFoSt0v/s1600/arquillian_create_maven_pro_jb7_12.jpeg&quot; height=&quot;262&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;
&lt;/span&gt;
&lt;br /&gt;
&lt;div style=&quot;color: #444444; font-size: 14px; font-style: italic; line-height: 24px;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white; color: black; font-family: &#39;Times New Roman&#39;; font-style: normal;&quot;&gt;&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;
&lt;/span&gt;
&lt;br /&gt;
&lt;div style=&quot;color: #444444; font-size: 14px; font-style: italic; line-height: 24px;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white; color: black; font-family: &#39;Times New Roman&#39;; font-style: normal;&quot;&gt;&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;
&lt;/span&gt;
&lt;br /&gt;
&lt;div style=&quot;color: #444444; font-size: 14px; font-style: italic; line-height: 24px;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;b style=&quot;color: black; font-family: &#39;Times New Roman&#39;; font-size: medium; font-style: normal; line-height: normal;&quot;&gt;&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;9. Troubleshooting&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;b style=&quot;color: black; font-family: &#39;Times New Roman&#39;; font-size: medium; font-style: normal; line-height: normal;&quot;&gt;&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;
&lt;/span&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;div style=&quot;color: #444444; line-height: 24px;&quot;&gt;
&lt;div style=&quot;font-style: italic;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;b style=&quot;color: black; font-family: &#39;Times New Roman&#39;; font-style: normal; line-height: normal;&quot;&gt;&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;9.1 Exception&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-style: italic;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;b style=&quot;color: black; font-family: &#39;Times New Roman&#39;; font-style: normal; line-height: normal;&quot;&gt;&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;background-color: #fffff8; border-radius: 6px 6px 6px 6px; border: 1px solid #BBBBBB; padding: 5px 10px 5px;&quot;&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: white;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;i&gt;&lt;span style=&quot;color: #674ea7;&quot;&gt;....&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;i&gt;&lt;span style=&quot;color: #674ea7;&quot;&gt;Failed to collect dependencies for....&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;i&gt;&lt;span style=&quot;color: #674ea7;&quot;&gt;...&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;i&gt;&lt;span style=&quot;color: #674ea7;&quot;&gt;Could not transfer artifact org.jboss.aop:jboss-aop-aspects:pom:2.1.1.GA from/to repository.jboss.org (http://repository.jboss.org/maven2):&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;i&gt;&lt;span style=&quot;color: #674ea7;&quot;&gt;Access denied to: http://repository.jboss.org/maven2/org/jboss/aop/jboss-aop-aspects/2.1.1.GA/jboss-aop-aspects-2.1.1.GA.pom,&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white;&quot;&gt;
&lt;div style=&quot;color: #444444; font-size: 14px; font-style: italic; line-height: 24px;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;...&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;span style=&quot;color: #674ea7; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;
&lt;span style=&quot;color: #674ea7; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div style=&quot;color: #444444; line-height: 24px;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;This indicates that dependencies could not be downloaded from Maven central repository. Check your pom.xml file in section 2 of this turorial, make sure you have configured /customized Maven repository (for example &quot;&lt;i style=&quot;background-color: white; color: #cc0000;&quot;&gt;maven-us.nuxeo.org&lt;/i&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&quot; ).&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #444444; line-height: 24px;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #444444; line-height: 24px;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;b style=&quot;color: black; font-family: &#39;Times New Roman&#39;; line-height: normal;&quot;&gt;&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;9.2 When you observer error information like:&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;b style=&quot;color: black; font-family: &#39;Times New Roman&#39;; line-height: normal;&quot;&gt;&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #444444; line-height: 24px;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Times New Roman&#39;; line-height: normal;&quot;&gt;&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;&lt;b&gt;Error in Console:&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 24px;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #674ea7;&quot;&gt;Tests in error:&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 24px;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #674ea7;&quot;&gt;&amp;nbsp; test.ejb.TestGrussGott: Could not start remote container&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 24px;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #674ea7;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #444444; line-height: 24px;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;b&gt;Error in &quot;test.ejb.TestGrussGott.tx&quot;:&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;span style=&quot;color: #674ea7;&quot;&gt;org.jboss.arquillian.container.spi.client.container.LifecycleException: Could not start remote container&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;font-weight: bold; line-height: 24px;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;color: #674ea7;&quot;&gt;...&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;span style=&quot;color: #674ea7;&quot;&gt;Caused by: java.io.IOException: Server failed to start; see logs. exit code: 0&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;span style=&quot;color: #674ea7;&quot;&gt;...&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;span style=&quot;color: #674ea7;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;color: #444444; line-height: 24px;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;b&gt;And Error in JBoss &quot;server.log&quot;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;span style=&quot;color: #444444;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #674ea7;&quot;&gt;Failed to get property value for bean: org.jboss.web.tomcat.service.management.ConnectorBean, property: bytesSent&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;span style=&quot;color: #674ea7;&quot;&gt;java.lang.IllegalStateException: java.lang.RuntimeException: Error creating MBeanProxy: jboss.web:name=http-localhost-8080,type=GlobalRequestProcessor&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;
&lt;/span&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;div style=&quot;font-style: italic; line-height: 24px;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #674ea7;&quot;&gt;...&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;i&gt;&lt;span style=&quot;color: #674ea7;&quot;&gt;Caused by: java.lang.RuntimeException: Error creating MBeanProxy: jboss.web:name=http-localhost-8080,type=GlobalRequestProcessor&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;
&lt;/span&gt;
&lt;br /&gt;
&lt;div style=&quot;color: #444444; line-height: 24px;&quot;&gt;
&lt;div style=&quot;font-size: 14px; font-style: italic;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-size: 14px; font-style: italic;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small; font-style: normal;&quot;&gt;The reason for the above errors is very likely runnin&lt;/span&gt;&lt;span style=&quot;background-color: white; font-size: small; font-style: normal;&quot;&gt;g JBoss with the wrong Java version. So please make sure to run JBoss with jdk6, anot NOT jdk7. Check PATH and JAVA_HOME of your system again.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-size: 14px; font-style: italic;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white; font-size: small; font-style: normal;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-size: 14px; font-style: italic;&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhu-kXRLs9Vs2ozMHlZoz7jWNe7pBjhQFLriYMqsxSeoGdcS3vUjG6B___v3bd8jXqSRUhQY_lL5FWwDK8Z7FPF8HPNSqgL04U_H8CqKaMk8IEJv9tXqLNoCnXzSWRpn1fvboYaY4DJlu-Z/s1600/caffee_tisch.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhu-kXRLs9Vs2ozMHlZoz7jWNe7pBjhQFLriYMqsxSeoGdcS3vUjG6B___v3bd8jXqSRUhQY_lL5FWwDK8Z7FPF8HPNSqgL04U_H8CqKaMk8IEJv9tXqLNoCnXzSWRpn1fvboYaY4DJlu-Z/s1600/caffee_tisch.jpg&quot; /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small; font-style: normal;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;
&lt;/span&gt;
&lt;br /&gt;
&lt;div style=&quot;color: #444444; font-size: 14px; font-style: italic; line-height: 24px;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div style=&quot;color: black; font-size: medium; font-style: normal;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #444444; font-size: x-small;&quot;&gt;&lt;a href=&quot;http://milestonenext.blogspot.de/2012/12/ejb3-integration-test-with-arquillian.html&quot;&gt;Part - 1&lt;/a&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;a href=&quot;http://milestonenext.blogspot.de/2012/12/ejb3-integration-test-with-arquillian_17.html&quot;&gt;Part - 2&lt;/a&gt;&amp;nbsp; &amp;nbsp;&lt;a href=&quot;http://milestonenext.blogspot.de/2012/12/tutorial-ejb3-integration-test-with.html&quot;&gt;Part - 3&amp;nbsp;&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;a href=&quot;http://milestonenext.blogspot.de/2012/12/tutorial-ejb3-integration-test-with_29.html&quot;&gt;Part - 4&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://milestonenext.blogspot.com/feeds/2999317879528320439/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://milestonenext.blogspot.com/2012/12/tutorial-ejb3-integration-test-with.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7515187228721563448/posts/default/2999317879528320439'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7515187228721563448/posts/default/2999317879528320439'/><link rel='alternate' type='text/html' href='http://milestonenext.blogspot.com/2012/12/tutorial-ejb3-integration-test-with.html' title='Tutorial EJB3 Integration Test  with Arquillian part3 - JBoss 5 managed container'/><author><name>Beijing Beijing</name><uri>http://www.blogger.com/profile/12013373726184997758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='28' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTm1nk7ZqbPTfBofk6dIg7Zfx820i-FNuXqGbSlZNbRw5-RPJuqgDFNoW_zdgJCMCYj6R5cTGNgNKmwTzeDsEm2EHkqni9ywIanrN-PIRd4Z4yZXUOHhC12zzDid1A1w/s220/profile.png'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEha05pVGWbT10zj3HUB1TEZYrZNZrmQWankIQ_qwukrfFal3dmRKFBcuVniglMwwmm7D911n17ufJTVrJwZl26KpYhYIC6C4oecpaOGMvUWpphNfeESFh7iMO44oAD6gCnnCEsWYkGc5ner/s72-c/arquillian_create_maven_pro_jb7_10.jpeg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7515187228721563448.post-8891124140743367668</id><published>2012-12-17T11:12:00.003-08:00</published><updated>2014-10-01T06:41:25.002-07:00</updated><title type='text'>Tutorial EJB3 Integration Test  with Arquillian part2 - JBoss 7  remote container</title><content type='html'>&lt;br /&gt;
&lt;div style=&quot;background-color: white; font-family: Lato, arial, sans-serif; line-height: 24px;&quot;&gt;
&lt;div style=&quot;margin-left: 10px; margin-right: 10px;&quot;&gt;
&lt;span style=&quot;color: #666666; font-size: x-small;&quot;&gt;Document &amp;nbsp;Version 1.0&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;releaseinfo&quot; style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; margin-left: 10px; margin-right: 10px;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div class=&quot;copyright&quot; style=&quot;margin-left: 10px; margin-right: 10px;&quot;&gt;
&lt;div style=&quot;background-color: white;&quot;&gt;
&lt;div style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;
&lt;span style=&quot;color: #666666; font-size: x-small;&quot;&gt;Copyright © 2012 beijing.beijing.012@gmail.com&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;
&lt;span style=&quot;color: #666666; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #666666; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;h3 style=&quot;font-family: &#39;Times New Roman&#39;; line-height: normal;&quot;&gt;
&lt;span style=&quot;background-color: white; color: #351c75; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14px; font-weight: normal; line-height: 17px;&quot;&gt;&lt;b&gt;Keywords:&lt;/b&gt;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14px; font-weight: normal; line-height: 17px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #351c75; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14px; font-weight: normal; line-height: 17px;&quot;&gt;JEE integration test, JEE unit test, arquillian sample, JBoss 5, JBoss 7, EJB test, arquillian dependencies, arquillian enbedded container, managed&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #351c75; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14px; font-weight: normal; line-height: 17px;&quot;&gt;container, remote container&lt;/span&gt;&lt;/h3&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: white; color: #351c75; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14px; font-weight: normal; line-height: 17px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;a href=&quot;http://milestonenext.blogspot.de/2012/12/ejb3-integration-test-with-arquillian.html&quot; style=&quot;color: #444444; font-size: small;&quot;&gt;Part - 1&lt;/a&gt;&lt;span style=&quot;color: #444444; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;a href=&quot;http://milestonenext.blogspot.de/2012/12/ejb3-integration-test-with-arquillian_17.html&quot; style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;Part - 2&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #444444; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;a href=&quot;http://milestonenext.blogspot.de/2012/12/tutorial-ejb3-integration-test-with.html&quot; style=&quot;color: #444444; font-size: small;&quot;&gt;Part - 3&amp;nbsp;&lt;/a&gt;&lt;span style=&quot;color: #444444; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;a href=&quot;http://milestonenext.blogspot.de/2012/12/tutorial-ejb3-integration-test-with_29.html&quot; style=&quot;color: #444444; font-size: small;&quot;&gt;Part - 4&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #b2ab66; border-bottom-left-radius: 2px; border-bottom-right-radius: 2px; border-top-left-radius: 2px; border-top-right-radius: 2px; border: 0px none; padding: 5px 10px;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;b&gt;Table of Contents&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;b&gt;1. Create a simple Maven project in Eclipse&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;b&gt;2. Create project&#39;s pom.xml file&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;b&gt;3. Implement source code and test code&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;b&gt;4. Start JBossjboss-as-7.1.1.Final&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;b&gt;5. arquillian.xml&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;b&gt;6. Run Arquillian test&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;b&gt;7. Troubleshooting&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;
&lt;/div&gt;
&lt;div style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;span style=&quot;color: #cc0000; font-family: Arial, Helvetica, sans-serif; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #cc0000; font-family: Arial, Helvetica, sans-serif; font-size: large;&quot;&gt;W&lt;/span&gt;hen you have followed the part1 of this serial &quot;Tutorial Integration test with Arquillian&quot; with success, your system would have been correctly set up to run further Arquillian test, - with some samll adaptions depending upon the container you are planning to use.&lt;br /&gt;
&lt;br /&gt;
In this part2 of the serial we will continue with part1, to test stateless session bean in a JBoss 7 remote container. Instead of reusing the &amp;nbsp;&quot;testarq_jb7_managed&quot; Eclipse project we created in part1, we will create a new Eclipse project &quot;testarq_jb7_remote&quot;, reuse the EJB classes and the test class.&lt;br /&gt;
&lt;br /&gt;
&lt;b style=&quot;background-color: white; color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: 14px; line-height: 24px;&quot;&gt;1. Create a simple Maven project in Eclipse&lt;/b&gt;&lt;br /&gt;
&lt;b style=&quot;background-color: white; color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: 14px; line-height: 24px;&quot;&gt;&lt;br /&gt;&lt;/b&gt;
&lt;span style=&quot;background-color: white; color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;Follow the section 1 of &quot;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;&quot;&gt;EJB3 Integration Test with Arquillian part1-JBoss 7 managed container&quot; to create a new Eclipse project &quot;&lt;/span&gt;&quot;testarq_jb7_remote&lt;span style=&quot;background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;&quot;&gt;&quot;. Be sure in step2, to name the ArtifactId as &quot;&lt;/span&gt;&quot;testarq_jb7_remote&lt;span style=&quot;background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;&quot;&gt;&quot;.&lt;/span&gt;&lt;br /&gt;
&lt;b style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;2. Create project&#39;s pom.xml file.&lt;/b&gt;&lt;br /&gt;
&lt;b style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;&lt;br /&gt;&lt;/b&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;Replace the content of pom.xml file with the following content:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;color: #444444; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fff7b2; border-radius: 6px 6px 6px 6px; border: 1px solid #BBBBBB; padding: 5px 10px 5px;&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;color: #274e13; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&amp;lt;project &lt;/span&gt;&lt;span style=&quot;color: #660000; line-height: 24px;&quot;&gt;xmlns=&lt;/span&gt;&lt;span style=&quot;color: #0b5394; line-height: 24px;&quot;&gt;&quot;http://maven.apache.org/POM/4.0.0&quot;&lt;/span&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #660000; line-height: 24px;&quot;&gt;xmlns:xsi=&lt;/span&gt;&lt;span style=&quot;color: #0b5394; line-height: 24px;&quot;&gt;&quot;http://www.w3.org/2001/XMLSchema-instance&quot;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #274e13; white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;xsi:schemaLocation=&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #0b5394; line-height: 24px;&quot;&gt;&quot;http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd&quot;&lt;/span&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;lt;modelVersion&amp;gt;&lt;/span&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;4.0.0&lt;/span&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&amp;lt;/modelVersion&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;testarg&lt;/span&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;testarq_jb7_remote&lt;/span&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;lt;version&amp;gt;&lt;/span&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;0.0.1&lt;/span&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&amp;lt;/version&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;lt;description&amp;gt;&lt;/span&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;test arrquillian&lt;/span&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&amp;lt;/description&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;lt;properties&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;        &lt;/span&gt;&amp;lt;project.build.sourceEncoding&amp;gt;&lt;/span&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;UTF-8&lt;/span&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&amp;lt;/project.build.sourceEncoding&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;lt;/properties&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;lt;dependencyManagement&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;      &lt;/span&gt;&amp;lt;dependencies&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;         &lt;/span&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                &lt;/span&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;org.jboss.arquillian&lt;/span&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                &lt;/span&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;arquillian-bom&lt;/span&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                &lt;/span&gt;&amp;lt;version&amp;gt;&lt;/span&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;1.0.3.Final&lt;/span&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&amp;lt;/version&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                &lt;/span&gt;&amp;lt;scope&amp;gt;&lt;/span&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&amp;lt;/scope&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                &lt;/span&gt;&amp;lt;type&amp;gt;&lt;/span&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;pom&lt;/span&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&amp;lt;/type&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;         &lt;/span&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;&amp;lt;/dependencies&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;lt;/dependencyManagement&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;lt;build&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;           &lt;/span&gt;&amp;lt;plugins&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                        &lt;/span&gt;&amp;lt;plugin&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                                  &lt;/span&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;maven-compiler-plugin&lt;/span&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                                 &lt;/span&gt;&amp;lt;version&amp;gt;&lt;/span&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;2.3.2&lt;/span&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&amp;lt;/version&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                                 &lt;/span&gt;&amp;lt;configuration&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                                       &lt;/span&gt;&amp;lt;source&amp;gt;&lt;/span&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;1.6&lt;/span&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&amp;lt;/source&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                                       &lt;/span&gt;&amp;lt;target&amp;gt;&lt;/span&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;1.6&lt;/span&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&amp;lt;/target&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                                       &lt;/span&gt;&amp;lt;/configuration&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                        &lt;/span&gt;&amp;lt;/plugin&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                        &lt;/span&gt;&amp;lt;plugin&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                                    &lt;/span&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;maven-surefire-plugin&lt;/span&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                                    &lt;/span&gt;&amp;lt;version&amp;gt;&lt;/span&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;2.12&lt;/span&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&amp;lt;/version&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                        &lt;/span&gt;&amp;lt;/plugin&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                 &lt;/span&gt;&amp;lt;/plugins&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;lt;/build&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;lt;dependencies&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;               &lt;/span&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                      &lt;/span&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;junit&lt;/span&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                      &lt;/span&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;junit&lt;/span&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                      &lt;/span&gt;&amp;lt;version&amp;gt;&lt;/span&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;4.8.1&lt;/span&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&amp;lt;/version&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                      &lt;/span&gt;&amp;lt;scope&amp;gt;&lt;/span&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;test&lt;/span&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&amp;lt;/scope&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;               &lt;/span&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;               &lt;/span&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                      &lt;/span&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;org.jboss.arquillian.junit&lt;/span&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                      &lt;/span&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;arquillian-junit-container&lt;/span&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                      &lt;/span&gt;&amp;lt;scope&amp;gt;&lt;/span&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;test&lt;/span&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&amp;lt;/scope&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                 &lt;/span&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                 &lt;/span&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                        &lt;/span&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;org.jboss.spec&lt;/span&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                        &lt;/span&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;jboss-javaee-6.0&lt;/span&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                        &lt;/span&gt;&amp;lt;version&amp;gt;&lt;/span&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;1.0.0.Final&lt;/span&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&amp;lt;/version&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                        &lt;/span&gt;&amp;lt;type&amp;gt;&lt;/span&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;pom&lt;/span&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&amp;lt;/type&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                        &lt;/span&gt;&amp;lt;scope&amp;gt;&lt;/span&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;provided&lt;/span&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&amp;lt;/scope&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                  &lt;/span&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                 &lt;/span&gt;&amp;lt;/dependencies&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;color: #274e13; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;line-height: 24px; white-space: pre;&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&amp;lt;profiles&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                &lt;/span&gt;&amp;lt;profile&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                        &lt;/span&gt;&amp;lt;id&amp;gt;&lt;/span&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;arquillian-jbossas-remote_7&lt;/span&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&amp;lt;/id&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                        &lt;/span&gt;&amp;lt;dependencies&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                                &lt;/span&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                                       &lt;/span&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;org.jboss.as&lt;/span&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                                       &lt;/span&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;jboss-as-arquillian-container-remote&lt;/span&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                                       &lt;/span&gt;&amp;lt;version&amp;gt;&lt;/span&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;7.1.1.Final&lt;/span&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&amp;lt;/version&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                                       &lt;/span&gt;&amp;lt;scope&amp;gt;&lt;/span&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;test&lt;/span&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&amp;lt;/scope&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                                &lt;/span&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                        &lt;/span&gt;&amp;lt;/dependencies&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                     &lt;/span&gt;&amp;lt;/profile&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;&amp;lt;/profiles&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&amp;lt;/project&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;b style=&quot;background-color: white; color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: 14px; line-height: 24px;&quot;&gt;3. Implement source code and test code&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;Follow the section 3 of &quot;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;&quot;&gt;EJB3 Integration Test with Arquillian part1-JBoss 7 managed container&quot; to create the 2 classes for Hallo EJB and test class:&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;background-color: white; clear: both; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; line-height: 17px;&quot;&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; HalloEjbLocal.java&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; HalloEjb.java&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; TestHalloEJB.java&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: 14px; line-height: 24px;&quot;&gt;
&lt;b style=&quot;color: #444444;&quot;&gt;4. Start JBoss&lt;/b&gt;&lt;span style=&quot;color: #444444; line-height: 17px;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;b&gt;jboss-as-7.1.1.Final&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; line-height: 17px;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white;&quot;&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;Again here make sure you have system property PATH including &quot;bin&quot; folder of you jdk7 location,&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;&amp;nbsp;and JAVA_HOME pointing to jkd7 installation location.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white;&quot;&gt;
&lt;span style=&quot;background-color: white; color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;Unlike doing Arquillian test with managed container, where Arquillian takes care of start and stop of remote server. When running with Arquillian with remote server, before starting test, the remote server must be already started and up.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white;&quot;&gt;
&lt;span style=&quot;background-color: white; color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;Start JBoss7 in standalone mode:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: 14px; line-height: 24px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white;&quot;&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fff7b2; border-radius: 6px 6px 6px 6px; border: 1px solid #BBBBBB; padding: 5px 10px 5px;&quot;&gt;
&lt;br /&gt;
he@linux-7s1k:~/jboss-as-7.1.1.Final/bin&amp;gt; ./standalone.sh&lt;br /&gt;
&lt;br /&gt;
======================================================================&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; JBoss Bootstrap Environment&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; JBOSS_HOME: /home/he/jboss-as-7.1.1.Final&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; JAVA: /var/jdk7/bin/java&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; JAVA_OPTS: &amp;nbsp;-server -XX:+TieredCompilation -Xms64m -Xmx512m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true -Djboss.server.default.config=standalone.xml&lt;br /&gt;
&lt;br /&gt;
======================================================================&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; font-size: 14px; line-height: 24px;&quot;&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white;&quot;&gt;
&lt;div style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;
&lt;b style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;5. arquillian.xml&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 24px;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;In case of remote JBoss container, Arquillian needs 2 extra parameters:
managementAddress
managementPort.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 24px;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Arquillian use default &quot;127.0.0.1:9999&quot;, &amp;nbsp;if no configuration is found.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 24px;&quot;&gt;
&lt;span style=&quot;background-color: white; font-family: Arial, Helvetica, sans-serif;&quot;&gt;If your server is running on 
different management host/port, then the 2 parameters should be configured in 
arquillian.xml&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;
&lt;span style=&quot;background-color: white; font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fff7b2; border-bottom-left-radius: 6px; border-bottom-right-radius: 6px; border-top-left-radius: 6px; border-top-right-radius: 6px; border: 1px solid rgb(187, 187, 187); padding: 5px 10px;&quot;&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;lt;container qualifier=&quot;jboss7&quot; default=&quot;true&quot;&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;lt;configuration&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;property name=&quot;managementAddress&quot;&amp;gt;127.0.0.1&amp;lt;/property&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;property name=&quot;managementPort&quot;&amp;gt;9999&amp;lt;/property&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;lt;/configuration&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp; &amp;lt;/container&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;background-color: white;&quot;&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white;&quot;&gt;
&lt;b style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: 14px; line-height: 24px;&quot;&gt;6. Run Arquillian test&lt;/b&gt;&lt;br /&gt;
&lt;b style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: 14px; line-height: 24px;&quot;&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white;&quot;&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;Create a Ecliipse Run configuration for Maven as shown in the following image:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: 14px; line-height: 24px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;background-color: white; clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZ1KphCjLVF2f-Vy6pUWHnFA4ofIJsR6xY1mOMf438peyuWu000NzH6vg0JpGI5NdDml-kDWSS8SA7SyTwcZzKi17CCqDnHTOdcdy9aqcXNqgeMwflr89k8gPt4hx0dYZ48GgxllxTDwh1/s1600/arquillian_create_maven_pro_jb7_7.jpeg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZ1KphCjLVF2f-Vy6pUWHnFA4ofIJsR6xY1mOMf438peyuWu000NzH6vg0JpGI5NdDml-kDWSS8SA7SyTwcZzKi17CCqDnHTOdcdy9aqcXNqgeMwflr89k8gPt4hx0dYZ48GgxllxTDwh1/s1600/arquillian_create_maven_pro_jb7_7.jpeg&quot; height=&quot;220&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;background-color: white; clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;background-color: white; clear: both; text-align: left;&quot;&gt;
An Click Run button.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;background-color: white; clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;background-color: white; clear: both; text-align: left;&quot;&gt;
When you have correctly followed the section 1-6, you would see in you console a screen likes:&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;background-color: white; clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;background-color: white; clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiY93978M2Eb5XdzHA57z8sSMOZbKG2xAPBWr0p0oax5Qlk_9JzS8R4oifKXqcBk_ydGCUlMiwZrintTTLOFBhddWzzcJXNccr638FUmlRLJ30ddT2N6SrY062XoW-DCoNaSE7Lpc5dqYJD/s1600/arquillian_create_maven_pro_jb7_8.jpeg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiY93978M2Eb5XdzHA57z8sSMOZbKG2xAPBWr0p0oax5Qlk_9JzS8R4oifKXqcBk_ydGCUlMiwZrintTTLOFBhddWzzcJXNccr638FUmlRLJ30ddT2N6SrY062XoW-DCoNaSE7Lpc5dqYJD/s1600/arquillian_create_maven_pro_jb7_8.jpeg&quot; height=&quot;261&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;background-color: white; clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;background-color: white; clear: both; text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;When you take a look at the JBoss 7 log file, you would see the &quot;halloEjb.jar&quot; is deployed at the beginning of the test, and undeployed from JBoss when the test is finished:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;background-color: white; clear: both; text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;background-color: white; clear: both; text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fff7b2; border-radius: 6px 6px 6px 6px; border: 1px solid #BBBBBB; padding: 5px 10px 5px;&quot;&gt;
&lt;br /&gt;
...&lt;br /&gt;
20:25:04,190 INFO &amp;nbsp;[org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015876: Starting deployment of &quot;halloEjb.jar&quot;&lt;br /&gt;
...&lt;br /&gt;
20:25:04,338 INFO &amp;nbsp;[org.jboss.as.ejb3.deployment.processors.EjbJndiBindingsDeploymentUnitProcessor] (MSC service thread 1-4) JNDI bindings for session bean named HalloEjb in deployment unit deployment &quot;halloEjb.jar&quot; are as follows:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; java:global/halloEjb/HalloEjb!test.ejb.HalloEjbLocal&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; java:app/halloEjb/HalloEjb!test.ejb.HalloEjbLocal&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; java:module/HalloEjb!test.ejb.HalloEjbLocal&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; java:global/halloEjb/HalloEjb&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; java:app/halloEjb/HalloEjb&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; java:module/HalloEjb&lt;br /&gt;
...&lt;br /&gt;
20:25:05,142 INFO &amp;nbsp;[org.jboss.as.server] (management-handler-thread - 2) JBAS018559: Deployed &quot;halloEjb.jar&quot;&lt;br /&gt;
20:25:06,750 INFO &amp;nbsp;[org.jboss.weld.deployer] (MSC service thread 1-1) JBAS016009: Stopping weld service for deployment halloEjb.jar&lt;br /&gt;
....&lt;br /&gt;
20:25:07,152 INFO &amp;nbsp;[org.jboss.as.server] (management-handler-thread - 1) JBAS018558: Undeployed &quot;arquillian-service&quot;&lt;br /&gt;
...&lt;/div&gt;
&lt;div style=&quot;background-color: white;&quot;&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white;&quot;&gt;
&lt;b style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: 14px; line-height: 24px;&quot;&gt;7. Troubleshooting&lt;/b&gt;&lt;br /&gt;
&lt;b style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;&lt;br /&gt;&lt;/b&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;7.1 When you see test failure like:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: 14px; line-height: 24px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: #fff7b2; border-radius: 6px 6px 6px 6px; border: 1px solid #BBBBBB; padding: 5px 10px 5px;&quot;&gt;
&lt;br /&gt;
...&lt;br /&gt;
Tests in error:&lt;br /&gt;
&amp;nbsp; test.ejb.TestHalloEJB: Could not create a new instance of class org.jboss.arquillian.test.impl.EventTestRunnerAdaptor&lt;br /&gt;
....&lt;br /&gt;
Caused by: java.lang.NoClassDefFoundError: org/jboss/arquillian/test/spi/enricher/resource/ResourceProvider&lt;br /&gt;
...&lt;br /&gt;
Caused by: java.lang.RuntimeException: Could not create a new instance of class org.jboss.arquillian.core.impl.ManagerImpl see cause.&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;This is most possibly because the &quot;aqruillian.bom&quot; version is not compatible with the &quot;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; line-height: 24px;&quot;&gt;&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;jboss-as-arquillian-container-remote&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;&quot; version. Please make sure you used the version shown in the pom.xml of this tutorial.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; line-height: 24px;&quot;&gt;&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;7.2 &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;When you see test failure like:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: 14px; line-height: 24px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: #fff7b2; border-radius: 6px 6px 6px 6px; border: 1px solid #BBBBBB; padding: 5px 10px 5px;&quot;&gt;
&lt;br /&gt;
...&lt;br /&gt;
org.jboss.shrinkwrap.api.exporter.ArchiveExportException: Failed to write asset to output: /junit/extensions/TestDecorator.class&lt;br /&gt;
...&lt;br /&gt;
Caused by: java.io.IOException: Pipe closed&lt;br /&gt;
...&lt;br /&gt;
Possible deadlock scenario: Got exception on closing the ZIP out stream: Pipe closed&lt;br /&gt;
...&lt;br /&gt;
Failed to write asset to output: /test/ejb/TestHalloEJB.class&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
Tests in error:&lt;br /&gt;
&amp;nbsp; test.ejb.TestHalloEJB: Could not deploy to container: JBAS012144: Could not connect to remote://127.0.0.1:9999. The connection timed out&lt;br /&gt;
...&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, sans-serif;&quot;&gt;This normally indicates that the JBoss server is not running, or it runs with different &quot;managementAddress&quot; or &quot;managementPort&quot; than default. Please check your configuration against the section 5 of this tutorial.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;a href=&quot;http://milestonenext.blogspot.de/2012/12/tutorial-ejb3-integration-test-with.html&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #351c75;&quot;&gt;Tutorial EJB3 Integration Test with Arquillian part3 - JBoss 5 managed container&lt;/span&gt;&lt;/b&gt;&lt;/a&gt;&lt;/span&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;
&lt;span style=&quot;color: #444444; font-size: x-small;&quot;&gt;&lt;a href=&quot;http://milestonenext.blogspot.de/2012/12/ejb3-integration-test-with-arquillian.html&quot;&gt;Part - 1&lt;/a&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;a href=&quot;http://milestonenext.blogspot.de/2012/12/ejb3-integration-test-with-arquillian_17.html&quot;&gt;Part - 2&lt;/a&gt;&amp;nbsp; &amp;nbsp;&lt;a href=&quot;http://milestonenext.blogspot.de/2012/12/tutorial-ejb3-integration-test-with.html&quot;&gt;Part - 3&amp;nbsp;&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;a href=&quot;http://milestonenext.blogspot.de/2012/12/tutorial-ejb3-integration-test-with_29.html&quot;&gt;Part - 4&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://milestonenext.blogspot.com/feeds/8891124140743367668/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://milestonenext.blogspot.com/2012/12/tutorial-ejb3-integration-test-with_17.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7515187228721563448/posts/default/8891124140743367668'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7515187228721563448/posts/default/8891124140743367668'/><link rel='alternate' type='text/html' href='http://milestonenext.blogspot.com/2012/12/tutorial-ejb3-integration-test-with_17.html' title='Tutorial EJB3 Integration Test  with Arquillian part2 - JBoss 7  remote container'/><author><name>Beijing Beijing</name><uri>http://www.blogger.com/profile/12013373726184997758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='28' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTm1nk7ZqbPTfBofk6dIg7Zfx820i-FNuXqGbSlZNbRw5-RPJuqgDFNoW_zdgJCMCYj6R5cTGNgNKmwTzeDsEm2EHkqni9ywIanrN-PIRd4Z4yZXUOHhC12zzDid1A1w/s220/profile.png'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZ1KphCjLVF2f-Vy6pUWHnFA4ofIJsR6xY1mOMf438peyuWu000NzH6vg0JpGI5NdDml-kDWSS8SA7SyTwcZzKi17CCqDnHTOdcdy9aqcXNqgeMwflr89k8gPt4hx0dYZ48GgxllxTDwh1/s72-c/arquillian_create_maven_pro_jb7_7.jpeg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7515187228721563448.post-5853898476030258194</id><published>2012-12-15T22:24:00.005-08:00</published><updated>2013-01-28T05:25:37.689-08:00</updated><title type='text'>Tutorial EJB3 Integration Test  with Arquillian part1 - JBoss 7 managed container</title><content type='html'>&lt;br /&gt;
&lt;div style=&quot;background-color: white; font-family: Lato, arial, sans-serif; line-height: 24px;&quot;&gt;
&lt;div style=&quot;margin-left: 10px; margin-right: 10px;&quot;&gt;
&lt;span style=&quot;color: #666666; font-size: x-small;&quot;&gt;Document &amp;nbsp;Version 1.0&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;releaseinfo&quot; style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; margin-left: 10px; margin-right: 10px;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div class=&quot;copyright&quot; style=&quot;margin-left: 10px; margin-right: 10px;&quot;&gt;
&lt;div style=&quot;background-color: white; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;
&lt;span style=&quot;color: #666666; font-size: x-small;&quot;&gt;Copyright © 2012 beijing.beijing.012@gmail.com&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;
&lt;span style=&quot;color: #444444; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;h3 style=&quot;font-family: &#39;Times New Roman&#39;; line-height: normal;&quot;&gt;
&lt;span style=&quot;background-color: white; color: #351c75; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14px; font-weight: normal; line-height: 17px;&quot;&gt;&lt;b&gt;Keywords:&lt;/b&gt;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14px; font-weight: normal; line-height: 17px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #351c75; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14px; font-weight: normal; line-height: 17px;&quot;&gt;JEE integration test, JEE unit test, arquillian sample, JBoss 5, JBoss 7, EJB test, arquillian dependencies, arquillian enbedded container, managed&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #351c75; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14px; font-weight: normal; line-height: 17px;&quot;&gt;container, remote container&lt;/span&gt;&lt;/h3&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: white; color: #351c75; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14px; font-weight: normal; line-height: 17px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: #444444; font-size: x-small;&quot;&gt;&lt;a href=&quot;http://milestonenext.blogspot.de/2012/12/ejb3-integration-test-with-arquillian.html&quot;&gt;Part - 1&lt;/a&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;a href=&quot;http://milestonenext.blogspot.de/2012/12/ejb3-integration-test-with-arquillian_17.html&quot;&gt;Part - 2&lt;/a&gt;&amp;nbsp; &amp;nbsp;&lt;a href=&quot;http://milestonenext.blogspot.de/2012/12/tutorial-ejb3-integration-test-with.html&quot;&gt;Part - 3 &lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;a href=&quot;http://milestonenext.blogspot.de/2012/12/tutorial-ejb3-integration-test-with_29.html&quot;&gt;Part - 4&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #b2ab66; border-bottom-left-radius: 2px; border-bottom-right-radius: 2px; border-top-left-radius: 2px; border-top-right-radius: 2px; border: 0px none; padding: 5px 10px;&quot;&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;color: #444444;&quot;&gt;Table of Contents&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;color: #444444;&quot;&gt;1. Create a simple Maven project in Eclipse&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;color: #444444;&quot;&gt;2. Create project&#39;s pom.xml file&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;color: #444444;&quot;&gt;3. Implement source code and test code&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; 3.1 HalloEjbLocal.java&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; 3.2 HalloEjb.java&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; 3.3 TestHalloEJB.java&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;color: #444444;&quot;&gt;4. Download JBossjboss-as-7.1.1.Final&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;color: #444444;&quot;&gt;5. Run the test&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;color: #444444;&quot;&gt;6. Configuration Arquillian to find the JBoss Server&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;/div&gt;
&lt;div style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;
&lt;span style=&quot;color: red; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: red; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: red; font-size: large;&quot;&gt;W&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;ith Arquillian becoming more and more known to the JEE world, more and more people may have tried to evaluate it, to find if it could be the EJB testing tool for the next project. But it often happens, after hours of trying, we still have no luck making &amp;nbsp;even a Hello World test to work. We might have problem finding all the necessary dependencies, we might miss correct configuration files, we might have written the test classes slightly different from what was shown in the official guids...&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;All these could happen, if you are not using the &quot;standard combinations&quot; shown in the official Arquillian documents. For example, currently the combination of &quot;arquillian 1.0.0.3Final + &amp;nbsp;jboss7 embedded + maven + JUnit&quot; is quite well documented. But, if you have jboss7 managed or remote container, even jboss5 container, if your prefere TestNG over JUnit, or you are using ANT not maven, in such cases, the way to Arquillin Hello world are often not so straightforward, and you might think of giving it up.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;
&lt;span style=&quot;color: #444444; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;In the upcomming &quot;&lt;/span&gt;&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;EJB3 Integration Test &amp;nbsp;with Arquillian&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;&quot; serials, I will try to provide several step for step &lt;b&gt;running samples&lt;/b&gt;, to show how to setup some standard and non-stand combinations of Arquillian usage. This includes:&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;Tutorial&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;EJB3 Integration Test &amp;nbsp;with Arquillian part1 - JBoss 7 managed container&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;Tutorial&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;EJB3 Integration Test &amp;nbsp;with Arquillian part2 - JBoss 7 remote container&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;Tutorial&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;EJB3 Integration Test &amp;nbsp;with Arquillian part3 - JBoss 5 managed container&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;Tutorial&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;EJB3 Integration Test &amp;nbsp;with Arquillian part4 - JBoss 5 managed container &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;and &lt;/span&gt;&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;TestNG (&lt;/span&gt;&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;Testing of JPA/Entity Bean using Arquillian is also included in this part)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;Tutorial&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;EJB3 Integration Test &amp;nbsp;with Arquillian part5 - JBoss 5 managed container, TestNG&lt;/span&gt;&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;&amp;nbsp;and ANT(+ Ivy)&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;To follow this &quot;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;b&gt;Tutorial&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;EJB3 Integration Test &amp;nbsp;with Arquillian&quot; serial, you should have at least of basic knowledges of :&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;b&gt;Using Eclipse and Maven&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;b&gt;JEE/EJB3 programming model&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;b&gt;JUnit&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;Now let&#39;s start &amp;nbsp;with the part1&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;h3&gt;
&lt;span style=&quot;color: #674ea7; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: small; line-height: 24px;&quot;&gt;Tutorial EJB3 Integration Test &amp;nbsp;with Arquillian part1 - JBoss 7 &amp;nbsp;managed container&lt;/span&gt;&lt;/h3&gt;
&lt;div&gt;
&lt;span style=&quot;color: #674ea7; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: small; line-height: 24px;&quot;&gt;In this section we will show an integration test of EJB3 stateless session bean using Arquillian with managed &amp;nbsp;JBoss 7 container.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #674ea7; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: small; line-height: 24px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #674ea7; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: small; line-height: 24px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;b&gt;1. Create a simple Maven project in Eclipse&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;We assume you have Eclipse JEE IDE &amp;nbsp;with Maven plugin. Follow the steps below to create a simple Maven project in Eclipse.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px; text-align: left;&quot;&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;step1.&amp;nbsp;Eclipse -&amp;gt; new Project -&amp;gt; Maven Project:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh9kwbVcFZERn3LaOzEKJgFPLdx-2ihbaGytMSvgo_y3zWujVDGcFLVFmEwaIDljntYr4_yifgPF4OM6f_Jl3QDDb0rsqhWNx8XfH1FY8MZ__fMGj4v8qYo-VrubJMHoRlUBSEEyFmVzqwp/s1600/arquillian_create_maven_pro.jpeg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh9kwbVcFZERn3LaOzEKJgFPLdx-2ihbaGytMSvgo_y3zWujVDGcFLVFmEwaIDljntYr4_yifgPF4OM6f_Jl3QDDb0rsqhWNx8XfH1FY8MZ__fMGj4v8qYo-VrubJMHoRlUBSEEyFmVzqwp/s1600/arquillian_create_maven_pro.jpeg&quot; height=&quot;285&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px; text-align: left;&quot;&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;select check-box &quot;Create a simple project&quot; and &quot;Use default Workspace location&quot;. Click &quot;Next&quot;.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px; text-align: left;&quot;&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px; text-align: left;&quot;&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;step2. in the &quot;Maven new Project&quot; view, &amp;nbsp;provide &quot;testarq&quot; as Group Id and &quot;testarq_jb7_managed&quot; as Artifact Id.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px; text-align: left;&quot;&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Give &quot;0.0.1&quot; as Version, leave default &quot;jar&quot; as Packaging (type).&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px; text-align: left;&quot;&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Click &quot;finish&quot;.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px; text-align: left;&quot;&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiz9dz9-4uuRTaN9UX6O2zMTULViQSPXhyphenhyphenW3lBVJTexlH57WnMVhKiEX36hatzQv1PlafwJaleGbYgIv9-GpN8v11Rax3ijjJtC1KZv0Xp65xGBjMxP1g8ADmg_U7Q7xKJrnRYASh5F0YTU/s1600/arquillian_create_maven_pro_1.jpeg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiz9dz9-4uuRTaN9UX6O2zMTULViQSPXhyphenhyphenW3lBVJTexlH57WnMVhKiEX36hatzQv1PlafwJaleGbYgIv9-GpN8v11Rax3ijjJtC1KZv0Xp65xGBjMxP1g8ADmg_U7Q7xKJrnRYASh5F0YTU/s1600/arquillian_create_maven_pro_1.jpeg&quot; height=&quot;320&quot; width=&quot;313&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px; text-align: left;&quot;&gt;
A new Maven project called &quot;testarq_jb7_managed&quot; is created, and show in Eclipse:&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjThz_h7nPPuCPbvNZ9Zkeb0AXEG3yESqNxCE7njVnkEPMpQvZpQ05B25DvaI8mKf9vIpepSiB7KfPwXvXBhWzp7tLKkKcLl1Z0HyszILREsKdTeFr9R64PC4Lxx7gxjHMTBQhyTwA3wyKg/s1600/arquillian_create_maven_pro_jb7_3.jpeg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjThz_h7nPPuCPbvNZ9Zkeb0AXEG3yESqNxCE7njVnkEPMpQvZpQ05B25DvaI8mKf9vIpepSiB7KfPwXvXBhWzp7tLKkKcLl1Z0HyszILREsKdTeFr9R64PC4Lxx7gxjHMTBQhyTwA3wyKg/s1600/arquillian_create_maven_pro_jb7_3.jpeg&quot; height=&quot;211&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px; text-align: left;&quot;&gt;
&lt;b style=&quot;color: #444444; text-align: -webkit-auto;&quot;&gt;2. Create project&#39;s pom.xml file&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px; text-align: left;&quot;&gt;
&lt;b style=&quot;color: #444444; text-align: -webkit-auto;&quot;&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px; text-align: -webkit-auto;&quot;&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;Replace the content of pom.xml file with the following content:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px; text-align: -webkit-auto;&quot;&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: -webkit-auto;&quot;&gt;
&lt;span style=&quot;color: #444444; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fff7b2; border-radius: 6px 6px 6px 6px; border: 1px solid #BBBBBB; padding: 5px 10px 5px;&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&amp;lt;project&lt;/span&gt;&lt;span style=&quot;color: #660000; line-height: 24px;&quot;&gt; xmlns=&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #0b5394; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;&quot;http://maven.apache.org/POM/4.0.0&quot;&lt;/span&gt;&lt;span style=&quot;color: #0b5394; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;xmlns:xsi&lt;/span&gt;&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;=&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;&quot;http://www.w3.org/2001/XMLSchema-instance&quot;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #660000; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;xsi:schemaLocation=&lt;/span&gt;&lt;span style=&quot;color: #0b5394; line-height: 24px;&quot;&gt;&quot;http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd&quot;&lt;/span&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;lt;modelVersion&amp;gt;&lt;/span&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;4.0.0&lt;/span&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&amp;lt;/modelVersion&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;lt;groupId&lt;/span&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&amp;gt;testarg&lt;/span&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;testarq_jb7_managed&lt;/span&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;lt;version&amp;gt;&lt;/span&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;0.0.1&lt;/span&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&amp;lt;/version&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;lt;description&amp;gt;&lt;/span&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;test arr&lt;/span&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&amp;lt;/description&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;lt;properties&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;        &lt;/span&gt;&amp;lt;project.build.sourceEncoding&amp;gt;&lt;/span&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;UTF-8&lt;/span&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&amp;lt;/project.build.sourceEncoding&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;lt;/properties&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;lt;dependencyManagement&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;       &lt;/span&gt;&amp;lt;dependencies&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;             &lt;/span&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                   &lt;/span&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;org.jboss.arquillian&lt;/span&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                   &lt;/span&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;arquillian-bom&lt;/span&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                   &lt;/span&gt;&amp;lt;version&amp;gt;&lt;/span&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;1.0.3.Final&lt;/span&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&amp;lt;/version&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                   &lt;/span&gt;&amp;lt;scope&amp;gt;&lt;/span&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&amp;lt;/scope&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                   &lt;/span&gt;&amp;lt;type&amp;gt;&lt;/span&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;pom&lt;/span&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&amp;lt;/type&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;            &lt;/span&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;        &lt;/span&gt;&amp;lt;/dependencies&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;lt;/dependencyManagement&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;lt;build&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;        &lt;/span&gt;&amp;lt;plugins&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;               &lt;/span&gt;&amp;lt;plugin&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                           &lt;/span&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;maven-compiler-plugin&lt;/span&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                           &lt;/span&gt;&amp;lt;version&amp;gt;&lt;/span&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;2.3.2&lt;/span&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&amp;lt;/version&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                           &lt;/span&gt;&amp;lt;configuration&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                                 &lt;/span&gt;&amp;lt;source&amp;gt;&lt;/span&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;1.6&lt;/span&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&amp;lt;/source&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                                 &lt;/span&gt;&amp;lt;target&amp;gt;&lt;/span&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;1.6&lt;/span&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&amp;lt;/target&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                           &lt;/span&gt;&amp;lt;/configuration&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                &lt;/span&gt;&amp;lt;/plugin&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                &lt;/span&gt;&amp;lt;plugin&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                            &lt;/span&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;maven-surefire-plugin&lt;/span&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                            &lt;/span&gt;&amp;lt;version&amp;gt;&lt;/span&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;2.12&lt;/span&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&amp;lt;/version&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                 &lt;/span&gt;&amp;lt;/plugin&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;        &lt;/span&gt;&amp;lt;/plugins&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;lt;/build&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;lt;dependencies&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                      &lt;/span&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                            &lt;/span&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;junit&lt;/span&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                            &lt;/span&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;junit&lt;/span&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                            &lt;/span&gt;&amp;lt;version&amp;gt;&lt;/span&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;4.8.1&lt;/span&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&amp;lt;/version&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                            &lt;/span&gt;&amp;lt;scope&amp;gt;&lt;/span&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;test&lt;/span&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&amp;lt;/scope&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                       &lt;/span&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                       &lt;/span&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                             &lt;/span&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;org.jboss.arquillian.junit&lt;/span&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                             &lt;/span&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;arquillian-junit-container&lt;/span&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                             &lt;/span&gt;&amp;lt;scope&amp;gt;&lt;/span&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;test&lt;/span&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&amp;lt;/scope&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                       &lt;/span&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                      &lt;/span&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                            &lt;/span&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;org.jboss.spec&lt;/span&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                            &lt;/span&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;jboss-javaee-6.0&lt;/span&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                            &lt;/span&gt;&amp;lt;version&amp;gt;&lt;/span&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;1.0.0.Final&lt;/span&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&amp;lt;/version&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                            &lt;/span&gt;&amp;lt;type&amp;gt;&lt;/span&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;pom&lt;/span&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&amp;lt;/type&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                            &lt;/span&gt;&amp;lt;scope&amp;gt;&lt;/span&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;provided&lt;/span&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&amp;lt;/scope&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                      &lt;/span&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;lt;/dependencies&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;lt;profiles&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;               &lt;/span&gt;&amp;lt;profile&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                           &lt;/span&gt;&amp;lt;id&amp;gt;&lt;/span&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;arquillian-jbossas-managed&lt;/span&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&amp;lt;/id&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                           &lt;/span&gt;&amp;lt;dependencies&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                                 &lt;/span&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                                       &lt;/span&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;org.jboss.arquillian.junit&lt;/span&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                                       &lt;/span&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;arquillian-junit-container&lt;/span&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                                       &lt;/span&gt;&amp;lt;scope&amp;gt;&lt;/span&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;test&lt;/span&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&amp;lt;/scope&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                                 &lt;/span&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                                 &lt;/span&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                                         &lt;/span&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;org.jboss.spec&lt;/span&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                                         &lt;/span&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;jboss-javaee-6.0&lt;/span&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                                         &lt;/span&gt;&amp;lt;version&amp;gt;&lt;/span&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;1.0.0.Final&lt;/span&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&amp;lt;/version&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                                         &lt;/span&gt;&amp;lt;type&amp;gt;&lt;/span&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;pom&lt;/span&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&amp;lt;/type&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                                         &lt;/span&gt;&amp;lt;scope&amp;gt;&lt;/span&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;provided&lt;/span&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&amp;lt;/scope&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                                 &lt;/span&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                                 &lt;/span&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                                       &lt;/span&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;org.jboss.as&lt;/span&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                                       &lt;/span&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;jboss-as-arquillian-container-managed&lt;/span&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                                       &lt;/span&gt;&amp;lt;version&amp;gt;&lt;/span&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;7.1.1.Final&lt;/span&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&amp;lt;/version&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                                      &lt;/span&gt;&amp;lt;scope&amp;gt;&lt;/span&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;test&lt;/span&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&amp;lt;/scope&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                                  &lt;/span&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                                  &lt;/span&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                                        &lt;/span&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;org.jboss.arquillian.protocol&lt;/span&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                                        &lt;/span&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;arquillian-protocol-servlet&lt;/span&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                                        &lt;/span&gt;&amp;lt;scope&amp;gt;&lt;/span&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;test&lt;/span&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&amp;lt;/scope&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                                  &lt;/span&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                         &lt;/span&gt;&amp;lt;/dependencies&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                &lt;/span&gt;&amp;lt;/profile&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;        &lt;/span&gt;&amp;lt;/profiles&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&amp;lt;/project&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px; text-align: -webkit-auto;&quot;&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px; text-align: -webkit-auto;&quot;&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;For the example to work, please make &amp;nbsp;sure you have arquillian-bom version &quot;1.0.0.Final&quot; and &quot;&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;jboss-as-arquillian-container-managed&quot; with version &quot;&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;7.1.1.Final&quot;.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px; text-align: -webkit-auto;&quot;&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px; text-align: -webkit-auto;&quot;&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;Correct arquillian-bom version helps to resolve the needed dependencies. When you have problem like &quot;ClassNotFoundException&quot; or &quot;..&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;one of its dependencies could not be resolved: Failed to read artifact &lt;/span&gt;...&lt;span style=&quot;color: #444444;&quot;&gt;&quot;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px; text-align: -webkit-auto;&quot;&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;You have &amp;nbsp;probabily problem with arquillian-bom version (Can also be that the dependencies are not in the (default) maven central repository, then you need to configure maven to use another repository, we will talk about this issue in detail in another post). Try to use a correct arquillian-bom, instead of adding dependencies manually.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px; text-align: -webkit-auto;&quot;&gt;
&lt;span style=&quot;color: #444444; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px; text-align: left;&quot;&gt;
&lt;b style=&quot;color: #444444; text-align: -webkit-auto;&quot;&gt;3. Implement source code and test code&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px; text-align: left;&quot;&gt;
&lt;b style=&quot;color: #444444; text-align: -webkit-auto;&quot;&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px; text-align: left;&quot;&gt;
&lt;span style=&quot;color: #444444; text-align: -webkit-auto;&quot;&gt;Now we ready to write the EJB and test codes.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px; text-align: -webkit-auto;&quot;&gt;We are going to write a HalloEJB stateless session bean. &amp;nbsp;This bean has one method &quot;&lt;/span&gt;&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;sayHello(txt)&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px; text-align: -webkit-auto;&quot;&gt;&quot;, which return &amp;nbsp;&quot;Hallo xxx&quot; text.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: -webkit-auto;&quot;&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;The bean itself consistes of 2 java classes. i.e. HalloEjb.java and HalloEjbLocal.java. We also need a test class TestHelloEJB.java&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: -webkit-auto;&quot;&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: -webkit-auto;&quot;&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;&lt;b&gt;3.1 HalloEjbLocal.java&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: -webkit-auto;&quot;&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small; line-height: 24px;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fff7b2; border-radius: 6px 6px 6px 6px; border: 1px solid #BBBBBB; padding: 5px 10px 5px;&quot;&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;&lt;span style=&quot;color: #660000;&quot;&gt;package&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt; test.ejb;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;span style=&quot;color: #660000;&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt; javax.ejb.Local;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;@Local&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;span style=&quot;color: #660000;&quot;&gt;public interface&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt; HalloEjbLocal {&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #444444; white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt; String sayHello(String name);&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: -webkit-auto;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;b&gt;3.2 HalloEjb.java&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fff7b2; border-radius: 6px 6px 6px 6px; border: 1px solid #BBBBBB; padding: 5px 10px 5px;&quot;&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #660000; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;package&lt;/span&gt;&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt; test.ejb;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #660000; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt; javax.ejb.Stateless;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;@Stateless&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #660000; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;public class&lt;/span&gt;&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt; HalloEjb &lt;/span&gt;&lt;span style=&quot;color: #660000; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;implements&lt;/span&gt;&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt; HalloEjbLocal {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;&amp;nbsp;     &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;public&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt; String sayHello(String name) {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #444444; white-space: pre;&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;return&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #0b5394; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt; &quot;Hallo &quot;&lt;/span&gt;&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt; &amp;nbsp;+ name;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;div style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;b&gt;3.3 TestHalloEJB.java&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fff7b2; border-radius: 6px 6px 6px 6px; border: 1px solid #BBBBBB; padding: 5px 10px 5px;&quot;&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;span style=&quot;color: #660000;&quot;&gt;package&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt; test.ejb;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;span style=&quot;color: #660000;&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt; javax.ejb.EJB;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;span style=&quot;color: #660000;&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt; junit.framework.Assert;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;span style=&quot;color: #660000;&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt; org.jboss.arquillian.container.test.api.Deployment;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;span style=&quot;color: #660000;&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt; org.jboss.arquillian.junit.Arquillian;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;span style=&quot;color: #660000;&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt; org.jboss.shrinkwrap.api.ShrinkWrap;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;span style=&quot;color: #660000;&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt; org.jboss.shrinkwrap.api.asset.EmptyAsset;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;span style=&quot;color: #660000;&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt; org.jboss.shrinkwrap.api.spec.JavaArchive;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;span style=&quot;color: #660000;&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt; org.junit.Test;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;span style=&quot;color: #660000;&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt; org.junit.runner.RunWith;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;span style=&quot;color: #444444;&quot;&gt;@RunWith(Arquillian.&lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;span style=&quot;color: #660000;&quot;&gt;public class&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt; TestHalloEJB {&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;@Deployment&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #444444; white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;public static&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt; JavaArchive createDeployment(){&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #444444; white-space: pre;&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;JavaArchive jar = ShrinkWrap.create(JavaArchive&lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;.class&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;&quot;halloEjb.jar&quot;&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #444444; white-space: pre;&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;jar.addClass(HalloEjbLocal&lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;.class&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;).addClass(HalloEjb&lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;.class&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #444444; white-space: pre;&quot;&gt;   &lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;&amp;nbsp;&amp;nbsp; jar.addAsManifestResource(EmptyAsset&lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;.INSTANCE&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt; &quot;beans.xml&quot;&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;      &lt;/span&gt;//jar.addAsManifestResource(&quot;ejb-jar.xml&quot;, &quot;ejb-jar.xml&quot;);&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #444444; white-space: pre;&quot;&gt;     &lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;System&lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;.out.&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;println(jar.toString(&lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;true&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;));&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #444444; white-space: pre;&quot;&gt; &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;span style=&quot;color: #660000;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;return&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt; jar;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;line-height: 24px; white-space: pre;&quot;&gt;&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;@EJB&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #444444; white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;HalloEjbLocal &lt;/span&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;halloEjb&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;@Test&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #444444; white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;public void&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt; sayHallo(){&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #444444; white-space: pre;&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;String result = &lt;/span&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;halloEjb&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;.sayHello(&lt;/span&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;&quot;hehe&quot;&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #444444; white-space: pre;&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;Assert.assertEquals(&lt;/span&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;&quot;Hallo hehe&quot;&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;, result);&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;div style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;The @Deployment annotation in the above tells Arquillian &amp;nbsp;at runntimeto assemble a &quot;halloEjb.jar&quot; and deplyoment this to the assigned container.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;The line &quot;jar.addAsManifestResource(EmptyAsset.INSTANCE, &quot;beans.xml&quot;);&quot; is very important here. Other wise, the deployment will fail.(We will see in subsequent post, that the &quot;bean.xml&quot; is &amp;nbsp;sometimes not needed, if the used dependency version is diffeeren than Arquillian 1.0.0.Final +&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;jboss-as-arquillian-container-managed&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;7.1.1.Final&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;&amp;nbsp;).&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;The way EJBs are referenced here conforms with EJB3 annotation style @EJB, just like EJB references in normal EJB3 conponents. No JNDI lookup code is necessary in test code, and that is the magic of Arquillian!&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;When you have followed the steps till now, you would have an Eclipse project as shown in the following image:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiGF-dhwHq_uHCG60hsfez4JRqKoNNgRcnZl4WXYWJHWvuq2w7HUHH3y6Q3B-FIt6NLuDTRO4oYMjPWsdHQJP8gg0uNqO5DhRp1RqVZoavQTUoFTNwsU7M7zTRsiryW3eAuQhmo-9ivmX4y/s1600/arquillian_create_maven_pro_jb7_4.jpeg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiGF-dhwHq_uHCG60hsfez4JRqKoNNgRcnZl4WXYWJHWvuq2w7HUHH3y6Q3B-FIt6NLuDTRO4oYMjPWsdHQJP8gg0uNqO5DhRp1RqVZoavQTUoFTNwsU7M7zTRsiryW3eAuQhmo-9ivmX4y/s1600/arquillian_create_maven_pro_jb7_4.jpeg&quot; height=&quot;320&quot; width=&quot;314&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;
&lt;span style=&quot;color: #444444; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;As mentioned, we will run the EJB test in a &quot;managed jboss7 conteiner&quot;. This means, at run time Arquillian will start an JBoss7 container, deploy the to be tested code in the JBoss, execute the test, and then shutdown the JBoss7 instance.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;So we still need a JBoss7 server.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;b style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;4. Download JBoss&lt;/b&gt;&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;b&gt;jboss-as-7.1.1.Final&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;Dowload the JBoss server &amp;nbsp;from www.jboss.org, and extract it to your favorite location.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;On my machine , I extracted jboss to:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;b&gt;/home/he/jboss-as-7.1.1.Final&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;In order to run jboss you still need to have add &quot;bin&quot; directory of jdk7 to the&lt;b&gt; PATH&lt;/b&gt; of your system, and set &lt;b&gt;JAVA_HOME&lt;/b&gt; to the jdk7 installation location.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;Now we are &quot;ready&quot; to run &amp;nbsp;the &quot;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;TestHalloEJB&lt;/span&gt;&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;&quot; test&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: x-small; line-height: 24px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;b style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;5. Run the test&lt;/b&gt;&lt;br /&gt;
&lt;b style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;&lt;br /&gt;&lt;/b&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;Create an Eclipse Run configuration for maven projects as shown below:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhGtlzCv9omiQ2Z-bwGIAYk3zGgVw79k9wkaPN9SQA42g5iiuyUpW1qRWTyjJYBcTzGJ3KF8O29Gz7cePtqOc72h59UzzU1lu9cBf2LO_Z6Ta0JFBn85fiEHbyVrMy_Ed5yKyyp2oK5jVR9/s1600/arquillian_create_maven_pro_jb7_5.jpeg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhGtlzCv9omiQ2Z-bwGIAYk3zGgVw79k9wkaPN9SQA42g5iiuyUpW1qRWTyjJYBcTzGJ3KF8O29Gz7cePtqOc72h59UzzU1lu9cBf2LO_Z6Ta0JFBn85fiEHbyVrMy_Ed5yKyyp2oK5jVR9/s1600/arquillian_create_maven_pro_jb7_5.jpeg&quot; height=&quot;310&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;div style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;Make sure you have used the &quot;arquillian-jbossas-managed&quot; profile, and Click run.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;You could also run test on commandline using following command:&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #444444;&quot;&gt;&amp;gt; mvn clean test -P&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;arquillian-jbossas-managed&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;When you have correctly followed the step 1-5 till now you would see following screen in your console:&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgU6cVu4SdTzE4y-aquIKOu9HfgLVYX7S1WsZpyBqRmpGSlEu01GuCIk_2_WGhpqXkb2L3FYpSs2hmNp9sNSNjh-aouCFcJtZtVraoxgeifvBi6k1qP9BoE4vIMTtLmELmJXTbTnQgPMNIf/s1600/arquillian_create_maven_pro_jb7_6.jpeg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgU6cVu4SdTzE4y-aquIKOu9HfgLVYX7S1WsZpyBqRmpGSlEu01GuCIk_2_WGhpqXkb2L3FYpSs2hmNp9sNSNjh-aouCFcJtZtVraoxgeifvBi6k1qP9BoE4vIMTtLmELmJXTbTnQgPMNIf/s1600/arquillian_create_maven_pro_jb7_6.jpeg&quot; height=&quot;242&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;We have test error!&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;When you have a close look at the error text, you will see, Arquillian complains aobut missing &quot;jbossHome&quot;. So, this is the problem.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;We need to tell Arquillian where is the JBosss 7 server.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;
&lt;b style=&quot;color: #444444;&quot;&gt;6. Configuration Arquillian to find the JBoss Server&lt;/b&gt;&lt;br /&gt;
&lt;b style=&quot;color: #444444;&quot;&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;Configuring Arquillian to find JBoss could be down in 2 ways. You could either set system property &quot;JBOSS_HOME&quot;, or use &quot;arquillian.xml&quot;. Using &quot;arquillian.xml&quot; file will provide us more felxibility, so we will take this option.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;Create an &quot;arquillian.xml&quot; in &quot;/src/test/resources/&quot; folder with following content:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fff7b2; border-radius: 6px 6px 6px 6px; border: 1px solid #BBBBBB; padding: 5px 10px 5px;&quot;&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #274e13; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&amp;lt;arquillian&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #660000; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;xmlns=&lt;/span&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&quot;http://jboss.org/s&lt;/span&gt;&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;chema/arquillian&quot;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #274e13; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #660000; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt; xmlns:xsi=&lt;/span&gt;&lt;span style=&quot;color: #0b5394; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&quot;http://www.w3.org/2001/XMLSchema-instance&quot;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #274e13; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #660000; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt; xsi:schemaLocation=&lt;/span&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;http://jboss.org/schema/arquillian&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0b5394; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; http://jboss.org/schema/arquillian/arquillian_1_0.xsd&quot;&lt;/span&gt;&lt;span style=&quot;color: #274e13; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #274e13; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;lt;container &lt;/span&gt;&lt;span style=&quot;color: #660000; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;qualifier=&lt;/span&gt;&lt;span style=&quot;color: #0b5394; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&quot;jbossas-7-managed&quot;&lt;/span&gt;&lt;span style=&quot;color: #274e13; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #660000; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;default=&lt;/span&gt;&lt;span style=&quot;color: #0b5394; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&quot;true&quot;&lt;/span&gt;&lt;span style=&quot;color: #274e13; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #274e13; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;configuration&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #274e13; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;property &lt;/span&gt;&lt;span style=&quot;color: #660000; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;name=&lt;/span&gt;&lt;span style=&quot;color: #0b5394; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&quot;jbossHome&quot;&lt;/span&gt;&lt;span style=&quot;color: #274e13; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;/home/he/jboss-as-7.1.1.Final&lt;/span&gt;&lt;span style=&quot;color: #274e13; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&amp;lt;/property&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #274e13; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/configuration&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #274e13; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;lt;/container&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #274e13; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&amp;lt;/arquillian&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;Please remember to replace &quot;&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;/home/he/jboss-as-7.1.1.Final&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;&quot; with the real JBoss7 location on your system&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;
&lt;span style=&quot;background-color: white; color: #674ea7;&quot;&gt;&lt;b&gt;Now try to runt the test again. When you have not made any mistake following the above steps, you will see that the test are successful in your console:&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #674ea7;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fff7b2; border-radius: 6px 6px 6px 6px; border: 1px solid #BBBBBB; padding: 5px 10px 5px;&quot;&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; font-style: italic; line-height: 24px;&quot;&gt;-------------------------------------------------------&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;font-style: italic; line-height: 24px;&quot;&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&amp;nbsp;T E S T S&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-style: italic; line-height: 24px;&quot;&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;-------------------------------------------------------&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-style: italic; line-height: 24px;&quot;&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;Forking command line: /bin/sh -c cd /home/he/workspace_arqtest/testarq_jb7_managed &amp;amp;&amp;amp; /usr/java/jdk1.6.0_32/jre/bin/java -jar /home/he/workspace_arqtest/testarq_jb7_managed/target/surefire/surefirebooter7540012828763289102.jar /home/he/workspace_arqtest/testarq_jb7_managed/target/surefire/surefire6295545167876887576tmp /home/he/workspace_arqtest/testarq_jb7_managed/target/surefire/surefire_07068526860728801090tmp&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-style: italic; line-height: 24px;&quot;&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;Running test.ejb.TestHalloEJB&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-style: italic; line-height: 24px;&quot;&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;log4j:WARN No appenders could be found for logger (org.jboss.logging).&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-style: italic; line-height: 24px;&quot;&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;log4j:WARN Please initialize the log4j system properly.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-style: italic; line-height: 24px;&quot;&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;16.12.2012 21:11:08 org.jboss.as.arquillian.container.managed.ManagedDeployableContainer startInternal&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-style: italic; line-height: 24px;&quot;&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;INFO: Starting container with: [/var/jdk7/bin/java, -Xmx512m, -XX:MaxPermSize=128m, -ea, -Djboss.home.dir=/home/he/jboss-as-7.1.1.Final, -Dorg.jboss.boot.log.file=/home/he/jboss-as-7.1.1.Final/standalone/log/boot.log, -Dlogging.configuration=file:/home/he/jboss-as-7.1.1.Final/standalone/configuration/logging.properties, -Djboss.modules.dir=/home/he/jboss-as-7.1.1.Final/modules, -Djboss.bundles.dir=/home/he/jboss-as-7.1.1.Final/bundles, -jar, /home/he/jboss-as-7.1.1.Final/jboss-modules.jar, -mp, /home/he/jboss-as-7.1.1.Final/modules, -jaxpmodule, javax.xml.jaxp-provider, org.jboss.as.standalone, -server-config, standalone.xml]&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-style: italic; line-height: 24px;&quot;&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;21:11:17,820 INFO &amp;nbsp;[org.jboss.modules] JBoss Modules version 1.1.1.GA&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-style: italic; line-height: 24px;&quot;&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;....&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;i&gt;21:12:03,669 INFO &amp;nbsp;[org.jboss.as] (Controller Boot Thread) JBAS015874: JBoss AS 7.1.1.Final &quot;Brontes&quot; started in 50871ms - Started 187 of 264 services (76 services are passive or on-demand)&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;i&gt;halloEjb.jar:&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;i&gt;/META-INF/&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;i&gt;/META-INF/beans.xml&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;i&gt;/test/&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;i&gt;/test/ejb/&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;i&gt;/test/ejb/HalloEjb.class&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;i&gt;/test/ejb/HalloEjbLocal.class&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;i&gt;...&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;font-style: italic; line-height: 24px;&quot;&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;21:12:12,472 INFO &amp;nbsp;[org.jboss.as.server.deployment] (MSC service thread 1-4) JBAS015876: Starting deployment of &quot;halloEjb.jar&quot;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-style: italic; line-height: 24px;&quot;&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;21:12:12,643 INFO &amp;nbsp;[org.jboss.weld.deployer] (MSC service thread 1-4) JBAS016002: Processing weld deployment halloEjb.jar&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-style: italic; line-height: 24px;&quot;&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;21:12:12,689 INFO &amp;nbsp;[org.jboss.as.ejb3.deployment.processors.EjbJndiBindingsDeploymentUnitProcessor] (MSC service thread 1-4) JNDI bindings for session bean named HalloEjb in deployment unit deployment &quot;halloEjb.jar&quot; are as follows:&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-style: italic; line-height: 24px;&quot;&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;java:global/halloEjb/HalloEjb!test.ejb.HalloEjbLocal&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-style: italic; line-height: 24px;&quot;&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;java:app/halloEjb/HalloEjb!test.ejb.HalloEjbLocal&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-style: italic; line-height: 24px;&quot;&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;java:module/HalloEjb!test.ejb.HalloEjbLocal&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-style: italic; line-height: 24px;&quot;&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;java:global/halloEjb/HalloEjb&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-style: italic; line-height: 24px;&quot;&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;java:app/halloEjb/HalloEjb&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-style: italic; line-height: 24px;&quot;&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;java:module/HalloEjb&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-style: italic; line-height: 24px;&quot;&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;21:12:12,882 INFO &amp;nbsp;[org.jboss.weld.deployer] (MSC service thread 1-1) JBAS016005: Starting Services for CDI deployment: halloEjb.jar&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-style: italic; line-height: 24px;&quot;&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;....&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;i&gt;Results :&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;i&gt;Tests run: 1, Failures: 0, Errors: 0, Skipped: 0&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;i&gt;[INFO] ------------------------------------------------------------------------&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;i&gt;[INFO] BUILD SUCCESS&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;i&gt;[INFO] ------------------------------------------------------------------------&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;i&gt;[INFO] Total time: 1:43.141s&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;i&gt;[INFO] Finished at: Sun Dec 16 21:12:17 CET 2012&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;i&gt;[INFO] Final Memory: 23M/186M&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;i&gt;[INFO] ------------------------------------------------------------------------&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;b&gt;Congratulations!&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;b&gt;You have successfuly tested a stateless session bean using Arquillian with managed JBoss 7.1.1.GA container&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #351c75;&quot;&gt;&lt;a href=&quot;http://milestonenext.blogspot.de/2012/12/ejb3-integration-test-with-arquillian_17.html&quot;&gt;Tutorial EJB3 Integration Test with Arquillian part2 - JBoss 7 remote container&lt;/a&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #444444; font-size: x-small;&quot;&gt;&lt;a href=&quot;http://milestonenext.blogspot.de/2012/12/ejb3-integration-test-with-arquillian.html&quot;&gt;Part - 1&lt;/a&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;a href=&quot;http://milestonenext.blogspot.de/2012/12/ejb3-integration-test-with-arquillian_17.html&quot;&gt;Part - 2&lt;/a&gt;&amp;nbsp; &amp;nbsp;&lt;a href=&quot;http://milestonenext.blogspot.de/2012/12/tutorial-ejb3-integration-test-with.html&quot;&gt;Part - 3&amp;nbsp;&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;a href=&quot;http://milestonenext.blogspot.de/2012/12/tutorial-ejb3-integration-test-with_29.html&quot;&gt;Part - 4&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://milestonenext.blogspot.com/feeds/5853898476030258194/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://milestonenext.blogspot.com/2012/12/ejb3-integration-test-with-arquillian.html#comment-form' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7515187228721563448/posts/default/5853898476030258194'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7515187228721563448/posts/default/5853898476030258194'/><link rel='alternate' type='text/html' href='http://milestonenext.blogspot.com/2012/12/ejb3-integration-test-with-arquillian.html' title='Tutorial EJB3 Integration Test  with Arquillian part1 - JBoss 7 managed container'/><author><name>Beijing Beijing</name><uri>http://www.blogger.com/profile/12013373726184997758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='28' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTm1nk7ZqbPTfBofk6dIg7Zfx820i-FNuXqGbSlZNbRw5-RPJuqgDFNoW_zdgJCMCYj6R5cTGNgNKmwTzeDsEm2EHkqni9ywIanrN-PIRd4Z4yZXUOHhC12zzDid1A1w/s220/profile.png'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh9kwbVcFZERn3LaOzEKJgFPLdx-2ihbaGytMSvgo_y3zWujVDGcFLVFmEwaIDljntYr4_yifgPF4OM6f_Jl3QDDb0rsqhWNx8XfH1FY8MZ__fMGj4v8qYo-VrubJMHoRlUBSEEyFmVzqwp/s72-c/arquillian_create_maven_pro.jpeg" height="72" width="72"/><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7515187228721563448.post-176156938324811401</id><published>2012-10-25T04:33:00.000-07:00</published><updated>2013-01-16T23:33:35.559-08:00</updated><title type='text'>Hibernate MultipleBagFetchException simultaneously fetch multiple bags</title><content type='html'>&lt;div style=&quot;background-color: white; color: #222222; font-family: Lato, arial, sans-serif; font-size: 14px; line-height: 24px;&quot;&gt;
&lt;div style=&quot;margin-left: 10px; margin-right: 10px;&quot;&gt;
&lt;span style=&quot;color: #666666; font-size: xx-small;&quot;&gt;Document &amp;nbsp;Version 1.0&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;releaseinfo&quot; style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; margin-left: 10px; margin-right: 10px;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;span style=&quot;background-color: white; color: #666666; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: xx-small; line-height: 24px;&quot;&gt;Copyright © 2012-2013 beijing.beijing.012@gmail.com&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
comming soon ....</content><link rel='replies' type='application/atom+xml' href='http://milestonenext.blogspot.com/feeds/176156938324811401/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://milestonenext.blogspot.com/2012/10/hiberate-multiplebagfetchexception.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7515187228721563448/posts/default/176156938324811401'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7515187228721563448/posts/default/176156938324811401'/><link rel='alternate' type='text/html' href='http://milestonenext.blogspot.com/2012/10/hiberate-multiplebagfetchexception.html' title='Hibernate MultipleBagFetchException simultaneously fetch multiple bags'/><author><name>Beijing Beijing</name><uri>http://www.blogger.com/profile/12013373726184997758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='28' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTm1nk7ZqbPTfBofk6dIg7Zfx820i-FNuXqGbSlZNbRw5-RPJuqgDFNoW_zdgJCMCYj6R5cTGNgNKmwTzeDsEm2EHkqni9ywIanrN-PIRd4Z4yZXUOHhC12zzDid1A1w/s220/profile.png'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7515187228721563448.post-4966774919207711748</id><published>2012-10-18T11:47:00.002-07:00</published><updated>2013-03-03T23:42:10.760-08:00</updated><title type='text'>JBoss Dynamic Migration of Distributed HA Singletons among Nodes</title><content type='html'>&lt;div style=&quot;background-color: white; color: #222222; font-family: Lato, arial, sans-serif; font-size: 14px; line-height: 24px;&quot;&gt;
&lt;div style=&quot;margin-left: 10px; margin-right: 10px;&quot;&gt;
&lt;span style=&quot;color: #666666; font-size: xx-small;&quot;&gt;Document &amp;nbsp;Version 1.0&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;releaseinfo&quot; style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; margin-left: 10px; margin-right: 10px;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;span style=&quot;background-color: white; color: #666666; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: xx-small; line-height: 24px;&quot;&gt;Copyright © 2012-2013 beijing.beijing.012@gmail.com&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red; font-size: x-large;&quot;&gt;&lt;br /&gt;
&lt;/span&gt; &lt;br /&gt;
&lt;h3&gt;
&lt;span style=&quot;background-color: white; color: #351c75; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14px; font-weight: normal; line-height: 17px;&quot;&gt;&lt;b&gt;Keywords:&lt;/b&gt;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14px; font-weight: normal; line-height: 17px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #351c75; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14px; font-weight: normal; line-height: 17px;&quot;&gt;JBoss HA &amp;nbsp;Service, HA Singleton, JBoss Cluster, JBoss load balancing, load migration, load distribution&lt;/span&gt;&lt;/h3&gt;
&lt;span style=&quot;color: red; font-size: x-large;&quot;&gt;A&lt;/span&gt; JBoss HA singleton is a cluster wide singleton, which runs only on one node of a JBosss cluster. When the node on which the singeton runs, &amp;nbsp;fails, another node (the master node) will automatically start the singelton service on it. When there are&amp;nbsp;several &amp;nbsp;different HA singleton services,&lt;b&gt; ALL&lt;/b&gt; the services will be activated on the master node. When the master node fails, another node take over the role of of master node, and start &lt;b&gt;ALL&lt;/b&gt; the singleton services on this node. This is the default HA singleton behavior of JBoss.&lt;br /&gt;
&lt;br /&gt;
However there might be some problems with the above solution.&lt;br /&gt;
If the singleton services, or some of the singleton services are resource intensive, we are going to have performance problem, if they all run simutaniously on one node, while other nodes are relatively idle.&lt;br /&gt;
&lt;br /&gt;
We will now introduce a solution, which dynamically distribute HA singleton services on preferred nodes on cluster startup. In case of server failures, services will be migrated and distributed to other nodes, by checking the number of still alive nodes, and by considering the preferred nodes.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;With an example, we will show how 3 HA singleton services could be dynmically migrated among a 3-nodes JBoss cluster.&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;
&lt;/b&gt; &lt;b&gt;Rules for distributing services on nodes are:&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
if alive node count 3 -&amp;gt;&amp;nbsp;TestHASvcA &amp;nbsp;on node[0]&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TestHASvcB &amp;nbsp;on node[1]&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TestHASvcC &amp;nbsp;on node[2]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
if alive node count 2 -&amp;gt;&amp;nbsp;TestHASvcA &amp;nbsp;on node[0]&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TestHASvcB &amp;nbsp;on node[0]&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TestHASvcC &amp;nbsp;on node[1]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
if alive node count 1 -&amp;gt;&amp;nbsp;TestHASvcA &amp;nbsp;on node[0]&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TestHASvcB &amp;nbsp;on node[0]&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TestHASvcC &amp;nbsp;on node[0]&lt;br /&gt;
&lt;br /&gt;
Explaination to node sequences:&lt;br /&gt;
For a JBoss cluster, all nodes share the same sorted list of all alive nodes. This list is sorted by the time, when a node joins the cluster. For &amp;nbsp;a 3-nodes cluster, &amp;nbsp;node1, ndoe2, and node3, if nodes &amp;nbsp;are started one after another, then the order list will be :&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; node1 --&amp;gt; [0]&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; node2 --&amp;gt; [1]&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; node3 --&amp;gt; [2]&lt;br /&gt;
&lt;br /&gt;
In case node1 fails, node2 and node3 will update the list to:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;node2 --&amp;gt; [0]&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;node3 --&amp;gt; [1]&lt;br /&gt;
&lt;br /&gt;
When node1 joins the cluster again (restarted), the shared list of the 3 nodes is changed to:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;node2 --&amp;gt; [0]&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; node3 --&amp;gt;&amp;nbsp;[1]&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; node1 --&amp;gt; [2]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Expected HA service migration behavior of our example :&lt;/b&gt;  &lt;br /&gt;
&lt;b&gt;&lt;br /&gt;
&lt;/b&gt; &lt;br /&gt;
&lt;table style=&quot;border: 1px solid #E5E5E5; font-size: 10px; padding: 3px;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt; &lt;td&gt;&lt;b&gt;step1. start node1&lt;/b&gt;&lt;br /&gt;
TestHASvcA on node1&lt;br /&gt;
TestHASvcB on node1  &lt;br /&gt;
TestHASvcC on node1 &lt;/td&gt;&lt;td&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiYahZwXEavcX0eoNQPHQa0zLZ-eJqBV9Ma0mkj2PGbcNu70K7G8iUvRFolyqqPyl_n0h8UDK4U5-xJDhReMbq_ivJnZdyCpXki6CQjNEiWXKqCEV4quc9LW6oe_gAqRSb_8Quwz7Sp9_tD/s1600/green-arrow_new.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiYahZwXEavcX0eoNQPHQa0zLZ-eJqBV9Ma0mkj2PGbcNu70K7G8iUvRFolyqqPyl_n0h8UDK4U5-xJDhReMbq_ivJnZdyCpXki6CQjNEiWXKqCEV4quc9LW6oe_gAqRSb_8Quwz7Sp9_tD/s1600/green-arrow_new.jpg&quot; style=&quot;border: none 0px;&quot; /&gt;&lt;/a&gt; &lt;/td&gt; &lt;td&gt;&lt;b&gt;step2. start node2&lt;/b&gt;&lt;br /&gt;
TestHASvcA on node1&lt;br /&gt;
TestHASvcB on node1&lt;br /&gt;
TestHASvcC migrates to node2 &lt;/td&gt; &lt;td&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiYahZwXEavcX0eoNQPHQa0zLZ-eJqBV9Ma0mkj2PGbcNu70K7G8iUvRFolyqqPyl_n0h8UDK4U5-xJDhReMbq_ivJnZdyCpXki6CQjNEiWXKqCEV4quc9LW6oe_gAqRSb_8Quwz7Sp9_tD/s1600/green-arrow_new.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiYahZwXEavcX0eoNQPHQa0zLZ-eJqBV9Ma0mkj2PGbcNu70K7G8iUvRFolyqqPyl_n0h8UDK4U5-xJDhReMbq_ivJnZdyCpXki6CQjNEiWXKqCEV4quc9LW6oe_gAqRSb_8Quwz7Sp9_tD/s1600/green-arrow_new.jpg&quot; style=&quot;border: none 0px;&quot; /&gt;&lt;/a&gt; &lt;/td&gt; &lt;td&gt;&lt;b&gt;step3. start node3&lt;/b&gt;&lt;br /&gt;
TestHASvcA still on node1&lt;br /&gt;
TestHASvcB migrates to &amp;nbsp;node2&lt;br /&gt;
TestHASvcC migrates to &amp;nbsp;node3&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;&lt;/td&gt; &lt;td&gt;&lt;/td&gt; &lt;td&gt;&lt;/td&gt; &lt;td&gt;&lt;/td&gt; &lt;td&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg6Drmz0HyWyf1OzEqriIAcLZW9zVMwXA-eodUw_KjUb73JA_mo1oA5m6LyUdnbb8to0z_2of_nmlIRiIjUXWmgwPoo0pEDSjj7MfLWv5TfpdcGK2zsHjiS9AtybG3_8ExHYTqJB3pPRlf1/s1600/green-arrow_down.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg6Drmz0HyWyf1OzEqriIAcLZW9zVMwXA-eodUw_KjUb73JA_mo1oA5m6LyUdnbb8to0z_2of_nmlIRiIjUXWmgwPoo0pEDSjj7MfLWv5TfpdcGK2zsHjiS9AtybG3_8ExHYTqJB3pPRlf1/s1600/green-arrow_down.jpg&quot; style=&quot;border: none 0px;&quot; /&gt;&lt;/a&gt;&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;&lt;b&gt;step6. node1 recovers &lt;/b&gt;&lt;br /&gt;
TestHASvcA still on node3&lt;br /&gt;
TestHASvcB still on node3&lt;br /&gt;
TestHASvcC migrates to node1&lt;/td&gt; &lt;td&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZJ8ft42_Al-7OijkAwegSN7DEWYsNptYxMab8pL-8uyiDnZV5XvSKEjKZ9W1Bkx0kWQvCohvgPps5J69_GwC2PuEmEnV2l_Nx2G0GX3SLiwWgFcoE4Wb48Zd7b_ESMHBnCqKVBbnc9KS1/s1600/green-arrow_new_left.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZJ8ft42_Al-7OijkAwegSN7DEWYsNptYxMab8pL-8uyiDnZV5XvSKEjKZ9W1Bkx0kWQvCohvgPps5J69_GwC2PuEmEnV2l_Nx2G0GX3SLiwWgFcoE4Wb48Zd7b_ESMHBnCqKVBbnc9KS1/s1600/green-arrow_new_left.jpg&quot; /&gt;&lt;/a&gt;&lt;/td&gt; &lt;td&gt;&lt;b&gt;step5. node2 &lt;span style=&quot;color: orange;&quot;&gt;fails&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
TestHASvcA migrates to node3&lt;br /&gt;
TestHASvcB migrates to node3&lt;br /&gt;
TestHASvcB still on node2&lt;br /&gt;
TestHASvcC still on node3 &lt;/td&gt; &lt;td&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZJ8ft42_Al-7OijkAwegSN7DEWYsNptYxMab8pL-8uyiDnZV5XvSKEjKZ9W1Bkx0kWQvCohvgPps5J69_GwC2PuEmEnV2l_Nx2G0GX3SLiwWgFcoE4Wb48Zd7b_ESMHBnCqKVBbnc9KS1/s1600/green-arrow_new_left.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZJ8ft42_Al-7OijkAwegSN7DEWYsNptYxMab8pL-8uyiDnZV5XvSKEjKZ9W1Bkx0kWQvCohvgPps5J69_GwC2PuEmEnV2l_Nx2G0GX3SLiwWgFcoE4Wb48Zd7b_ESMHBnCqKVBbnc9KS1/s1600/green-arrow_new_left.jpg&quot; /&gt;&lt;/a&gt; &lt;/td&gt; &lt;td&gt;&lt;b&gt;step4. node1 &lt;span style=&quot;color: orange;&quot;&gt;fails&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
TestHASvcA migrates to node2&lt;br /&gt;
TestHASvcB still on node2&lt;br /&gt;
TestHASvcC still on node3&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg6Drmz0HyWyf1OzEqriIAcLZW9zVMwXA-eodUw_KjUb73JA_mo1oA5m6LyUdnbb8to0z_2of_nmlIRiIjUXWmgwPoo0pEDSjj7MfLWv5TfpdcGK2zsHjiS9AtybG3_8ExHYTqJB3pPRlf1/s1600/green-arrow_down.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg6Drmz0HyWyf1OzEqriIAcLZW9zVMwXA-eodUw_KjUb73JA_mo1oA5m6LyUdnbb8to0z_2of_nmlIRiIjUXWmgwPoo0pEDSjj7MfLWv5TfpdcGK2zsHjiS9AtybG3_8ExHYTqJB3pPRlf1/s1600/green-arrow_down.jpg&quot; style=&quot;border: none 0px;&quot; /&gt;&lt;/a&gt;&lt;/td&gt; &lt;td&gt;&lt;/td&gt; &lt;td&gt;&lt;/td&gt; &lt;td&gt;&lt;/td&gt; &lt;td&gt;&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;&lt;b&gt;step7. node2 recovers&lt;/b&gt; TestHASvcA still on node3&lt;br /&gt;
TestHASvcB migrate to node1&lt;br /&gt;
TestHASvcC migrates to node2&lt;/td&gt; &lt;td&gt;&lt;/td&gt; &lt;td&gt;&lt;/td&gt; &lt;td&gt;&lt;/td&gt; &lt;td&gt;&lt;/td&gt; &lt;/tr&gt;
&lt;/tbody&gt; &lt;/table&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b style=&quot;color: #351c75; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px; text-align: justify;&quot;&gt;Configure and run a 3-nodes JBoss cluster&lt;/b&gt;&lt;br /&gt;
&lt;b style=&quot;color: #351c75; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/b&gt; Please refer to the post&amp;nbsp;&lt;b style=&quot;font-size: small; line-height: 19px; text-align: justify;&quot;&gt;&lt;span style=&quot;background-color: white; color: #674ea7;&quot;&gt;&lt;a href=&quot;http://milestonenext.blogspot.de/2012/10/ha-singleton-cluster-wide-singleton-in.html&quot;&gt;HA Singleton, Cluster Wide Singleton as MBean in JBoss 5, part 1/3&lt;/a&gt;, &amp;nbsp;&lt;/span&gt;&lt;/b&gt;and create a JBoss cluster with 3 nodes:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;node1&lt;/li&gt;
&lt;li&gt;node2&lt;/li&gt;
&lt;li&gt;node3&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;text-align: -webkit-auto;&quot;&gt;
&lt;b style=&quot;color: #351c75; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px; text-align: justify;&quot;&gt;Create 3 MBean&amp;nbsp;&lt;/b&gt;&lt;span style=&quot;color: #351c75; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 19px;&quot;&gt;&lt;b&gt;TestHASvcA,&amp;nbsp;TestHASvcB,&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;b style=&quot;color: #351c75; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot;&gt;TestHASvcC.&lt;/b&gt;&lt;/div&gt;
Use your favorite IDE to creat a simple Java project &quot;&lt;b&gt;HAServiceDynamicLoadMigration&lt;/b&gt;&quot;.&lt;br /&gt;
Please refer to the post&lt;a href=&quot;http://milestonenext.blogspot.de/2012/10/ha-singleton-cluster-wide-singleton-as.html&quot;&gt;&amp;nbsp;&lt;/a&gt;&lt;b style=&quot;font-size: small; line-height: 19px; text-align: justify;&quot;&gt;&lt;span style=&quot;background-color: white; color: #674ea7;&quot;&gt;&lt;a href=&quot;http://milestonenext.blogspot.de/2012/10/ha-singleton-cluster-wide-singleton-as.html&quot;&gt;HA Singleton, Cluster Wide Singleton as MBean in JBoss 5, part 2/3&lt;/a&gt;, &amp;nbsp;&lt;/span&gt;&lt;/b&gt;and create 3 JBoss MBeans TestHASvcA,&amp;nbsp;TestHASvcB and&amp;nbsp;TestHASvcC.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b style=&quot;color: #351c75; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px; text-align: justify;&quot;&gt;&amp;nbsp;&lt;/b&gt;&lt;span style=&quot;color: #351c75; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 19px;&quot;&gt;&lt;b&gt;TestHASvcA.java&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #351c75; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 19px;&quot;&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/span&gt;&lt;/span&gt; &lt;br /&gt;
&lt;div style=&quot;background-color: #fffff8; border-radius: 6px 6px 6px 6px; border: 1px solid #BBBBBB; padding: 5px 10px 5px;&quot;&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 19px;&quot;&gt;&lt;span style=&quot;color: #660000;&quot;&gt;package&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt; test.ha;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 19px;&quot;&gt;&lt;span style=&quot;color: #660000;&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt; org.jboss.system.ServiceMBeanSupport;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;color: #0b5394; font-size: 14px; line-height: 19px;&quot;&gt;/**&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;color: #0b5394; font-size: 14px; line-height: 19px;&quot;&gt;&amp;nbsp;* Make sure to use the naming standard for MBeans (If the&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;color: #0b5394; font-size: 14px; line-height: 19px;&quot;&gt;&amp;nbsp;* source class is named Serious, then the interface must be named&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;color: #0b5394; font-size: 14px; line-height: 19px;&quot;&gt;&amp;nbsp;* SeriousMBean).&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;color: #0b5394; font-size: 14px; line-height: 19px;&quot;&gt;&amp;nbsp;*&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;color: #0b5394; font-size: 14px; line-height: 19px;&quot;&gt;&amp;nbsp;* @author ws&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;color: #0b5394; font-size: 14px; line-height: 19px;&quot;&gt;&amp;nbsp;*/&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 19px;&quot;&gt;&lt;span style=&quot;color: #660000;&quot;&gt;public class&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt; TestHASvcA &lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;extends&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt; ServiceMBeanSupport &lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;implements &lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;TestHASvcAMBean {&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 19px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #444444; white-space: pre;&quot;&gt;     &lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;public void&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt; startHAService() {&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 19px;&quot;&gt;&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;         &lt;/span&gt;System.&lt;/span&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;out&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #444444; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot;&gt;.println&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot;&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;(&quot;# Starting HA service &quot; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #444444; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot;&gt;+ TestHASvcA.&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot;&gt;&lt;span style=&quot;color: #660000;&quot;&gt;class&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #444444; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot;&gt;.toString());&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 19px;&quot;&gt;&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 19px;&quot;&gt;&lt;span style=&quot;color: #444444;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 19px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #444444; white-space: pre;&quot;&gt;     &lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;public void&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt; stopHAService() {&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 19px;&quot;&gt;&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;         &lt;/span&gt;System.&lt;/span&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;out&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #444444; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot;&gt;.println(&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot;&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;&quot;# Stopping HA service &quot;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #444444; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot;&gt; + TestHASvcA.&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot;&gt;&lt;span style=&quot;color: #660000;&quot;&gt;class&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #444444; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot;&gt;.toString());&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 19px;&quot;&gt;&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 19px;&quot;&gt;&lt;span style=&quot;color: #444444;&quot;&gt;&amp;nbsp;}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: #444444; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 19px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt; &lt;b style=&quot;color: #351c75; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot;&gt;&lt;br /&gt;
&lt;/b&gt; &lt;b style=&quot;color: #351c75; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot;&gt;&lt;br /&gt;
&lt;/b&gt;  &lt;b style=&quot;color: #351c75; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot;&gt;TestHASvcAMBean.java&lt;/b&gt;&lt;br /&gt;
&lt;span style=&quot;color: #351c75; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 19px;&quot;&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/span&gt;&lt;/span&gt; &lt;br /&gt;
&lt;div style=&quot;background-color: #fffff8; border-radius: 6px 6px 6px 6px; border: 1px solid #BBBBBB; padding: 5px 10px 5px;&quot;&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #660000; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;package&lt;/span&gt;&lt;span style=&quot;color: #444444; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt; test.ha;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span style=&quot;color: #660000; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;color: #444444; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt; org.jboss.system.ServiceMBean;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span style=&quot;color: #444444; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #660000; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;public interface&lt;/span&gt;&lt;span style=&quot;color: #444444; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt; TestHASvcAMBean &lt;/span&gt;&lt;span style=&quot;color: #660000; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;extends&lt;/span&gt;&lt;span style=&quot;color: #444444; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt; ServiceMBean {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: #444444; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt; &lt;span style=&quot;color: #351c75; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 19px;&quot;&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/span&gt;&lt;/span&gt; &lt;br /&gt;
&lt;span style=&quot;color: #351c75; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 19px;&quot;&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/span&gt;&lt;/span&gt; &lt;span style=&quot;color: #351c75; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 19px;&quot;&gt;&lt;b&gt;TestHASvcB.java&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #351c75; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 19px;&quot;&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/span&gt;&lt;/span&gt; &lt;br /&gt;
&lt;div style=&quot;background-color: #fffff8; border-radius: 6px 6px 6px 6px; border: 1px solid #BBBBBB; padding: 5px 10px 5px;&quot;&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 19px;&quot;&gt;&lt;span style=&quot;color: #660000;&quot;&gt;package&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt; test.ha;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 19px;&quot;&gt;&lt;span style=&quot;color: #660000;&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt; org.jboss.system.ServiceMBeanSupport;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;color: #0b5394; font-size: 14px; line-height: 19px;&quot;&gt;/**&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;color: #0b5394; font-size: 14px; line-height: 19px;&quot;&gt;&amp;nbsp;* Make sure to use the naming standard for MBeans (If the&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;color: #0b5394; font-size: 14px; line-height: 19px;&quot;&gt;&amp;nbsp;* source class is named Serious, then the interface must be named&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;color: #0b5394; font-size: 14px; line-height: 19px;&quot;&gt;&amp;nbsp;* SeriousMBean).&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;color: #0b5394; font-size: 14px; line-height: 19px;&quot;&gt;&amp;nbsp;*&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;color: #0b5394; font-size: 14px; line-height: 19px;&quot;&gt;&amp;nbsp;* @author ws&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;color: #0b5394; font-size: 14px; line-height: 19px;&quot;&gt;&amp;nbsp;*/&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 19px;&quot;&gt;&lt;span style=&quot;color: #660000;&quot;&gt;public class&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt; TestHASvcB extends ServiceMBeanSupport &lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;implements&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt; TestHASvcBMBean {&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 19px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #444444; white-space: pre;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;public void&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt; startHAService() {&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 19px;&quot;&gt;&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;         &lt;/span&gt;System.&lt;/span&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;out&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #444444; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot;&gt;.println(&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot;&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;&quot;#Starting HA service &quot;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #444444; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot;&gt; + TestHASvcB.&lt;/span&gt;&lt;span style=&quot;color: #660000; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;color: #444444; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot;&gt;.toString());&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 19px;&quot;&gt;&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 19px;&quot;&gt;&lt;span style=&quot;color: #444444;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 19px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span style=&quot;color: #444444;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;public void&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt; stopHAService() {&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 19px;&quot;&gt;&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;          &lt;/span&gt;System.&lt;/span&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;out&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #444444; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot;&gt;.println(&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot;&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;&quot;#Stopping HA service &quot;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #444444; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot;&gt; + TestHASvcB.&lt;/span&gt;&lt;span style=&quot;color: #660000; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;color: #444444; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot;&gt;.toString());&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 19px;&quot;&gt;&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 19px;&quot;&gt;&lt;span style=&quot;color: #444444;&quot;&gt;&amp;nbsp;}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: #444444; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 19px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt; &lt;span style=&quot;color: #444444; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 19px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt; &lt;b style=&quot;color: #351c75; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot;&gt;&lt;br /&gt;
&lt;/b&gt;&lt;b style=&quot;color: #351c75; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot;&gt;TestHASvcBMBean.java&lt;/b&gt;&lt;br /&gt;
&lt;span style=&quot;color: #351c75; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 19px;&quot;&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/span&gt;&lt;/span&gt; &lt;br /&gt;
&lt;div style=&quot;background-color: #fffff8; border-radius: 6px 6px 6px 6px; border: 1px solid #BBBBBB; padding: 5px 10px 5px;&quot;&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;package test.ha;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span style=&quot;color: #660000; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;color: #444444; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt; org.jboss.system.ServiceMBean;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span style=&quot;color: #660000; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;public interface&lt;/span&gt;&lt;span style=&quot;color: #444444; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt; TestHASvcBMBean &lt;/span&gt;&lt;span style=&quot;color: #660000; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;extends&lt;/span&gt;&lt;span style=&quot;color: #444444; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt; ServiceMBean {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #351c75; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 19px;&quot;&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/span&gt;&lt;/span&gt; &lt;/div&gt;
&lt;span style=&quot;color: #444444; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt; &lt;span style=&quot;color: #444444; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt; &lt;span style=&quot;color: #444444; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt; &lt;span style=&quot;color: #351c75; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 19px;&quot;&gt;&lt;b&gt;TestHASvcC.java&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #351c75; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 19px;&quot;&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/span&gt;&lt;/span&gt; &lt;br /&gt;
&lt;div style=&quot;background-color: #fffff8; border-radius: 6px 6px 6px 6px; border: 1px solid #BBBBBB; padding: 5px 10px 5px;&quot;&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 19px;&quot;&gt;&lt;span style=&quot;color: #660000;&quot;&gt;package&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt; test.ha;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 19px;&quot;&gt;&lt;span style=&quot;color: #660000;&quot;&gt;impor&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;t org.jboss.system.ServiceMBeanSupport;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;color: #0b5394; font-size: 14px; line-height: 19px;&quot;&gt;/**&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;color: #0b5394; font-size: 14px; line-height: 19px;&quot;&gt;&amp;nbsp;* Make sure to use the naming standard for MBeans (If the&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;color: #0b5394; font-size: 14px; line-height: 19px;&quot;&gt;&amp;nbsp;* source class is named Serious, then the interface must be named&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;color: #0b5394; font-size: 14px; line-height: 19px;&quot;&gt;&amp;nbsp;* SeriousMBean).&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;color: #0b5394; font-size: 14px; line-height: 19px;&quot;&gt;&amp;nbsp;*&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;color: #0b5394; font-size: 14px; line-height: 19px;&quot;&gt;&amp;nbsp;* @author ws&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;color: #0b5394; font-size: 14px; line-height: 19px;&quot;&gt;&amp;nbsp;*/&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 19px;&quot;&gt;&lt;span style=&quot;color: #660000;&quot;&gt;public class&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt; TestHASvcC extends ServiceMBeanSupport &lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;implements&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt; TestHASvcCMBean {&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 19px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span style=&quot;color: #444444;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;public void&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt; startHAService() {&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 19px;&quot;&gt;&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;         &lt;/span&gt;System.&lt;/span&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;out&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #444444; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot;&gt;.println(&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot;&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;&quot;#Starting HA service &quot;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #444444; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot;&gt; + TestHASvcC.&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot;&gt;&lt;span style=&quot;color: #660000;&quot;&gt;class&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #444444; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot;&gt;.toString());&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 19px;&quot;&gt;&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;&amp;nbsp;    &lt;/span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 19px;&quot;&gt;&lt;span style=&quot;color: #444444;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 19px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span style=&quot;color: #444444;&quot;&gt;     &lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;public void&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt; stopHAService() {&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 19px;&quot;&gt;&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;          &lt;/span&gt;System.&lt;/span&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;out&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #444444; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot;&gt;.println(&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot;&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;&quot;#Stopping HA service &quot;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #444444; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot;&gt; + TestHASvcC.&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot;&gt;&lt;span style=&quot;color: #660000;&quot;&gt;class&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #444444; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot;&gt;.toString());&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 19px;&quot;&gt;&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 19px;&quot;&gt;&lt;span style=&quot;color: #444444;&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: #444444; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 19px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt; &lt;b style=&quot;color: #351c75; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot;&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;/b&gt;&lt;b style=&quot;color: #351c75; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot;&gt;TestHASvcCMBean.java&lt;/b&gt;&lt;br /&gt;
&lt;b style=&quot;color: #351c75; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot;&gt;&lt;br /&gt;
&lt;/b&gt; &lt;br /&gt;
&lt;div style=&quot;background-color: #fffff8; border-radius: 6px 6px 6px 6px; border: 1px solid #BBBBBB; padding: 5px 10px 5px;&quot;&gt;
&lt;span style=&quot;color: #660000; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;package&lt;/span&gt;&lt;span style=&quot;color: #444444; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt; test.ha;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span style=&quot;color: #660000; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;color: #444444; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt; org.jboss.system.ServiceMBean;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span style=&quot;color: #660000; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;public interface&lt;/span&gt;&lt;span style=&quot;color: #444444; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt; TestHASvcCMBean &lt;/span&gt;&lt;span style=&quot;color: #660000; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;extends&lt;/span&gt;&lt;span style=&quot;color: #444444; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt; ServiceMBean {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: #444444; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt; &lt;span style=&quot;color: #444444; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt; &lt;b style=&quot;color: #351c75; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot;&gt;&lt;br /&gt;
&lt;/b&gt; &lt;span style=&quot;color: #351c75; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 19px;&quot;&gt;&lt;b&gt;Customize JBoss HA Singleton Service&#39;s Selection Policy&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
Key of dynamic HA service distrbution and migration is customized activation of HA singleton services on selected node at runtime. JBoss needs sort of &quot;&lt;a href=&quot;http://www.docjar.org/docs/api/org/jboss/ha/singleton/HASingletonElectionPolicySimple.html&quot;&gt;HASingletonElectionPolicy&lt;/a&gt;&quot; to decide&amp;nbsp;on which node to activate a certain HA singleton service. The default selection policy is &quot;&lt;a href=&quot;http://www.docjar.org/docs/api/org/jboss/ha/singleton/HASingletonElectionPolicySimple.html&quot;&gt;HASingletonElectionPolicySimple&lt;/a&gt;&quot;, which always activate HA Service on the &quot;0th&quot; node.&lt;br /&gt;
To change the default selection behavoir, we need to provide JBoss with a&amp;nbsp;&amp;nbsp; customized HA selection policy, we call it &quot;TestP&quot; selection policy hereafter:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;write a &quot;TestPMBean&quot; interface for the &quot;TestP&quot; MBean.&lt;/li&gt;
&lt;li&gt;write a &quot;TestP&quot; MBean, which, implements &quot;HASingletonElectionPolicy&quot; and TestPBean.&lt;/li&gt;
&lt;li&gt;configure JBoss to apply this selection policy to the singleton service MBeans in &quot;jboss-service.xml&quot;&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b style=&quot;font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; line-height: 19px;&quot;&gt;&lt;span style=&quot;color: #674ea7;&quot;&gt;TestPMBean.java&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 19px;&quot;&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/span&gt;&lt;/span&gt; &lt;br /&gt;
&lt;div style=&quot;background-color: #fffff8; border-radius: 6px 6px 6px 6px; border: 1px solid #BBBBBB; padding: 5px 10px 5px;&quot;&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #660000; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;package&lt;/span&gt;&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt; test.ha;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;color: #660000;&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;color: #666666;&quot;&gt; org.jboss.system.ServiceMBean;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;color: #660000;&quot;&gt;public interface&lt;/span&gt;&lt;span style=&quot;color: #666666;&quot;&gt; TestPMBean &lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;extends&lt;/span&gt;&lt;span style=&quot;color: #666666;&quot;&gt; ServiceMBean {&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #660000; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt; void&lt;/span&gt;&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt; setId(String singletonId);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; String getId();&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&amp;nbsp;}&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt; &lt;b style=&quot;font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; line-height: 19px;&quot;&gt;&lt;span style=&quot;color: #666666;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/b&gt; &lt;br /&gt;
&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 19px;&quot;&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/span&gt;&lt;/span&gt; &lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 19px;&quot;&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/span&gt;&lt;/span&gt; &lt;br /&gt;
&lt;div&gt;
&lt;b style=&quot;font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; line-height: 19px;&quot;&gt;&lt;span style=&quot;color: #674ea7;&quot;&gt;TestP.java&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 19px;&quot;&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/span&gt;&lt;/span&gt; &lt;br /&gt;
&lt;div style=&quot;background-color: #fffff8; border-radius: 6px 6px 6px 6px; border: 1px solid #BBBBBB; padding: 5px 10px 5px;&quot;&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #660000; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;package&lt;/span&gt;&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt; test.ha;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span style=&quot;color: #660000; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt; java.util.List;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span style=&quot;color: #660000; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt; org.jboss.ha.framework.interfaces.ClusterNode;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #660000; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt; org.jboss.ha.framework.interfaces.HASingletonElectionPolicy;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #660000; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt; org.jboss.system.ServiceMBeanSupport;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span style=&quot;color: #660000; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;public class&lt;/span&gt;&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt; TestP &lt;/span&gt;&lt;span style=&quot;color: #660000; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;extends&lt;/span&gt;&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt; ServiceMBeanSupport &lt;/span&gt;&lt;span style=&quot;color: #660000; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;implements&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                        &lt;/span&gt;HASingletonElectionPolicy, TestPMBean {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span style=&quot;color: #666666;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;private&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt; String &lt;/span&gt;&lt;span style=&quot;color: #0b5394; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;id;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;@Override&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #666666; white-space: pre;&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;public void&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt; setId(String singletonId) {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span style=&quot;color: #666666;&quot;&gt;         &lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;this&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0b5394; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;id&lt;/span&gt;&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt; = singletonId;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;      &lt;/span&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;&amp;nbsp;     &lt;/span&gt;@Override&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #666666; white-space: pre;&quot;&gt;       &lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;public&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt; String getId() {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #666666; white-space: pre;&quot;&gt;           &lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;return&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #660000; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;this&lt;/span&gt;&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0b5394; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;id&lt;/span&gt;&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;       &lt;/span&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span style=&quot;color: #134f5c; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;       /&lt;/span&gt;/ @Override&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;&lt;span style=&quot;color: #666666;&quot;&gt;&amp;nbsp;     &lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;public &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;ClusterNode elect(List&amp;lt;ClusterNode&amp;gt; arg0) {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;             &lt;/span&gt;System.&lt;/span&gt;&lt;span style=&quot;color: #0b5394; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;out&lt;/span&gt;&lt;span style=&quot;color: #666666; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif;&quot;&gt;.println(&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;&quot; ### list all nodes before doing selection ploicy name: &quot;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #666666; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif;&quot;&gt;);&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #666666; white-space: pre;&quot;&gt;              &lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;for&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt; (ClusterNode tmpNode : arg0) {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                  &lt;/span&gt;System.&lt;/span&gt;&lt;span style=&quot;color: #0b5394; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;out&lt;/span&gt;&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;.println(&lt;/span&gt;&lt;span style=&quot;color: #0b5394; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&quot; ## node name: &quot;&lt;/span&gt;&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt; + tmpNode.getName());&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;              &lt;/span&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span style=&quot;color: #666666;&quot;&gt;             &lt;/span&gt;&lt;span style=&quot;color: #134f5c;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #134f5c;&quot;&gt;// int nodeSeg = getNodeSeq(arg0);&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;              &lt;/span&gt;ClusterNode selectedNode = getNodeSeq(arg0);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;              &lt;/span&gt;System.&lt;/span&gt;&lt;span style=&quot;color: #0b5394; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;out&lt;/span&gt;&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;.println(&lt;/span&gt;&lt;span style=&quot;color: #0b5394; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&quot; ## selected node, policy name: &quot;&lt;/span&gt;&lt;span style=&quot;color: #666666; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif;&quot;&gt;+ selectedNode.getName());&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span style=&quot;color: #666666;&quot;&gt;            &lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;return&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt; selectedNode;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;          &lt;/span&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #134f5c; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&amp;nbsp; /*&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #134f5c; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; * This method changes the selection behavior from default to our customized selection &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #134f5c; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; logic.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #134f5c; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; *&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #134f5c; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; */&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #666666; white-space: pre;&quot;&gt;       &lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;private&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt; ClusterNode getNodeSeq(List&amp;lt;ClusterNode&amp;gt; activeNodes) {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;             &lt;/span&gt;System.&lt;/span&gt;&lt;span style=&quot;color: #0b5394; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;out&lt;/span&gt;&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;.println(&lt;/span&gt;&lt;span style=&quot;color: #0b5394; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&quot; ## getNodeSeq , &amp;nbsp;policy name &quot; &lt;/span&gt;&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;+ &lt;/span&gt;&lt;span style=&quot;color: #0b5394; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;id&lt;/span&gt;&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span style=&quot;color: #666666;&quot;&gt;            &lt;/span&gt;&lt;span style=&quot;color: #134f5c;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #134f5c;&quot;&gt;// A, B, C 3 logical nodes&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #134f5c; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;             &lt;/span&gt;// 3 physical nodes: A-&amp;gt;0, B-&amp;gt;1, C-&amp;gt;2&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #666666; white-space: pre;&quot;&gt;             &lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;int&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt; nodeCount = activeNodes.size();&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span style=&quot;color: #666666;&quot;&gt;            &lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;if &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;(nodeCount == 3) {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #666666; white-space: pre;&quot;&gt;                  &lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;if&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;color: #660000; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;this&lt;/span&gt;&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0b5394; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;id&lt;/span&gt;&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;.equals(&lt;/span&gt;&lt;span style=&quot;color: #0b5394; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&quot;SS_A&quot;&lt;/span&gt;&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;)) {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span style=&quot;color: #666666;&quot;&gt;                      &lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;return&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt; activeNodes.get(0);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                   &lt;/span&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt; &lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span style=&quot;color: #666666;&quot;&gt;                  &lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;if&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;color: #660000; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;this&lt;/span&gt;&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0b5394; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;id&lt;/span&gt;&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;.equals(&lt;/span&gt;&lt;span style=&quot;color: #0b5394; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&quot;SS_B&quot;&lt;/span&gt;&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;)) {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span style=&quot;color: #666666;&quot;&gt;                      &lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;return&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt; activeNodes.get(1);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                    &lt;/span&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt; &lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #666666; white-space: pre;&quot;&gt;                   &lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;if&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;color: #660000; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;this&lt;/span&gt;&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0b5394; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;id&lt;/span&gt;&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;.equals(&lt;/span&gt;&lt;span style=&quot;color: #0b5394; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&quot;SS_C&quot;&lt;/span&gt;&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;)) {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span style=&quot;color: #666666;&quot;&gt;                      &lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;return&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt; activeNodes.get(2);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                     &lt;/span&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                 &lt;/span&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt; &lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #666666; white-space: pre;&quot;&gt;              &lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;if&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt; (nodeCount == 2) {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #666666; white-space: pre;&quot;&gt;                   &lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;if&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;color: #660000; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;this&lt;/span&gt;&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0b5394; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;id&lt;/span&gt;&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;.equals(&lt;/span&gt;&lt;span style=&quot;color: #0b5394; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&quot;SS_A&quot;&lt;/span&gt;&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;)) {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #666666; white-space: pre;&quot;&gt;                        &lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;return&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt; activeNodes.get(0);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                    &lt;/span&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt; &lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span style=&quot;color: #666666;&quot;&gt;                   &lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;if&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;color: #660000; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;this&lt;/span&gt;&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0b5394; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;id&lt;/span&gt;&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;.equals(&lt;/span&gt;&lt;span style=&quot;color: #0b5394; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&quot;SS_B&lt;/span&gt;&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&quot;)) {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span style=&quot;color: #666666;&quot;&gt;                        &lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;return&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt; activeNodes.get(0);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                    &lt;/span&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt; &lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span style=&quot;color: #666666;&quot;&gt;                  &lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;if&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;color: #660000; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;this&lt;/span&gt;&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0b5394; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;id&lt;/span&gt;&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;.equals(&lt;/span&gt;&lt;span style=&quot;color: #0b5394; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&quot;SS_C&lt;/span&gt;&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&quot;)) {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #666666; white-space: pre;&quot;&gt;                        &lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;return&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt; activeNodes.get(1);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                    &lt;/span&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                &lt;/span&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt; &lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span style=&quot;color: #666666;&quot;&gt;              &lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;if &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;(nodeCount == 1) {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span style=&quot;color: #666666;&quot;&gt;                  &lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;if &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #660000; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;this&lt;/span&gt;&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0b5394; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;id&lt;/span&gt;&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;.equals(&lt;/span&gt;&lt;span style=&quot;color: #0b5394; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&quot;SS_A&quot;&lt;/span&gt;&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;)) {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #666666; white-space: pre;&quot;&gt;                        &lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;return&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt; activeNodes.get(0);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                    &lt;/span&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt; &lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span style=&quot;color: #666666;&quot;&gt;                  &lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;if&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;color: #660000; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;this&lt;/span&gt;&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0b5394; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;id&lt;/span&gt;&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;.equals(&lt;/span&gt;&lt;span style=&quot;color: #0b5394; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&quot;SS_B&quot;&lt;/span&gt;&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;)) {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span style=&quot;color: #666666;&quot;&gt;                     &lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;return&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt; activeNodes.get(0);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                   &lt;/span&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt; &lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span style=&quot;color: #666666;&quot;&gt;                 &lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;if &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #660000; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;this&lt;/span&gt;&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0b5394; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;id&lt;/span&gt;&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;.equals(&lt;/span&gt;&lt;span style=&quot;color: #0b5394; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&quot;SS_C&quot;&lt;/span&gt;&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;)) {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #666666; white-space: pre;&quot;&gt;                      &lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;return&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt; activeNodes.get(0);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                  &lt;/span&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;              &lt;/span&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #666666; white-space: pre;&quot;&gt;             &lt;/span&gt;&lt;span style=&quot;color: #134f5c;&quot;&gt;// Default active service on the 0th node&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #666666; white-space: pre;&quot;&gt;              &lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;return&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt; activeNodes.get(0);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;        &lt;/span&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt; &lt;b style=&quot;font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; line-height: 19px;&quot;&gt;&lt;span style=&quot;color: #666666; font-size: x-small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;b style=&quot;font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; line-height: 19px;&quot;&gt;&lt;span style=&quot;color: #674ea7;&quot;&gt;jboss-service.xml&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;color: #674ea7;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #666666; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif;&quot;&gt;Create a new folder &quot;META-INF&quot; directly in base folder of &quot;&lt;/span&gt;&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;HAServiceDynamicLoadMigration&lt;/span&gt;&lt;span style=&quot;color: #666666; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif;&quot;&gt;&quot; project. Create a new &quot;jboss-service.xml&quot; in &quot;&lt;/span&gt;&lt;span style=&quot;color: #666666; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif;&quot;&gt;META-INF&lt;/span&gt;&lt;span style=&quot;color: #666666; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif;&quot;&gt;&quot; with following content:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: #fffff8; border-radius: 6px 6px 6px 6px; border: 1px solid #BBBBBB; padding: 5px 10px 5px;&quot;&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;color: #134f5c; line-height: 19px;&quot;&gt;&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;color: #134f5c; line-height: 19px;&quot;&gt;&amp;lt;server&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;color: #134f5c; line-height: 19px;&quot;&gt;&amp;lt;mbean code=&quot;test.ha.TestHASvcA&quot; name=&quot;myexample:service=TestHASvcA&quot;/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;color: #134f5c; line-height: 19px;&quot;&gt;&amp;lt;mbean code=&quot;test.ha.TestP&quot;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;color: #134f5c; line-height: 19px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; name=&quot;myexample:service=SingletonServiceControllerA,type=ElectionPolicy&quot;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;color: #134f5c; line-height: 19px;&quot;&gt;&amp;lt;attribute name=&quot;Id&quot;&amp;gt;SS_A&amp;lt;/attribute&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;color: #134f5c; line-height: 19px;&quot;&gt;&amp;lt;/mbean&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;color: #134f5c; line-height: 19px;&quot;&gt;&amp;lt;mbean code=&quot;org.jboss.ha.singleton.HASingletonController&quot; name=&quot;myexample:service=SingletonServiceControllerA&quot;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;color: #134f5c; line-height: 19px;&quot;&gt;&amp;lt;attribute name=&quot;HAPartition&quot;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;color: #134f5c; line-height: 19px;&quot;&gt;&amp;lt;inject bean=&quot;HAPartition&quot; /&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;color: #134f5c; line-height: 19px;&quot;&gt;&amp;lt;/attribute&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;color: #134f5c; line-height: 19px;&quot;&gt;&amp;lt;attribute name=&quot;ElectionPolicy&quot;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;color: #134f5c; line-height: 19px;&quot;&gt;&amp;lt;inject bean=&quot;myexample:service=SingletonServiceControllerA,type=ElectionPolicy&quot; /&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;color: #134f5c; line-height: 19px;&quot;&gt;&amp;lt;/attribute&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;color: #134f5c; line-height: 19px;&quot;&gt;&amp;lt;attribute name=&quot;Target&quot;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;color: #134f5c; line-height: 19px;&quot;&gt;&amp;lt;inject bean=&quot;myexample:service=TestHASvcA&quot; /&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;color: #134f5c; line-height: 19px;&quot;&gt;&amp;lt;/attribute&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;color: #134f5c; line-height: 19px;&quot;&gt;&amp;lt;attribute name=&quot;TargetStartMethod&quot;&amp;gt;startHAService&amp;lt;/attribute&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;color: #134f5c; line-height: 19px;&quot;&gt;&amp;lt;attribute name=&quot;TargetStopMethod&quot;&amp;gt;stopHAService&amp;lt;/attribute&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;color: #134f5c; line-height: 19px;&quot;&gt;&amp;lt;/mbean&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #134f5c;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;color: #134f5c; line-height: 19px;&quot;&gt;&amp;lt;mbean code=&quot;test.ha.TestHASvcB&quot; name=&quot;myexample:service=TestHASvcB&quot;/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;color: #134f5c; line-height: 19px;&quot;&gt;&amp;lt;mbean code=&quot;test.ha.TestP&quot; name=&quot;myexample:service=SingletonServiceControllerB,type=ElectionPolicy&quot;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;color: #134f5c; line-height: 19px;&quot;&gt;&amp;lt;attribute name=&quot;Id&quot;&amp;gt;SS_B&amp;lt;/attribute&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;color: #134f5c; line-height: 19px;&quot;&gt;&amp;lt;/mbean&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;color: #134f5c; line-height: 19px;&quot;&gt;&amp;lt;mbean code=&quot;org.jboss.ha.singleton.HASingletonController&quot; name=&quot;myexample:service=SingletonServiceControllerB&quot;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;color: #134f5c; line-height: 19px;&quot;&gt;&amp;lt;attribute name=&quot;HAPartition&quot;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;color: #134f5c; line-height: 19px;&quot;&gt;&amp;lt;inject bean=&quot;HAPartition&quot; /&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;color: #134f5c; line-height: 19px;&quot;&gt;&amp;lt;/attribute&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;color: #134f5c; line-height: 19px;&quot;&gt;&amp;lt;attribute name=&quot;ElectionPolicy&quot;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;color: #134f5c; line-height: 19px;&quot;&gt;&amp;lt;inject bean=&quot;myexample:service=SingletonServiceControllerB,type=ElectionPolicy&quot; /&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;color: #134f5c; line-height: 19px;&quot;&gt;&amp;lt;/attribute&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;color: #134f5c; line-height: 19px;&quot;&gt;&amp;lt;attribute name=&quot;Target&quot;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;color: #134f5c; line-height: 19px;&quot;&gt;&amp;lt;inject bean=&quot;myexample:service=TestHASvcB&quot; /&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;color: #134f5c; line-height: 19px;&quot;&gt;&amp;lt;/attribute&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;color: #134f5c; line-height: 19px;&quot;&gt;&amp;lt;attribute name=&quot;TargetStartMethod&quot;&amp;gt;startHAService&amp;lt;/attribute&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;color: #134f5c; line-height: 19px;&quot;&gt;&amp;lt;attribute name=&quot;TargetStopMethod&quot;&amp;gt;stopHAService&amp;lt;/attribute&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;color: #134f5c; line-height: 19px;&quot;&gt;&amp;lt;/mbean&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #134f5c;&quot;&gt;&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 19px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 19px;&quot;&gt;&amp;lt;mbean code=&quot;test.ha.TestHASvcC&quot; name=&quot;myexample:service=TestHASvcC&quot;/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;color: #134f5c; line-height: 19px;&quot;&gt;&amp;lt;mbean code=&quot;test.ha.TestP&quot; name=&quot;myexample:service=SingletonServiceControllerC,type=ElectionPolicy&quot;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;color: #134f5c; line-height: 19px;&quot;&gt;&amp;lt;attribute name=&quot;Id&quot;&amp;gt;SS_C&amp;lt;/attribute&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;color: #134f5c; line-height: 19px;&quot;&gt;&amp;lt;/mbean&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;color: #134f5c; line-height: 19px;&quot;&gt;&amp;lt;mbean code=&quot;org.jboss.ha.singleton.HASingletonController&quot; name=&quot;myexample:service=SingletonServiceControllerC&quot;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;color: #134f5c; line-height: 19px;&quot;&gt;&amp;lt;attribute name=&quot;HAPartition&quot;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;color: #134f5c; line-height: 19px;&quot;&gt;&amp;lt;inject bean=&quot;HAPartition&quot; /&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;color: #134f5c; line-height: 19px;&quot;&gt;&amp;lt;/attribute&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;color: #134f5c; line-height: 19px;&quot;&gt;&amp;lt;attribute name=&quot;ElectionPolicy&quot;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;color: #134f5c; line-height: 19px;&quot;&gt;&amp;lt;inject bean=&quot;myexample:service=SingletonServiceControllerC,type=ElectionPolicy&quot; /&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;color: #134f5c; line-height: 19px;&quot;&gt;&amp;lt;/attribute&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;color: #134f5c; line-height: 19px;&quot;&gt;&amp;lt;attribute name=&quot;Target&quot;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;color: #134f5c; line-height: 19px;&quot;&gt;&amp;lt;inject bean=&quot;myexample:service=TestHASvcC&quot; /&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;color: #134f5c; line-height: 19px;&quot;&gt;&amp;lt;/attribute&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;color: #134f5c; line-height: 19px;&quot;&gt;&amp;lt;attribute name=&quot;TargetStartMethod&quot;&amp;gt;startHAService&amp;lt;/attribute&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;color: #134f5c; line-height: 19px;&quot;&gt;&amp;lt;attribute name=&quot;TargetStopMethod&quot;&amp;gt;stopHAService&amp;lt;/attribute&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;color: #134f5c; line-height: 19px;&quot;&gt;&amp;lt;/mbean&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;color: #134f5c; line-height: 19px;&quot;&gt;&amp;lt;/server&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #666666; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 19px;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
Now the necessay coding is all done, we are ready to deploy &amp;nbsp;and test HA singleton services.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Deployment&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;
&lt;/b&gt; Use you IDE to export &quot;&lt;b&gt;HAServiceDynamicLoadMigration&lt;/b&gt;&quot; project as &quot;HAServiceDynamicLoadMigration.sar&quot; archive to &quot;farm&quot; folder of node1.&lt;br /&gt;
&lt;br /&gt;
Step by step we will now simulate the process of starting all the nodes in cluster, shutting down nodes one by one till only one node is left alive, and then recover the custer by restarting failed server one after another. In the mean time we will keep an eye on the console output of each node to check if the HA singleton services migrations among nodes are done as expected, and as programmed in the customized HA selection policy.&lt;br /&gt;
&lt;h4&gt;
&lt;b&gt;&lt;span style=&quot;color: #e69138;&quot;&gt;Step1. start node1&lt;/span&gt;&lt;/b&gt;&lt;/h4&gt;
Now startup node1 and check the console output of node1, you will see output like following:&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #666666; font-family: inherit;&quot;&gt;12:33:39,351 INFO &amp;nbsp;[GroupMember] I am (127.0.0.1:32902)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666; font-family: inherit;&quot;&gt;12:33:39,352 INFO &amp;nbsp;[GroupMember] New Members : 1 ([127.0.0.1:32902])&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666; font-family: inherit;&quot;&gt;12:33:39,353 INFO &amp;nbsp;[GroupMember] All Members : 1 ([127.0.0.1:32902])&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666; font-family: inherit;&quot;&gt;12:33:39,382 INFO &amp;nbsp;[STDOUT]&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;span style=&quot;color: #666666; font-family: inherit;&quot;&gt;....&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #666666; font-family: inherit;&quot;&gt;12:33:56,251 INFO &amp;nbsp;[STDOUT] # &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Starting HA service class test.ha.TestHASvcA&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #666666; font-family: inherit;&quot;&gt;12:33:56,309 INFO &amp;nbsp;[STDOUT] # &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Starting HA service class test.ha.TestHASvcB&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #666666; font-family: inherit;&quot;&gt;12:33:56,337 INFO &amp;nbsp;[STDOUT] # &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Starting HA service class test.ha.TestHASvcC&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
----&lt;/div&gt;
&lt;div&gt;
The above info shows:&lt;/div&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;JBoss is started in clustered mode, but currently with only one node&lt;/li&gt;
&lt;li&gt;As expected, all 3 HA services are started on node1&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;h4&gt;
&lt;b&gt;&lt;span style=&quot;color: #e69138;&quot;&gt;Step2. start node2&lt;/span&gt;&lt;/b&gt;&lt;/h4&gt;
Now start node2 and check the console output of node1 and node2.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;node1 console&lt;/b&gt;:&lt;br /&gt;
---&lt;br /&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;12:43:12,454 INFO &amp;nbsp;[GroupMember] org.jboss.messaging.core.impl.postoffice.GroupMember$ControlMembershipListener@1a701a8 got new view [127.0.0.1:50418|1] [127.0.0.1:50418, 127.0.0.1:53538], old view is [127.0.0.1:50418|0] [127.0.0.1:50418] &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;12:43:12,470 INFO &amp;nbsp;[GroupMember] I am (127.0.0.1:50418) &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;12:43:12,471 INFO &amp;nbsp;[GroupMember] New Members : 1 ([127.0.0.1:53538]) &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;12:43:12,471 INFO &amp;nbsp;[GroupMember] All Members : 2 ([127.0.0.1:50418, 127.0.0.1:53538]) &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;...&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;12:43:32,899 INFO &amp;nbsp;[STDOUT] &amp;nbsp;### list all nodes before doing selection ploicy name:&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;12:43:32,977 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## node name: 127.0.0.1:1199&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;12:43:32,977 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## node name: 127.0.0.1:1299&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;12:43:32,977 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## getNodeSeq , &amp;nbsp;policy name SS_A&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;12:43:32,977 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## selected node, policy name: 127.0.0.1:1199&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;12:43:32,978 INFO &amp;nbsp;[STDOUT] &amp;nbsp;### list all nodes before doing selection ploicy name:&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;12:43:32,978 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## node name: 127.0.0.1:1199&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;12:43:32,978 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## node name: 127.0.0.1:1299&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;12:43:32,978 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## getNodeSeq , &amp;nbsp;policy name SS_B&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;12:43:32,986 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## selected node, policy name: 127.0.0.1:1199&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;12:43:33,020 INFO &amp;nbsp;[STDOUT] &amp;nbsp;### list all nodes before doing selection ploicy name:&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;12:43:33,021 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## node name: 127.0.0.1:1199&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;12:43:33,021 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## node name: 127.0.0.1:1299&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;12:43:33,021 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## getNodeSeq , &amp;nbsp;policy name SS_C&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;12:43:33,021 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## selected node, policy name: 127.0.0.1:1299&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;12:43:33,022 INFO &amp;nbsp;[STDOUT] # &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt; Stopping HA service class test.ha.TestHASvcC&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
---&lt;br /&gt;
Node1 now has detected, that there is a new member joined the cluater. It updated the sorted list for current alive nodes:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; node1 --&amp;gt;[0]&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; node2 --&amp;gt;[1]&lt;br /&gt;
&lt;br /&gt;
While the cluster structure has changed, JBoss HA Controller will try to update the HA Singleton status with help of the configured HA selection policy.&lt;br /&gt;
&quot;TestHASvcA&quot; is configured to use HA selection policy &quot;SS-A&quot;, and will activate the &amp;nbsp;&quot;TestHASvcA&quot; on the 0th node, i.e. the node1. Since &quot;TestHASvcA&quot; is already active on node1, so no further action will be done.&lt;br /&gt;
&lt;br /&gt;
&quot;TestHASvcB&quot; is configured to use HA selection policy &quot;SS-B&quot;, and will activate the &amp;nbsp;&quot;TestHASvcB&quot; on the 0th node, i.e. the node1. Since &quot;TestHASvcB&quot; is already active on node1, so no further action will be done.&lt;br /&gt;
&lt;br /&gt;
&quot;TestHASvcC&quot; configured to use HA selection policy &quot;SS-C&quot;, and will activate the &amp;nbsp;&quot;TestHASvcC&quot; on the 1st node, i.e. the node2. So here the &quot;TestHASvcC&quot; is stopped.&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;node2 console&lt;/b&gt;:&lt;/div&gt;
&lt;div&gt;
---&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;12:43:12,481 INFO &amp;nbsp;[GroupMember] I am (127.0.0.1:53538)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;12:43:12,482 INFO &amp;nbsp;[GroupMember] New Members : 2 ([127.0.0.1:50418, 127.0.0.1:53538])&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;12:43:12,482 INFO &amp;nbsp;[GroupMember] All Members : 2 ([127.0.0.1:50418, 127.0.0.1:53538])&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;12:43:12,642 INFO &amp;nbsp;[STDOUT]&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;...&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;12:43:32,901 INFO &amp;nbsp;[STDOUT] &amp;nbsp;### list all nodes before doing selection ploicy name:&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;12:43:32,902 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## node name: 127.0.0.1:1199&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;12:43:32,903 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## node name: 127.0.0.1:1299&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;12:43:32,904 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## getNodeSeq , &amp;nbsp;policy name SS_A&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;12:43:32,905 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## selected node, policy name: 127.0.0.1:1199&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;12:43:32,967 INFO &amp;nbsp;[STDOUT] &amp;nbsp;### list all nodes before doing selection ploicy name:&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;12:43:32,968 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## node name: 127.0.0.1:1199&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;12:43:32,969 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## node name: 127.0.0.1:1299&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;12:43:32,969 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## getNodeSeq , &amp;nbsp;policy name SS_B&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;12:43:32,970 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## selected node, policy name: 127.0.0.1:1199&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;12:43:33,023 INFO &amp;nbsp;[STDOUT] &amp;nbsp;### list all nodes before doing selection ploicy name:&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;12:43:33,023 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## node name: 127.0.0.1:1199&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;12:43:33,023 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## node name: 127.0.0.1:1299&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;12:43:33,023 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## getNodeSeq , &amp;nbsp;policy name SS_C&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;12:43:33,023 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## selected node, policy name: 127.0.0.1:1299&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;12:43:33,027 INFO &amp;nbsp;[STDOUT] # &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt; Starting HA service class test.ha.TestHASvcC&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Node2 joins cluster and detected, there is a already a member in the cluster. It updated the sorted list for current alive nodes:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; node1 --&amp;gt;[0]&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; node2 --&amp;gt;[1]&lt;br /&gt;
Since cluster structure has been changed, JBoss HA Controller will try to update the HA Singleton status.&lt;br /&gt;
According to the configured selection policy, &quot;TestHASvcA&quot; and&amp;nbsp;&amp;nbsp;&quot;TestHASvcB&quot; should stay on 0th node, i.e. node1, so nothing will be done for these services on node2.&lt;br /&gt;
&quot;TestHASvcC&quot; is configured to start on 1st node, i.e. node2, so node2 will started &quot;TestHASvcC&quot;&lt;/div&gt;
&lt;div&gt;
---&lt;/div&gt;
&lt;h4&gt;
&lt;b&gt;&lt;span style=&quot;color: #e69138;&quot;&gt;Step3. start node3&lt;/span&gt;&lt;/b&gt;&lt;/h4&gt;
Now start node3 and check the console output of node1, node2 and node3.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;node1 console:&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;---&lt;/b&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;14:52:24,349 INFO &amp;nbsp;[GroupMember] I am (127.0.0.1:36472)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;14:52:24,349 INFO &amp;nbsp;[GroupMember] New Members : 1 ([127.0.0.1:42881])&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;14:52:24,350 INFO &amp;nbsp;[GroupMember] All Members : 3 ([127.0.0.1:36472, 127.0.0.1:44741, 127.0.0.1:42881])&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;...&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;14:52:43,676 INFO &amp;nbsp;[STDOUT] &amp;nbsp;### list all nodes before doing selection ploicy name:&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;14:52:43,705 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## node name: 127.0.0.1:1199&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;14:52:43,706 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## node name: 127.0.0.1:1299&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;14:52:43,706 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## node name: 127.0.0.1:1399&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;14:52:43,706 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## getNodeSeq , &amp;nbsp;policy name SS_A&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;14:52:43,706 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## selected node, policy name: 127.0.0.1:1199&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;14:52:43,752 INFO &amp;nbsp;[STDOUT] &amp;nbsp;### list all nodes before doing selection ploicy name:&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;14:52:43,752 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## node name: 127.0.0.1:1199&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;14:52:43,752 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## node name: 127.0.0.1:1299&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;14:52:43,753 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## node name: 127.0.0.1:1399&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;14:52:43,753 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## getNodeSeq , &amp;nbsp;policy name SS_B&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;14:52:43,753 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## selected node, policy name: 127.0.0.1:1299&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;14:52:43,757 INFO &amp;nbsp;[STDOUT] # &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;Stopping HA service class test.ha.TestHASvcB&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;14:52:43,823 INFO &amp;nbsp;[STDOUT] &amp;nbsp;### list all nodes before doing selection ploicy name:&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;14:52:43,825 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## node name: 127.0.0.1:1199&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;14:52:43,825 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## node name: 127.0.0.1:1299&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;14:52:43,826 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## node name: 127.0.0.1:1399&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;14:52:43,826 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## getNodeSeq , &amp;nbsp;policy name SS_C&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;14:52:43,827 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## selected node, policy name: 127.0.0.1:1399&lt;/span&gt;&lt;br /&gt;
---&lt;br /&gt;
&lt;br /&gt;
Node3 joins cluster. Node1 updates the sorted list for current alive nodes:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; node1 --&amp;gt;[0]&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; node2 --&amp;gt;[1]&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; node3--&amp;gt; [2]&lt;br /&gt;
Since cluster structure has changed, JBoss HA Controller will try to update the HA Singleton status.&lt;br /&gt;
According to the configured selection policy, &quot;TestHASvcA&quot; should stay on 0th node, i.e. node1. &quot;TestHASvcB&quot; should be migrated to 1st node, i.e. node2, so this service will be stopped on node1.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;node2 console:&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;---&lt;/b&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;[127.0.0.1:36472|1] [127.0.0.1:36472, 127.0.0.1:44741]&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;14:52:24,298 INFO &amp;nbsp;[GroupMember] I am (127.0.0.1:44741)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;14:52:24,298 INFO &amp;nbsp;[GroupMember] New Members : 1 ([127.0.0.1:42881])&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;14:52:24,298 INFO &amp;nbsp;[GroupMember] All Members : 3 ([127.0.0.1:36472, 127.0.0.1:44741, 127.0.0.1:42881])&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;14:52:43,675 INFO &amp;nbsp;[STDOUT] &amp;nbsp;### list all nodes before doing selection ploicy name:&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;14:52:43,676 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## node name: 127.0.0.1:1199&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;14:52:43,676 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## node name: 127.0.0.1:1299&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;14:52:43,676 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## node name: 127.0.0.1:1399&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;14:52:43,676 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## getNodeSeq , &amp;nbsp;policy name SS_A&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;14:52:43,676 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## selected node, policy name: 127.0.0.1:1199&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;14:52:43,748 INFO &amp;nbsp;[STDOUT] &amp;nbsp;### list all nodes before doing selection ploicy name:&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;14:52:43,749 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## node name: 127.0.0.1:1199&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;14:52:43,749 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## node name: 127.0.0.1:1299&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;14:52:43,749 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## node name: 127.0.0.1:1399&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;14:52:43,749 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## getNodeSeq , &amp;nbsp;policy name SS_B&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;14:52:43,749 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## selected node, policy name: 127.0.0.1:1299&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;14:52:43,751 INFO &amp;nbsp;[STDOUT] # &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;Starting HA service class test.ha.TestHASvcB&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;14:52:43,822 INFO &amp;nbsp;[STDOUT] &amp;nbsp;### list all nodes before doing selection ploicy name:&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;14:52:43,822 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## node name: 127.0.0.1:1199&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;14:52:43,823 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## node name: 127.0.0.1:1299&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;14:52:43,823 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## node name: 127.0.0.1:1399&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;14:52:43,823 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## getNodeSeq , &amp;nbsp;policy name SS_C&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;14:52:43,823 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## selected node, policy name: 127.0.0.1:1399&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;14:52:43,824 INFO &amp;nbsp;[STDOUT] # &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;Stopping HA service class test.ha.TestHASvcC&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;font-weight: bold;&quot;&gt;
---&lt;/div&gt;
Node2 updates the sorted list for current alive nodes too:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; node1 --&amp;gt;[0]&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; node2 --&amp;gt;[1]&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; node3--&amp;gt; [2]&lt;br /&gt;
According to the configured selection policy, &quot;TestHASvcB&quot; should be migrated to 1st node, i.e. node2, so this service was stopped on node1 as shown in the console of node1, and is started on node2.&lt;br /&gt;
&quot;TestHASvcB&quot; does not belong to node2 any more and will be stopped on node2, and will be started on node3.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;node3 console:&lt;/b&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;&lt;/span&gt;---&lt;br /&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;14:52:24,367 INFO &amp;nbsp;[GroupMember] I am (127.0.0.1:42881)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;14:52:24,368 INFO &amp;nbsp;[GroupMember] New Members : 3 ([127.0.0.1:36472, 127.0.0.1:44741, 127.0.0.1:42881])&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;14:52:24,369 INFO &amp;nbsp;[GroupMember] All Members : 3 ([127.0.0.1:36472, 127.0.0.1:44741, 127.0.0.1:42881])&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;14:52:24,875 INFO &amp;nbsp;[STDOUT]&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;....&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;14:52:43,679 INFO &amp;nbsp;[STDOUT] &amp;nbsp;### list all nodes before doing selection ploicy name:&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;14:52:43,680 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## node name: 127.0.0.1:1199&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;14:52:43,681 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## node name: 127.0.0.1:1299&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;14:52:43,681 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## node name: 127.0.0.1:1399&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;14:52:43,682 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## getNodeSeq , &amp;nbsp;policy name SS_A&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;14:52:43,682 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## selected node, policy name: 127.0.0.1:1199&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;14:52:43,755 INFO &amp;nbsp;[STDOUT] &amp;nbsp;### list all nodes before doing selection ploicy name:&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;14:52:43,756 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## node name: 127.0.0.1:1199&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;14:52:43,756 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## node name: 127.0.0.1:1299&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;14:52:43,756 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## node name: 127.0.0.1:1399&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;14:52:43,756 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## getNodeSeq , &amp;nbsp;policy name SS_B&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;14:52:43,757 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## selected node, policy name: 127.0.0.1:1299&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;14:52:43,826 INFO &amp;nbsp;[STDOUT] &amp;nbsp;### list all nodes before doing selection ploicy name:&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;14:52:43,827 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## node name: 127.0.0.1:1199&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;14:52:43,827 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## node name: 127.0.0.1:1299&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;14:52:43,827 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## node name: 127.0.0.1:1399&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;14:52:43,827 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## getNodeSeq , &amp;nbsp;policy name SS_C&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;14:52:43,827 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## selected node, policy name: 127.0.0.1:1399&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;14:52:43,831 INFO &amp;nbsp;[STDOUT] # &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;Starting HA service class test.ha.TestHASvcC&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;---&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
Node3 joins cluster and detected, there is a already 2 members in the cluster. &amp;nbsp;It created a sorted list for current alive nodes:&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; node1 --&amp;gt;[0]&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; node2 --&amp;gt;[1]&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; node3 --&amp;gt;[2]&lt;/div&gt;
&lt;div&gt;
Since cluster structure has changed, JBoss HA Controller will try to update the HA Singleton status.&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
According to the configured selection policy, &quot;TestHASvcC&quot; will be taken over to node3 from node2.&lt;/div&gt;
&lt;div&gt;
&lt;h4&gt;
&lt;b&gt;&lt;span style=&quot;color: #e69138;&quot;&gt;Step4. node1 fails&lt;/span&gt;&lt;/b&gt;&lt;/h4&gt;
&lt;/div&gt;
&lt;div&gt;
Shutdown node1, and check console output of node2 and node3.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
&lt;b&gt;console node2:&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;---&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
&amp;nbsp;14:55:37,727 INFO &amp;nbsp;[STDOUT] &amp;nbsp;### list all nodes before doing selection ploicy name:&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
14:55:37,810 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## node name: 127.0.0.1:1299 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
14:55:37,810 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## node name: 127.0.0.1:1399 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
14:55:37,810 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## getNodeSeq , &amp;nbsp;policy name SS_C &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
14:55:37,810 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## selected node, policy name: 127.0.0.1:1399 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
14:55:38,000 INFO &amp;nbsp;[STDOUT] &amp;nbsp;### list all nodes before doing selection ploicy name: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
14:55:38,000 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## node name: 127.0.0.1:1299&lt;/div&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
14:55:38,000 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## node name: 127.0.0.1:1399&lt;/div&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
14:55:38,000 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## getNodeSeq , &amp;nbsp;policy name SS_B&lt;/div&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
14:55:38,001 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## selected node, policy name: 127.0.0.1:1299&lt;/div&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
14:55:38,031 INFO &amp;nbsp;[STDOUT] &amp;nbsp;### list all nodes before doing selection ploicy name:&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
14:55:38,039 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## node name: 127.0.0.1:1299&lt;/div&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
14:55:38,039 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## node name: 127.0.0.1:1399&lt;/div&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
14:55:38,039 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## getNodeSeq , &amp;nbsp;policy name SS_A&lt;/div&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
14:55:38,040 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## selected node, policy name: 127.0.0.1:1299&lt;/div&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;14:55:38,043 INFO &amp;nbsp;[STDOUT] # &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #6aa84f;&quot;&gt;&lt;b&gt;Starting HA service class test.ha.TestHASvcA&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
...&lt;/div&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
14:55:46,615 INFO &amp;nbsp;[DefaultPartition] I am (127.0.0.1:1299) received membershipChanged event:&lt;/div&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
14:55:46,615 INFO &amp;nbsp;[DefaultPartition] Dead members: 1 ([127.0.0.1:1199])&lt;/div&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
14:55:46,616 INFO &amp;nbsp;[DefaultPartition] New Members : 0 ([])&lt;/div&gt;
&lt;div&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
14:55:46,616 INFO &amp;nbsp;[DefaultPartition] All Members : 2 ([127.0.0.1:1299, 127.0.0.1:1399])&lt;/div&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
---&lt;/div&gt;
When node1 is shutdown, node2 updates the sorted list for current alive nodes:&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; node2 --&amp;gt;[0]&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; node3 --&amp;gt;[1]&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Since for 2 alive nodes, &quot;TestHASvcA&quot; should run on the 0th node. And now according to the updated alive node list, the 0th node is node2, so node2 will start &quot;TestHASvcA&quot;.&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
&lt;b&gt;console node3:&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;---&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
14:55:37,880 INFO &amp;nbsp;[STDOUT] &amp;nbsp;### list all nodes before doing selection ploicy name:&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
14:55:38,016 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## node name: 127.0.0.1:1299&lt;/div&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
14:55:38,016 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## node name: 127.0.0.1:1399 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
14:55:38,016 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## getNodeSeq , &amp;nbsp;policy name SS_C &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
14:55:38,017 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## selected node, policy name: 127.0.0.1:1399 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
14:55:38,017 INFO &amp;nbsp;[STDOUT] &amp;nbsp;### list all nodes before doing selection ploicy name: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
14:55:38,017 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## node name: 127.0.0.1:1299&lt;/div&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
14:55:38,017 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## node name: 127.0.0.1:1399&lt;/div&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
14:55:38,017 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## getNodeSeq , &amp;nbsp;policy name SS_B&lt;/div&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
14:55:38,017 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## selected node, policy name: 127.0.0.1:1299&lt;/div&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
14:55:38,032 INFO &amp;nbsp;[STDOUT] &amp;nbsp;### list all nodes before doing selection ploicy name:&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
14:55:38,033 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## node name: 127.0.0.1:1299&lt;/div&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
14:55:38,033 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## node name: 127.0.0.1:1399 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
14:55:38,033 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## getNodeSeq , &amp;nbsp;policy name SS_A &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
14:55:38,033 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## selected node, policy name: 127.0.0.1:1299&lt;/div&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
...&lt;/div&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
14:55:46,625 INFO &amp;nbsp;[DefaultPartition] I am (127.0.0.1:1399) received membershipChanged event:&lt;/div&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
14:55:46,625 INFO &amp;nbsp;[DefaultPartition] Dead members: 1 ([127.0.0.1:1199])&lt;/div&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
14:55:46,625 INFO &amp;nbsp;[DefaultPartition] New Members : 0 ([])&lt;/div&gt;
&lt;div&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
14:55:46,625 INFO &amp;nbsp;[DefaultPartition] All Members : 2 ([127.0.0.1:1299, 127.0.0.1:1399])&lt;/div&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
---&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Node3 just updated the alive node list. &quot;TestHASvcC&quot; stays on node3.&lt;/div&gt;
&lt;div&gt;
&lt;h4&gt;
&lt;b&gt;&lt;span style=&quot;color: #e69138;&quot;&gt;Step5. node2 fails&lt;/span&gt;&lt;/b&gt;&lt;/h4&gt;
&lt;/div&gt;
&lt;div&gt;
When node2 fails now, the node3 will be left as the onyl alive node. As shown in node3&#39;s console,&lt;/div&gt;
&lt;div&gt;
The alive node list contains now only one node, i.e. node3. The services running on node2, are now migrated to node3.&lt;/div&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
&lt;b&gt;console node3:&lt;/b&gt;&lt;/div&gt;
---&lt;br /&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;14:58:10,737 INFO &amp;nbsp;[STDOUT] # &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #38761d;&quot;&gt; Starting HA service class test.ha.TestHASvcB&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;14:58:10,800 INFO &amp;nbsp;[STDOUT] # &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;Starting HA service class test.ha.TestHASvcA&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;14:58:12,491 INFO &amp;nbsp;[GroupMember] ....&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;14:58:14,078 INFO &amp;nbsp;[DefaultPartition] I am (127.0.0.1:1399) received membershipChanged event:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;14:58:14,115 INFO &amp;nbsp;[DefaultPartition] Dead members: 1 ([127.0.0.1:1299])&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;14:58:14,115 INFO &amp;nbsp;[DefaultPartition] New Members : 0 ([])&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;14:58:14,115 INFO &amp;nbsp;[DefaultPartition]&lt;/span&gt;&lt;span style=&quot;color: #6aa84f;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;All Members : 1 ([127.0.0.1:1399])&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #38761d;&quot;&gt;---&lt;/span&gt;&lt;br /&gt;
&lt;h4&gt;
&lt;b&gt;&lt;span style=&quot;color: #e69138;&quot;&gt;Step6. node1 revocers&lt;/span&gt;&lt;/b&gt;&lt;/h4&gt;
Start node1 again, check the console output of node1 and node3&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;font-weight: bold;&quot;&gt;
&lt;b style=&quot;color: #666666;&quot;&gt;console node1:&lt;/b&gt;&lt;/div&gt;
---&lt;br /&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
15:01:35,189 INFO &amp;nbsp;[GroupMember] I am (127.0.0.1:45635)&lt;/div&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
15:01:35,190 INFO &amp;nbsp;[GroupMember] New Members : 2 ([127.0.0.1:42881, 127.0.0.1:45635])&lt;/div&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
15:01:35,190 INFO &amp;nbsp;[GroupMember] All Members : 2 ([127.0.0.1:42881, 127.0.0.1:45635])&lt;/div&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
15:01:35,354 INFO &amp;nbsp;[STDOUT]&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
---------------------------------------------------------&lt;/div&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
GMS: address is 127.0.0.1:7900 (cluster=MessagingPostOffice-DATA)&lt;/div&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
---------------------------------------------------------&lt;/div&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
15:01:49,131 INFO &amp;nbsp;[STDOUT] &amp;nbsp;### list all nodes before doing selection ploicy name:&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
15:01:49,132 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## node name: 127.0.0.1:1399&lt;/div&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
15:01:49,132 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## node name: 127.0.0.1:1199&lt;/div&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
15:01:49,132 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## getNodeSeq , &amp;nbsp;policy name SS_A&lt;/div&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
15:01:49,133 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## selected node, policy name: 127.0.0.1:1399&lt;/div&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
15:01:49,207 INFO &amp;nbsp;[STDOUT] &amp;nbsp;### list all nodes before doing selection ploicy name:&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
15:01:49,207 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## node name: 127.0.0.1:1399&lt;/div&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
15:01:49,207 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## node name: 127.0.0.1:1199&lt;/div&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
15:01:49,208 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## getNodeSeq , &amp;nbsp;policy name SS_B&lt;/div&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
15:01:49,208 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## selected node, policy name: 127.0.0.1:1399&lt;/div&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
15:01:49,265 INFO &amp;nbsp;[STDOUT] &amp;nbsp;### list all nodes before doing selection ploicy name:&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
15:01:49,266 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## node name: 127.0.0.1:1399&lt;/div&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
15:01:49,266 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## node name: 127.0.0.1:1199&lt;/div&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
15:01:49,266 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## getNodeSeq , &amp;nbsp;policy name SS_C&lt;/div&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
15:01:49,266 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## selected node, policy name: 127.0.0.1:1199&lt;/div&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;15:01:49,272 INFO &amp;nbsp;[STDOUT] # &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;Starting HA service class test.ha.TestHASvcC&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
15:01:49,366 INFO &amp;nbsp;[Http11Protocol] Starting Coyote HTTP/1.1 on http-127.0.0.1-8180&lt;/div&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
15:01:49,526 INFO &amp;nbsp;[AjpProtocol] Starting Coyote AJP/1.3 on ajp-127.0.0.1-8109&lt;/div&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
15:01:49,576 INFO &amp;nbsp;[ServerImpl] JBoss (Microcontainer) [5.1.0.GA (build: SVNTag=JBoss_5_1_0_GA date=200905221634)] Started in 1m:51s:721ms&lt;/div&gt;
&lt;div style=&quot;color: #666666; font-weight: bold;&quot;&gt;
---&lt;/div&gt;
&lt;div&gt;
When node1 recovers, the alive node list becomes:&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;node3 --&amp;gt;[0]&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; node1 --&amp;gt;[1]&lt;br /&gt;
With alive node count equals 2, &quot;TestHASvcA&quot; and &quot;TestHASvcB&quot; should run on the 0th node, so they stay on node3. &amp;nbsp;&quot;TestHASvcC&quot; will be migrated to 1st node, i.e. node1. So we see on the console of nod1, &quot;TestHASvcC&quot; is started.&lt;br /&gt;
&lt;br /&gt;
&lt;b style=&quot;color: #666666;&quot;&gt;console node3:&lt;/b&gt;&lt;br /&gt;
---&lt;br /&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
15:01:18,345 INFO &amp;nbsp;[DefaultPartition] I am (127.0.0.1:1399) received membershipChanged event:&lt;/div&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
15:01:18,345 INFO &amp;nbsp;[DefaultPartition] Dead members: 0 ([])&lt;/div&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
15:01:18,345 INFO &amp;nbsp;[DefaultPartition] New Members : 1 ([127.0.0.1:1199])&lt;/div&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
15:01:18,345 INFO &amp;nbsp;[DefaultPartition] All Members : 2 ([127.0.0.1:1399, 127.0.0.1:1199])&lt;/div&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
...&lt;/div&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
15:01:49,126 INFO &amp;nbsp;[STDOUT] &amp;nbsp;### list all nodes before doing selection ploicy name:&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
15:01:49,127 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## node name: 127.0.0.1:1399&lt;/div&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
15:01:49,127 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## node name: 127.0.0.1:1199&lt;/div&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
15:01:49,127 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## getNodeSeq , &amp;nbsp;policy name SS_A&lt;/div&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
15:01:49,127 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## selected node, policy name: 127.0.0.1:1399&lt;/div&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
15:01:49,206 INFO &amp;nbsp;[STDOUT] &amp;nbsp;### list all nodes before doing selection ploicy name:&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
15:01:49,206 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## node name: 127.0.0.1:1399&lt;/div&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
15:01:49,206 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## node name: 127.0.0.1:1199&lt;/div&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
15:01:49,206 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## getNodeSeq , &amp;nbsp;policy name SS_B&lt;/div&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
15:01:49,207 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## selected node, policy name: 127.0.0.1:1399&lt;/div&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
15:01:49,263 INFO &amp;nbsp;[STDOUT] &amp;nbsp;### list all nodes before doing selection ploicy name:&amp;nbsp;&lt;/div&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;15:01:49,270 INFO &amp;nbsp;[STDOUT] # &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;Stopping HA service class test.ha.TestHASvcC&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
15:01:49,280 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## node name: 127.0.0.1:1399&lt;/div&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
15:01:49,281 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## node name: 127.0.0.1:1199&lt;/div&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
15:01:49,281 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## getNodeSeq , &amp;nbsp;policy name SS_C&lt;/div&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
15:01:49,281 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## selected node, policy name: 127.0.0.1:1199&lt;/div&gt;
---&lt;br /&gt;
&lt;br /&gt;
Now node3 is still the 0th node in the cluster, but &quot;TestHASvcC&quot; is expected to &amp;nbsp;run on the 1st node, so this service does not belong to node3 any more, and will be shutdown on node3.&lt;br /&gt;
&lt;h4&gt;
&lt;b&gt;&lt;span style=&quot;color: #e69138;&quot;&gt;Step6. node2 revocers&lt;/span&gt;&lt;/b&gt;&lt;/h4&gt;
&lt;/div&gt;
Start node2 again.&lt;br /&gt;
&lt;br /&gt;
&lt;b style=&quot;color: #666666;&quot;&gt;console node1:&lt;/b&gt;&lt;br /&gt;
---&lt;br /&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
15:04:44,024 INFO &amp;nbsp;[GroupMember] I am (127.0.0.1:45635)&lt;/div&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
15:04:44,024 INFO &amp;nbsp;[GroupMember] New Members : 1 ([127.0.0.1:39250])&lt;/div&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
15:04:44,025 INFO &amp;nbsp;[GroupMember] All Members : 3 ([127.0.0.1:42881, 127.0.0.1:45635, 127.0.0.1:39250])&lt;/div&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
...&lt;/div&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
15:05:00,621 INFO &amp;nbsp;[STDOUT] &amp;nbsp;### list all nodes before doing selection ploicy name:&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
15:05:00,687 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## node name: 127.0.0.1:1399&lt;/div&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
15:05:00,688 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## node name: 127.0.0.1:1199&lt;/div&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
15:05:00,688 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## node name: 127.0.0.1:1299&lt;/div&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
15:05:00,688 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## getNodeSeq , &amp;nbsp;policy name SS_A&lt;/div&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
15:05:00,688 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## selected node, policy name: 127.0.0.1:1399&lt;/div&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
15:05:00,688 INFO &amp;nbsp;[STDOUT] &amp;nbsp;### list all nodes before doing selection ploicy name:&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
15:05:00,688 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## node name: 127.0.0.1:1399&lt;/div&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
15:05:00,688 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## node name: 127.0.0.1:1199&lt;/div&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
15:05:00,701 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## node name: 127.0.0.1:1299&lt;/div&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
15:05:00,701 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## getNodeSeq , &amp;nbsp;policy name SS_B&lt;/div&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
15:05:00,701 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## selected node, policy name: 127.0.0.1:1199&lt;/div&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;15:05:00,860 INFO &amp;nbsp;[STDOUT] # &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #38761d;&quot;&gt; Starting HA service class test.ha.TestHASvcB&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
15:05:00,860 INFO &amp;nbsp;[STDOUT] &amp;nbsp;### list all nodes before doing selection ploicy name:&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
15:05:00,861 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## node name: 127.0.0.1:1399&lt;/div&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
15:05:00,861 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## node name: 127.0.0.1:1199&lt;/div&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
15:05:00,861 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## node name: 127.0.0.1:1299&lt;/div&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
15:05:00,861 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## getNodeSeq , &amp;nbsp;policy name SS_C&lt;/div&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
15:05:00,861 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## selected node, policy name: 127.0.0.1:1299&lt;/div&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;15:05:00,864 INFO &amp;nbsp;[STDOUT] # &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt; Stopping HA service class test.ha.TestHASvcC&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;color: #666666; font-weight: bold;&quot;&gt;
---&lt;/div&gt;
When node2 joins cluster , there will be 3 nodes in the cluster again, but the alive node list is different than that before nodes failures. The list is now sorted differently:&lt;br /&gt;
&lt;div style=&quot;color: #666666; font-weight: bold;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;color: #666666; font-weight: bold;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;color: black; font-weight: normal;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;node3 --&amp;gt;[0]&lt;/div&gt;
&lt;div style=&quot;color: black; font-weight: normal;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; node1 --&amp;gt;[1]&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;node2 --&amp;gt;[2]&lt;br /&gt;
Before node2 joins cluster, &quot;TestHASvcC&quot; was running on node1. Now with alive count bekoming 3, the node1 as 1st node, will only have &quot;TestHASvcB&quot; runs on it. Therefore &quot;TestHASvcC&quot; will be stopped, and &quot;TestHASvcB&quot; will be started on node1.&lt;/div&gt;
&lt;br /&gt;
&lt;b style=&quot;color: #666666;&quot;&gt;console node2:&lt;/b&gt;&lt;br /&gt;
&lt;b style=&quot;color: #666666;&quot;&gt;---&lt;/b&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;15:04:44,038 INFO &amp;nbsp;[GroupMember] I am (127.0.0.1:39250)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;15:04:44,038 INFO &amp;nbsp;[GroupMember] New Members : 3 ([127.0.0.1:42881, 127.0.0.1:45635, 127.0.0.1:39250])&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;15:04:44,039 INFO &amp;nbsp;[GroupMember] All Members : 3 ([127.0.0.1:42881, 127.0.0.1:45635,&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;...&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;15:05:00,624 INFO &amp;nbsp;[STDOUT] &amp;nbsp;### list all nodes before doing selection ploicy name:&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;15:05:00,625 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## node name: 127.0.0.1:1399&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;15:05:00,625 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## node name: 127.0.0.1:1199&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;15:05:00,625 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## node name: 127.0.0.1:1299&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;15:05:00,625 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## getNodeSeq , &amp;nbsp;policy name SS_A&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;15:05:00,625 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## selected node, policy name: 127.0.0.1:1399&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;15:05:00,732 INFO &amp;nbsp;[STDOUT] &amp;nbsp;### list all nodes before doing selection ploicy name:&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;15:05:00,733 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## node name: 127.0.0.1:1399&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;15:05:00,733 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## node name: 127.0.0.1:1199&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;15:05:00,733 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## node name: 127.0.0.1:1299&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;15:05:00,733 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## getNodeSeq , &amp;nbsp;policy name SS_B&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;15:05:00,733 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## selected node, policy name: 127.0.0.1:1199&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;15:05:00,863 INFO &amp;nbsp;[STDOUT] &amp;nbsp;### list all nodes before doing selection ploicy name:&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;15:05:00,863 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## node name: 127.0.0.1:1399&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;15:05:00,863 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## node name: 127.0.0.1:1199&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;15:05:00,863 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## node name: 127.0.0.1:1299&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;15:05:00,863 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## getNodeSeq , &amp;nbsp;policy name SS_C&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;15:05:00,863 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## selected node, policy name: 127.0.0.1:1299&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;15:05:00,868 INFO &amp;nbsp;[STDOUT] # &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #38761d;&quot;&gt; Starting HA service class test.ha.TestHASvcC&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;color: #666666; font-weight: bold;&quot;&gt;
---&lt;/div&gt;
Node2 joins the cluster as the 2nd node, element [2] of the alive node list, will only have &quot;TestHASvcC&quot; &amp;nbsp;started on it.&lt;br /&gt;
&lt;br /&gt;
&lt;b style=&quot;color: #666666;&quot;&gt;console node3:&lt;/b&gt;&lt;br /&gt;
---&lt;br /&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
[127.0.0.1:42881, 127.0.0.1:45635]&lt;/div&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
15:04:44,019 INFO &amp;nbsp;[GroupMember] I am (127.0.0.1:42881)&lt;/div&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
15:04:44,019 INFO &amp;nbsp;[GroupMember] New Members : 1 ([127.0.0.1:39250])&lt;/div&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
15:04:44,019 INFO &amp;nbsp;[GroupMember] All Members : 3 ([127.0.0.1:42881, 127.0.0.1:45635, 127.0.0.1:39250])&lt;/div&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
...&lt;/div&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
15:05:00,621 INFO &amp;nbsp;[STDOUT] &amp;nbsp;### list all nodes before doing selection ploicy name:&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
15:05:00,689 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## node name: 127.0.0.1:1399&lt;/div&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
15:05:00,689 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## node name: 127.0.0.1:1199&lt;/div&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
15:05:00,689 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## node name: 127.0.0.1:1299&lt;/div&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
15:05:00,689 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## getNodeSeq , &amp;nbsp;policy name SS_A&lt;/div&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
15:05:00,689 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## selected node, policy name: 127.0.0.1:1399&lt;/div&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;15:05:00,704 INFO &amp;nbsp;[STDOUT] # &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;Stopping HA service class test.ha.TestHASvcB&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
15:05:00,731 INFO &amp;nbsp;[STDOUT] &amp;nbsp;### list all nodes before doing selection ploicy name:&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
15:05:00,732 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## node name: 127.0.0.1:1399&lt;/div&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
15:05:00,788 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## node name: 127.0.0.1:1199&lt;/div&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
15:05:00,788 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## node name: 127.0.0.1:1299&lt;/div&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
15:05:00,788 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## getNodeSeq , &amp;nbsp;policy name SS_B&lt;/div&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
15:05:00,789 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## selected node, policy name: 127.0.0.1:1199&lt;/div&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
15:05:00,789 INFO &amp;nbsp;[STDOUT] &amp;nbsp;### list all nodes before doing selection ploicy name:&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
15:05:00,789 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## node name: 127.0.0.1:1399&lt;/div&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
15:05:00,789 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## node name: 127.0.0.1:1199&lt;/div&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
15:05:00,789 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## node name: 127.0.0.1:1299&lt;/div&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
15:05:00,789 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## getNodeSeq , &amp;nbsp;policy name SS_C&lt;/div&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
15:05:00,789 INFO &amp;nbsp;[STDOUT] &amp;nbsp;## selected node, policy name: 127.0.0.1:1299&lt;/div&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
---&lt;/div&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;Before node2 joins cluster, node3 was the 0th node in cluster and had &quot;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;TestHASvcA&quot; and &quot;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;TestHASvcB&quot;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;running on it.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #666666;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
Now the cluster has 3 nodes, node3 will only have &quot;TestHASvcA&quot;, running. &quot;TestHASvcB&quot; will be stopped on it, and taken over by node1 as shown in the console of &amp;nbsp;node1.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;color: #666666;&quot;&gt;CONGRATULATIONS!&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
Now we are done with our expertment. The HA singleton services are again distrubuted on the 3 nodes.&lt;br /&gt;
&lt;br /&gt;
Dynamic HA singeton services distribution and migration is useful, when you have several services which:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&amp;nbsp;each service should run only once in the cluster&amp;nbsp;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;each service should be high available, .i.e. could survive node failures&lt;/li&gt;
&lt;li&gt;all services not running on one node , but distributed among all node for, for example performance reason.&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
You might ask, in case of &quot;client-server&quot; system, what if a client is connected to a node, but the required service just runs on another node? We will come to this topic later...&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #38761d;&quot;&gt;&lt;br /&gt;
&lt;/span&gt; &lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://milestonenext.blogspot.com/feeds/4966774919207711748/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://milestonenext.blogspot.com/2012/10/jboss-dynamic-migration-of-distributed.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7515187228721563448/posts/default/4966774919207711748'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7515187228721563448/posts/default/4966774919207711748'/><link rel='alternate' type='text/html' href='http://milestonenext.blogspot.com/2012/10/jboss-dynamic-migration-of-distributed.html' title='JBoss Dynamic Migration of Distributed HA Singletons among Nodes'/><author><name>Beijing Beijing</name><uri>http://www.blogger.com/profile/12013373726184997758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='28' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTm1nk7ZqbPTfBofk6dIg7Zfx820i-FNuXqGbSlZNbRw5-RPJuqgDFNoW_zdgJCMCYj6R5cTGNgNKmwTzeDsEm2EHkqni9ywIanrN-PIRd4Z4yZXUOHhC12zzDid1A1w/s220/profile.png'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiYahZwXEavcX0eoNQPHQa0zLZ-eJqBV9Ma0mkj2PGbcNu70K7G8iUvRFolyqqPyl_n0h8UDK4U5-xJDhReMbq_ivJnZdyCpXki6CQjNEiWXKqCEV4quc9LW6oe_gAqRSb_8Quwz7Sp9_tD/s72-c/green-arrow_new.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7515187228721563448.post-5647731296141099491</id><published>2012-10-03T12:13:00.000-07:00</published><updated>2013-01-25T23:30:11.235-08:00</updated><title type='text'>HA Singleton with JBoss 7 Cluster</title><content type='html'>&lt;div style=&quot;background-color: white; color: #222222; font-family: Lato, arial, sans-serif; line-height: 24px;&quot;&gt;
&lt;div style=&quot;margin-left: 10px; margin-right: 10px;&quot;&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;Document &amp;nbsp;Version 1.0&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;releaseinfo&quot; style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; margin-left: 10px; margin-right: 10px;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;h3&gt;
&lt;span style=&quot;background-color: white; color: #666666; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: small; font-weight: normal; line-height: 24px;&quot;&gt;&amp;nbsp; &amp;nbsp;Copyright © 2012-2013 beijing.beijing.012@gmail.com&lt;/span&gt;&lt;/h3&gt;
&lt;h3&gt;
&lt;span style=&quot;background-color: white; color: #351c75; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14px; font-weight: normal; line-height: 17px;&quot;&gt;&lt;b&gt;Keywords:&lt;/b&gt;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14px; font-weight: normal; line-height: 17px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #351c75; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14px; font-weight: normal; line-height: 17px;&quot;&gt;JBoss 7 &amp;nbsp;HA &amp;nbsp;Service, HA Singleton, JBoss 7 Cluster, load migration, load distribution, HA Service deployment&lt;/span&gt;&lt;/h3&gt;
&lt;h3&gt;
&lt;span style=&quot;color: #e69138;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;h3&gt;
&lt;span style=&quot;color: #e69138;&quot;&gt;Start 2 standalone JBosss 7 server in clustered mode &amp;nbsp;[Draft]&lt;/span&gt;&lt;/h3&gt;
&lt;div&gt;
&lt;span style=&quot;color: #e69138;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;span style=&quot;color: #cc0000; font-size: large;&quot;&gt;D&lt;/span&gt;&lt;/b&gt;ownload JBoss AS 7.1.1.Final and extract the archive to a tmp location, lets say &quot;&amp;nbsp;JBoss_AS_7_1_1_Final&quot;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Create 2 new folders:&lt;/div&gt;
&lt;div&gt;
jboss7_node1&lt;/div&gt;
&lt;div&gt;
jboss7_node2&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Copy all folders and files under &quot;JBoss_AS_7_1_1_Final&quot; into&amp;nbsp;jboss7_node1.&lt;/div&gt;
&lt;div&gt;
Copy all folders and files under &quot;JBoss_AS_7_1_1_Final&quot; into&amp;nbsp;jboss7_node2.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Now we have 2 JBoss nodes ready to be started.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;span style=&quot;color: #444444;&quot;&gt;Start &quot;&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;jboss7_node1&quot; in clusted mode using command:&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;.&lt;/span&gt;/standalone.sh -Djboss.node.name=node1 --server-config=standalone-ha.xml&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
The node1 is started correctly in clusted mode when following line is shown in console:&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;[org.jboss.modcluster.advertise.impl.AdvertiseListenerImpl] (MSC service thread 1-3) &lt;span style=&quot;color: #e69138;&quot;&gt;Listening to proxy advertisements on 224.0.1.105:23364&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;....&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;div&gt;
When you are familiar with older JBoss (4x, 5x version), you may expect to see log info about cluster information or &amp;nbsp;node information. But JBoss 7 will not show such info yet.&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;b&gt;&lt;span style=&quot;color: #444444;&quot;&gt;Start &quot;&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;jboss7_node2&quot; in clusted mode using command:&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;div&gt;
./standalone.sh -Djboss.node.name=node2 --server-config=standalone-ha.xml -Djboss.socket.binding.port-offset=100&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
The node2 is started correctly in clustered mode when following line is shown in console:&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;[org.jboss.modcluster.advertise.impl.AdvertiseListenerImpl] (MSC service thread 1-3)&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #e69138; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;Listening to proxy advertisements on 224.0.1.105:23364&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;....&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&amp;nbsp;&lt;/span&gt;Here we still can not see any log info to clusters and nodes.&lt;br /&gt;
&lt;br /&gt;
You could just write a samll &quot;Hello World&quot; web applicaiton and try to deploy it in cluster.&lt;br /&gt;
I will just take the &lt;a href=&quot;http://milestonenext.blogspot.de/2012/09/ssl-offloading-with-modjk-part-1.html&quot;&gt;&quot;TestWebSec20&quot;&lt;/a&gt; web application, add &quot;&amp;lt;distributable/&amp;gt;&quot; to the web.xml file and try put the &quot;TestWebSec20.war&quot; into the folder &quot;deployments&quot; of jboss7_node1.&lt;br /&gt;
&lt;br /&gt;
The console of node1 shows:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;21:19:36,185 INFO &amp;nbsp;[org.jboss.as.clustering.impl.CoreGroupCommunicationService.web] (MSC service thread 1-1) JBAS010206: Number of cluster members: 1&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;....&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;21:19:37,378 INFO &amp;nbsp;[org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS018559: Deployed &quot;TestWebSec20.war&quot;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Now cluster info is shown, but where is the node2?&lt;br /&gt;
&lt;br /&gt;
Now try to deploy the &quot;TestWebSec20.wa&quot; in node2, put the war file in the folder &quot;deployments&quot; of jboss7_node2.&lt;br /&gt;
The console of node2 shows:&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;21:26:35,227 INFO &amp;nbsp;[org.jboss.as.clustering.impl.CoreGroupCommunicationService.web] (MSC service thread 1-3) JBAS010206:&lt;/span&gt;&lt;span style=&quot;color: #444444; font-family: inherit;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #cc0000; font-family: inherit;&quot;&gt;Number of cluster members: 2&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: inherit;&quot;&gt;....&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: inherit;&quot;&gt;21:26:37,207 INFO &amp;nbsp;[org.jboss.as.server] (DeploymentScanner-threads - 1) JBAS018559: Deployed &quot;TestWebSec20.war&quot;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;Lets take look again the console of node1:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;21:26:31,272 INFO &amp;nbsp;[org.jboss.as.clustering.impl.CoreGroupCommunicationService.lifecycle.web] (Incoming-1,null) JBAS010247: New cluster view for partition web (id: 1, delta: 1, merge: false) :&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;color: #cc0000;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;color: #cc0000;&quot;&gt;[node1/web, node2/web]&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;color: #444444;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;21:26:31,326 INFO &amp;nbsp;[org.infinispan.remoting.transport.jgroups.JGroupsTransport] (Incoming-1,null) ISPN000094: Received new cluster view: [node1/web|1] [node1/web, node2/web]&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #444444; font-family: inherit;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div&gt;
Now lets shutdown node1, and console of node2 shows:&lt;/div&gt;
&lt;div style=&quot;color: #444444;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #444444; font-family: inherit;&quot;&gt;21:31:10,903 INFO &amp;nbsp;[org.jboss.as.clustering.impl.CoreGroupCommunicationService.lifecycle.web] (Incoming-6,null) JBAS010247: New cluster view for partition web (id: 2, delta: -1, merge: false) : &lt;/span&gt;&lt;span style=&quot;color: #cc0000; font-family: inherit;&quot;&gt;[node2/web]&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #444444; font-family: inherit;&quot;&gt;21:31:10,961 INFO &amp;nbsp;[org.infinispan.remoting.transport.jgroups.JGroupsTransport] (Incoming-6,null) ISPN000094: Received new cluster view: [node2/web|2] [node2/web]&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #444444;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;color: #444444;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;color: #444444;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div style=&quot;color: #444444;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #e69138;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://milestonenext.blogspot.com/feeds/5647731296141099491/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://milestonenext.blogspot.com/2012/10/ha-singleton-with-jboss-7.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7515187228721563448/posts/default/5647731296141099491'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7515187228721563448/posts/default/5647731296141099491'/><link rel='alternate' type='text/html' href='http://milestonenext.blogspot.com/2012/10/ha-singleton-with-jboss-7.html' title='HA Singleton with JBoss 7 Cluster'/><author><name>Beijing Beijing</name><uri>http://www.blogger.com/profile/12013373726184997758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='28' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTm1nk7ZqbPTfBofk6dIg7Zfx820i-FNuXqGbSlZNbRw5-RPJuqgDFNoW_zdgJCMCYj6R5cTGNgNKmwTzeDsEm2EHkqni9ywIanrN-PIRd4Z4yZXUOHhC12zzDid1A1w/s220/profile.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7515187228721563448.post-4647942128754916924</id><published>2012-10-02T01:23:00.001-07:00</published><updated>2013-01-25T23:29:02.438-08:00</updated><title type='text'>HA Singleton, Cluster Wide Singleton as MBean in JBoss 5, part 3/3 </title><content type='html'>&lt;div style=&quot;background-color: white; color: #222222; font-family: Lato, arial, sans-serif; line-height: 24px;&quot;&gt;
&lt;div style=&quot;margin-left: 10px; margin-right: 10px;&quot;&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;Document &amp;nbsp;Version 1.0&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;releaseinfo&quot; style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; margin-left: 10px; margin-right: 10px;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;span style=&quot;background-color: white; color: #666666; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;&amp;nbsp; Copyright © 2012-2013 beijing.beijing.012@gmail.com&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #cc0000; font-size: large;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;h3&gt;
&lt;span style=&quot;background-color: white; color: #351c75; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14px; font-weight: normal; line-height: 17px;&quot;&gt;&lt;b&gt;Keywords:&lt;/b&gt;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14px; font-weight: normal; line-height: 17px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #351c75; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14px; font-weight: normal; line-height: 17px;&quot;&gt;JBoss HA &amp;nbsp;Service, HA Singleton, JBoss Cluster, load migration, load distribution, HA Service deployment&lt;/span&gt;&lt;/h3&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: white; color: #351c75; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14px; font-weight: normal; line-height: 17px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: #cc0000; font-size: large;&quot;&gt;&lt;b&gt;I&lt;/b&gt;&lt;/span&gt;n &quot;HA Singleton, Cluster Wide Singleton as MBean in JBoss 5&quot;, part1-2, we have successfully configured a 2-nodes JBoss cluster, and have reated a &quot;TestHASingleton&quot; MBean. This bean is ready to be deployed as a JBoss HA singleton. If you have followed the part2, you should now have a &quot;TestHASingleton.sar&quot; file. In this part 3 of the serial, we will deploy the &amp;nbsp;&quot;TestHASingleton&quot; Mbean in JBoss cluster. We will also do some experiments to make sure it is really a HA singleton, i.e. it runs ONLY once in the cluster.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;
&lt;span style=&quot;color: orange;&quot;&gt;Deployment of &quot;TestHASingleton&quot; MBean&lt;/span&gt;&lt;/h3&gt;
&lt;div&gt;
&lt;span style=&quot;color: orange;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
Put the &quot;TestHASingleton.sar in &quot;JBOSS_HOME/server/&lt;b&gt;node1&lt;/b&gt;/farm/&quot;.&lt;/div&gt;
&lt;div&gt;
You will see following information in the console of&amp;nbsp;&lt;b&gt;node1 :&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;10:28:09,752 INFO &amp;nbsp;[STDOUT] ### Starting JbHaSingletonSvcSample Singleton Service..&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-weight: bold;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
From the above text we can see that the &quot;startSingletonService&quot; method of &quot;JbHaSingletonSvcSample&quot; is called, i.e. the singleton is started on node1.&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
We check the console output of node2, nothing about the singleton is shown. This is correct.&lt;/div&gt;
&lt;div&gt;
&lt;h3&gt;
&lt;span style=&quot;color: orange;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;h3&gt;
&lt;span style=&quot;color: orange;&quot;&gt;Shutdown node1&lt;/span&gt;&lt;/h3&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: orange;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
Now, we will shut down node1. Now we will see following info in the console of &lt;b&gt;node2:&lt;/b&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;10:40:05,383 INFO &amp;nbsp;[STDOUT] ### Starting JbHaSingletonSvcSample Singleton Service..&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;h3&gt;
&lt;span style=&quot;color: orange;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;h3&gt;
&lt;span style=&quot;color: orange;&quot;&gt;Find out service on which node will the singleton be active?&lt;/span&gt;&lt;/h3&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
step1. shutdown node1 and node2&lt;/div&gt;
&lt;div&gt;
step2. &amp;nbsp;remove the &quot;TestHASingleton.sar&quot; from farms of both nodes&lt;/div&gt;
&lt;div&gt;
step3. &amp;nbsp;start node1&lt;/div&gt;
&lt;div&gt;
step4. &amp;nbsp;start node2&lt;/div&gt;
&lt;div&gt;
step5. deploy &quot;TestHASingleton.sar&quot; in farm of&lt;span style=&quot;color: #444444;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;node2&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
The console of node2 shows:&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #351c75; font-size: x-small;&quot;&gt;10:48:34,880 INFO &amp;nbsp;[STDOUT] ### Starting JbHaSingletonSvcSample Singleton Service..&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #351c75; font-size: x-small;&quot;&gt;10:48:37,657 INFO &amp;nbsp;[STDOUT] ### Stopping JbHaSingletonSvcSample Singleton Service..&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #444444;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
The console of node1 shows:&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #351c75; font-size: x-small;&quot;&gt;10:48:37,658 INFO &amp;nbsp;[STDOUT] ### Starting JbHaSingletonSvcSample Singleton Service..&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #351c75;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #351c75;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
This is because, via default, a HA singleton will only active on the &quot;master&quot; node of a cluster (JBoss mainains a sorted list of all active nodes, sorted by the time it joins the cluster. The first node in the list will be choosen as master... ). A HA singleton is active only on the MASTER node.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
We could also customize the HA singleton behavior when deciding service on which node should be made active. In such case customized &quot;HA selection policy&quot; is needed...&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;div style=&quot;color: #444444;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;h4&gt;
&lt;span style=&quot;color: #351c75;&quot;&gt;&lt;a href=&quot;http://milestonenext.blogspot.de/2012/10/ha-singleton-cluster-wide-singleton-as.html&quot;&gt;HASingleton, Cluster Wide Singleton as MBean in JBoss 5, part2/3&lt;/a&gt;&amp;nbsp; &lt;a href=&quot;http://milestonenext.blogspot.de/2012/10/ha-singleton-cluster-wide-singleton-in.html&quot;&gt;&amp;nbsp;part1/3&lt;/a&gt;&lt;/span&gt;&lt;/h4&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: orange;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://milestonenext.blogspot.com/feeds/4647942128754916924/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://milestonenext.blogspot.com/2012/10/ha-singleton-cluster-wide-singleton-as_2.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7515187228721563448/posts/default/4647942128754916924'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7515187228721563448/posts/default/4647942128754916924'/><link rel='alternate' type='text/html' href='http://milestonenext.blogspot.com/2012/10/ha-singleton-cluster-wide-singleton-as_2.html' title='HA Singleton, Cluster Wide Singleton as MBean in JBoss 5, part 3/3 '/><author><name>Beijing Beijing</name><uri>http://www.blogger.com/profile/12013373726184997758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='28' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTm1nk7ZqbPTfBofk6dIg7Zfx820i-FNuXqGbSlZNbRw5-RPJuqgDFNoW_zdgJCMCYj6R5cTGNgNKmwTzeDsEm2EHkqni9ywIanrN-PIRd4Z4yZXUOHhC12zzDid1A1w/s220/profile.png'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7515187228721563448.post-3790636409106421318</id><published>2012-10-02T01:06:00.005-07:00</published><updated>2013-01-25T23:28:38.517-08:00</updated><title type='text'>HA Singleton, Cluster Wide Singleton as MBean in JBoss 5, part 2/3</title><content type='html'>&lt;div style=&quot;background-color: white; font-family: Lato, arial, sans-serif; line-height: 24px;&quot;&gt;
&lt;div style=&quot;margin-left: 10px; margin-right: 10px;&quot;&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;Document &amp;nbsp;Version 1.0&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;releaseinfo&quot; style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; margin-left: 10px; margin-right: 10px;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;h3&gt;
&lt;span style=&quot;background-color: white; color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: small; font-weight: normal; line-height: 24px;&quot;&gt;&amp;nbsp; Copyright © 2012-2013 beijing.beijing.012@gmail.com&lt;/span&gt;&lt;/h3&gt;
&lt;h3&gt;
&lt;span style=&quot;color: orange;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;h3&gt;
&lt;span style=&quot;background-color: white; color: #351c75; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14px; font-weight: normal; line-height: 17px;&quot;&gt;&lt;b&gt;Keywords:&lt;/b&gt;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14px; font-weight: normal; line-height: 17px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #351c75; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14px; font-weight: normal; line-height: 17px;&quot;&gt;JBoss HA &amp;nbsp;Service, HA Singleton, JBoss Cluster, load migration, load distribution, HA Service deployment&lt;/span&gt;&lt;/h3&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: white; color: #351c75; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14px; font-weight: normal; line-height: 17px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: white; color: #351c75; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14px; font-weight: normal; line-height: 17px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;h3&gt;
&lt;span style=&quot;color: orange;&quot;&gt;Write and deploy an JBoss Mbean&lt;/span&gt;&lt;/h3&gt;
&lt;div&gt;
&lt;span style=&quot;color: orange;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: orange;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;h3&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;We will write a JBoss MBean called &quot;JbHaSingletonSvcSample&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;&quot;&lt;/span&gt;&lt;/h3&gt;
&lt;div&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;h3&gt;
&lt;span style=&quot;color: #cc0000; font-size: large;&quot;&gt;C&lt;/span&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;reate a simple Java project &quot;TestHASingleton&quot; in Eclipse.&amp;nbsp;&lt;/span&gt;&lt;/h3&gt;
&lt;h3&gt;
&lt;span style=&quot;font-weight: normal;&quot;&gt;An MBean needs an interface, an implementation class, and a &quot;jbosss-service.xml&quot; file for MBean description/deployment.&lt;/span&gt;&lt;/h3&gt;
&lt;div&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;The interface:&lt;/b&gt;&lt;span style=&quot;color: #444444;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: white; color: #351c75; font-size: x-small;&quot;&gt;package test.ha;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: white; color: #351c75; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: white; color: #351c75; font-size: x-small;&quot;&gt;import org.jboss.system.ServiceMBean;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: white; color: #351c75; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: white; color: #351c75; font-size: x-small;&quot;&gt;public interface JbHaSingletonSvcSampleMBean extends ServiceMBean{&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: white; color: #351c75; font-size: x-small;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #444444;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;color: #444444;&quot;&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;The implementation class:&lt;/b&gt;&lt;br /&gt;
&lt;div style=&quot;color: #444444;&quot;&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;h3&gt;
&lt;span style=&quot;color: #351c75; font-size: x-small;&quot;&gt;package test.ha;&lt;br /&gt;import org.jboss.system.ServiceMBeanSupport;&lt;br /&gt;/**&lt;br /&gt;&amp;nbsp;* The service itself shoul not be written as singleton.&lt;br /&gt;&amp;nbsp;* @author ws&lt;br /&gt;&amp;nbsp;*&lt;br /&gt;&amp;nbsp;*/&lt;br /&gt;public class JbHaSingletonSvcSample extends ServiceMBeanSupport implements&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;JbHaSingletonSvcSampleMBean {&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;// The lifecycle&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;public void startSingletonService() throws Exception {&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;System.out.println(&quot;### Starting JbHaSingletonSvcSample Singleton Service..&quot;);&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;public void stopSingletonService() throws Exception {&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;System.out.println(&quot;### Stopping JbHaSingletonSvcSample Singleton Service..&quot;);&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;br /&gt;}&lt;/span&gt;&lt;/h3&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #351c75; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #351c75; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;Create a &quot;META-INF&quot; folder directly under project root:&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #351c75; font-size: x-small;&quot;&gt;TestHASingleton/&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #351c75; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; src/&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #351c75; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; META-INF/&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #351c75; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #351c75; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #351c75; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;Create a &quot;jboss-service.xml&quot; file in &quot;META-INF&quot; folder with following content:&lt;/b&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #351c75; font-size: x-small;&quot;&gt;&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #351c75; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #351c75; font-size: x-small;&quot;&gt;&amp;lt;server&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #351c75; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;lt;mbean code=&quot;test.ha.JbHaSingletonSvcSample&quot; name=&quot;myexample:service=testHaSample&quot;/&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #351c75; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;lt;mbean code=&quot;org.jboss.ha.singleton.HASingletonController&quot; name=&quot;myexample:service=SingletonServiceControllerA&quot;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #351c75; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;attribute name=&quot;HAPartition&quot;&amp;gt;&amp;lt;inject bean=&quot;HAPartition&quot; /&amp;gt;&amp;lt;/attribute&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #351c75; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;attribute name=&quot;Target&quot;&amp;gt;&amp;lt;inject bean=&quot;myexample:service=testHaSample&quot; /&amp;gt;&amp;lt;/attribute&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #351c75; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;attribute name=&quot;TargetStartMethod&quot;&amp;gt;startSingletonService&amp;lt;/attribute&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #351c75; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;attribute name=&quot;TargetStopMethod&quot;&amp;gt;stopSingletonService&amp;lt;/attribute&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #351c75; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;lt;/mbean&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #351c75; font-size: x-small;&quot;&gt;&amp;lt;/server&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
MBean will be deployed as &quot;.sar&quot; archive. An &quot;.sar&quot; is nothing else that a &quot;.jar&quot; file. To make an &quot;.sar&quot; file, we just need to export the project binaries as &quot;jar&quot; file with Eclipse, i.e. &quot;TestHASingleton.jar&quot;,&lt;/div&gt;
&lt;div&gt;
and then rename it to &quot;TestHASingleton.sar&quot;.&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;h4&gt;
&lt;span style=&quot;color: #351c75;&quot;&gt;&lt;a href=&quot;http://milestonenext.blogspot.de/2012/10/ha-singleton-cluster-wide-singleton-as_2.html&quot;&gt;HASingleton, Cluster Wide Singleton as MBean in JBoss 5, part3/3&lt;/a&gt;&amp;nbsp; &lt;a href=&quot;http://milestonenext.blogspot.de/2012/10/ha-singleton-cluster-wide-singleton-in.html&quot;&gt;&amp;nbsp;part1/3&lt;/a&gt;&lt;/span&gt;&lt;/h4&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://milestonenext.blogspot.com/feeds/3790636409106421318/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://milestonenext.blogspot.com/2012/10/ha-singleton-cluster-wide-singleton-as.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7515187228721563448/posts/default/3790636409106421318'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7515187228721563448/posts/default/3790636409106421318'/><link rel='alternate' type='text/html' href='http://milestonenext.blogspot.com/2012/10/ha-singleton-cluster-wide-singleton-as.html' title='HA Singleton, Cluster Wide Singleton as MBean in JBoss 5, part 2/3'/><author><name>Beijing Beijing</name><uri>http://www.blogger.com/profile/12013373726184997758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='28' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTm1nk7ZqbPTfBofk6dIg7Zfx820i-FNuXqGbSlZNbRw5-RPJuqgDFNoW_zdgJCMCYj6R5cTGNgNKmwTzeDsEm2EHkqni9ywIanrN-PIRd4Z4yZXUOHhC12zzDid1A1w/s220/profile.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7515187228721563448.post-2031334304791648391</id><published>2012-10-01T23:52:00.001-07:00</published><updated>2013-01-25T23:28:18.050-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Cluster Wide Singleton"/><category scheme="http://www.blogger.com/atom/ns#" term="HA Singleton"/><title type='text'>HA Singleton, Cluster Wide Singleton as MBean in JBoss 5,  part 1/3</title><content type='html'>&lt;div style=&quot;background-color: white; font-family: Lato, arial, sans-serif; line-height: 24px;&quot;&gt;
&lt;div style=&quot;margin-left: 10px; margin-right: 10px;&quot;&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;Document &amp;nbsp;Version 1.0&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;releaseinfo&quot; style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; margin-left: 10px; margin-right: 10px;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;h3&gt;
&lt;span style=&quot;background-color: white; color: #444444; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: small; line-height: 24px;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;span style=&quot;font-weight: normal;&quot;&gt;Copyright © 2012-2013 beijing.beijing.012@gmail.com&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;h3&gt;
&lt;span style=&quot;color: #b45f06;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;h3&gt;
&lt;span style=&quot;background-color: white; color: #351c75; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14px; font-weight: normal; line-height: 17px;&quot;&gt;&lt;b&gt;Keywords:&lt;/b&gt;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14px; font-weight: normal; line-height: 17px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #351c75; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14px; font-weight: normal; line-height: 17px;&quot;&gt;JBoss HA &amp;nbsp;Service, HA Singleton, JBoss Cluster, load migration, load distribution, HA Service deployment&lt;/span&gt;&lt;/h3&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: white; color: #351c75; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14px; font-weight: normal; line-height: 17px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: white; color: #351c75; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14px; font-weight: normal; line-height: 17px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;h3&gt;
&lt;span style=&quot;color: #b45f06;&quot;&gt;&lt;b&gt;What is HA Singleton?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;div&gt;
&lt;span style=&quot;color: #b45f06;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: #cc0000; font-size: large;&quot;&gt;&lt;b&gt;W&lt;/b&gt;&lt;/span&gt;e know that singletons are the kind of instances or services that exists only once in an application context. When you write a singleton, deploy it in your server, you will get only one instance of this singleton on the server.&lt;br /&gt;
&lt;br /&gt;
The singleton mentioned above is actually class-loader wide singleton, &amp;nbsp;i.e. one instance per class-loader. In case of&amp;nbsp;high availabile cluster,&amp;nbsp;when the above singleton is deployed in cluster, there will be one singleton instance in each cluster-node.&lt;br /&gt;
&lt;br /&gt;
But there are cases where we need cluster-wide singleton. For example, in a clustered auction system,&lt;br /&gt;
bid orders can come from different node, but the process which deals with the final trading settelment should run only once in the whole cluster. When the node on which the singleton service fails, another node will start &amp;nbsp;an singleton service automatically. Such singleton is so called cluster-wide singleton, i.e. HA singleton.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We will now take JBoss as example to show how to implement a HA singleton.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
JBoss supports deployment of singleton as HA singleton. There are generally 2 ways to deplyoment HA singleton on JBoss&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;option1: just put deployment archive under &quot;../deploy-singleton/ &quot;, and the deployment service bekomes a HA singleton.&amp;nbsp;Disadvantages of this way are, no hot-deployment support, in case of node failure, service startup time takes longer...&lt;/li&gt;
&lt;li&gt;option 2: deploy service as MBean. MBean support hot deployment. Singleton MBean will be deployment on all nodes, &amp;nbsp;but provides service only on one node.&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
We take the second option, and show how to deploy a MBean as HA singleton:&lt;br /&gt;
We will configure and run a 2-nodes JBoss cluster&lt;br /&gt;
We will write a simple MBean.&lt;br /&gt;
We will deploy the MBean as HA singlleton.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #351c75;&quot;&gt;&lt;b&gt;Configure and run a 2-nodes JBoss cluster&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #351c75;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;
Download JBoss &amp;nbsp;5.1.0_GA from www.boss.org (http://sourceforge.net/projects/jboss/files/JBoss/JBoss-5.1.0.GA). &amp;nbsp;Extract the file to some location, we will name it JBOSS_HOME hereafter.&lt;br /&gt;
&lt;br /&gt;
In the extracted JBoss directory goto&amp;nbsp;JBOSS_HOME/server/,&amp;nbsp;create 2 new folders directly here:&lt;br /&gt;
&lt;br /&gt;
node1&lt;br /&gt;
node2&lt;br /&gt;
&lt;br /&gt;
Copy all files in&amp;nbsp;JBOSS_HOME/server/all into node1.&lt;br /&gt;
Copy all files in&amp;nbsp;JBOSS_HOME/server/all into node2.&lt;br /&gt;
&lt;br /&gt;
Now we have a JBoss cluster with two nodes ready to run.&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;h4&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;Start node1:&lt;/span&gt;&lt;/h4&gt;
&lt;br /&gt;
./run.sh -c node1 -Djboss.service.binding.set=ports-01 -Djboss.messaging.ServerPeerID=1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When you have followed the above steps, you will see in the console like these:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6; font-size: x-small;&quot;&gt;09:57:56,551 INFO &amp;nbsp;[GroupMember] I am (127.0.0.1:56944)&lt;br /&gt;09:57:56,551 INFO &amp;nbsp;[GroupMember] New Members : 1 ([127.0.0.1:56944])&lt;br /&gt;09:57:56,551 INFO &amp;nbsp;[GroupMember] All Members : 1 ([127.0.0.1:56944])&lt;br /&gt;09:57:56,556 INFO &amp;nbsp;[STDOUT]&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6; font-size: x-small;&quot;&gt;.......&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #3d85c6; font-size: x-small;&quot;&gt;09:58:03,364 INFO &amp;nbsp;[Http11Protocol] Starting Coyote HTTP/1.1 on http-127.0.0.1-8180&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #3d85c6; font-size: x-small;&quot;&gt;09:58:03,377 INFO &amp;nbsp;[AjpProtocol] Starting Coyote AJP/1.3 on ajp-127.0.0.1-8109&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #3d85c6; font-size: x-small;&quot;&gt;09:58:03,382 INFO &amp;nbsp;[ServerImpl] JBoss (Microcontainer) [5.1.0.GA (build: SVNTag=JBoss_5_1_0_GA date=200905221634)] Started in 25s:474ms&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
The node1 is now started.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h4&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;Start node2:&lt;/span&gt;&lt;/h4&gt;
&lt;div&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
./run.sh -c node2 -Djboss.service.binding.set=ports-02 -Djboss.messaging.ServerPeerID=2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You will see in the console lines like these:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6; font-size: x-small;&quot;&gt;|1] [127.0.0.1:56944, 127.0.0.1:55687], old view is null&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6; font-size: x-small;&quot;&gt;10:01:57,587 INFO &amp;nbsp;[GroupMember] I am (127.0.0.1:55687)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6; font-size: x-small;&quot;&gt;10:01:57,587 INFO &amp;nbsp;[GroupMember] New Members : 2 ([127.0.0.1:56944, 127.0.0.1:55687])&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6; font-size: x-small;&quot;&gt;10:01:57,587 INFO &amp;nbsp;[GroupMember] All Members : 2 ([127.0.0.1:56944, 127.0.0.1:55687])&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6; font-size: x-small;&quot;&gt;10:01:57,629 INFO &amp;nbsp;[STDOUT]&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6; font-size: x-small;&quot;&gt;.....&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6; font-size: x-small;&quot;&gt;10:01:59,745 INFO &amp;nbsp;[Http11Protocol] Starting Coyote HTTP/1.1 on http-127.0.0.1-8280&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6; font-size: x-small;&quot;&gt;10:01:59,756 INFO &amp;nbsp;[AjpProtocol] Starting Coyote AJP/1.3 on ajp-127.0.0.1-8209&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6; font-size: x-small;&quot;&gt;10:01:59,762 INFO &amp;nbsp;[ServerImpl] JBoss (Microcontainer) [5.1.0.GA (build: SVNTag=JBoss_5_1_0_GA date=200905221634)] Started in 17s:400ms&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
The second node is started, and it joined the cluster.&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;color: #351c75;&quot;&gt;&lt;a href=&quot;http://milestonenext.blogspot.de/2012/10/ha-singleton-cluster-wide-singleton-as.html&quot;&gt; HA Singleton, Cluster Wide Singleton as MBean in JBoss 5, part2/3&lt;/a&gt;&amp;nbsp;&lt;a href=&quot;http://milestonenext.blogspot.de/2012/10/ha-singleton-cluster-wide-singleton-as_2.html&quot;&gt;part3/3&lt;/a&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://milestonenext.blogspot.com/feeds/2031334304791648391/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://milestonenext.blogspot.com/2012/10/ha-singleton-cluster-wide-singleton-in.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7515187228721563448/posts/default/2031334304791648391'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7515187228721563448/posts/default/2031334304791648391'/><link rel='alternate' type='text/html' href='http://milestonenext.blogspot.com/2012/10/ha-singleton-cluster-wide-singleton-in.html' title='HA Singleton, Cluster Wide Singleton as MBean in JBoss 5,  part 1/3'/><author><name>Beijing Beijing</name><uri>http://www.blogger.com/profile/12013373726184997758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='28' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTm1nk7ZqbPTfBofk6dIg7Zfx820i-FNuXqGbSlZNbRw5-RPJuqgDFNoW_zdgJCMCYj6R5cTGNgNKmwTzeDsEm2EHkqni9ywIanrN-PIRd4Z4yZXUOHhC12zzDid1A1w/s220/profile.png'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7515187228721563448.post-3257445013028813280</id><published>2012-09-09T12:48:00.001-07:00</published><updated>2013-01-26T23:45:43.925-08:00</updated><title type='text'>SSL Offloading with mod_jk part 6</title><content type='html'>&lt;div style=&quot;background-color: white; color: #222222; font-family: Lato, arial, sans-serif; font-size: 14px; line-height: 24px;&quot;&gt;
&lt;div style=&quot;margin-left: 10px; margin-right: 10px;&quot;&gt;
&lt;span style=&quot;color: #666666; font-size: xx-small;&quot;&gt;Document &amp;nbsp;Version 1.0&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;releaseinfo&quot; style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; margin-left: 10px; margin-right: 10px;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;span style=&quot;background-color: white; color: #666666; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: xx-small; line-height: 24px;&quot;&gt;&amp;nbsp; &amp;nbsp;Copyright © 2012-2013 beijing.beijing.012@gmail.com&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #868686; font-family: Tahoma, Geneva, sans-serif; font-size: 14px; line-height: 21px; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; color: #351c75; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14px; line-height: 17px;&quot;&gt;&lt;b&gt;Keywords:&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #351c75; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14px; line-height: 17px;&quot;&gt;SSLOffloading SSL-Offloading, SSL Termination, Apache, Tomcat, mod_jk configuration, multiple vhosts,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #351c75; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14px; line-height: 17px;&quot;&gt;multiple SSL certificates one ip&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: -webkit-auto;&quot;&gt;
&lt;span style=&quot;font-size: 14px; line-height: 17px;&quot;&gt;&lt;span style=&quot;color: #351c75; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: -webkit-auto;&quot;&gt;
&lt;span style=&quot;font-size: 14px; line-height: 17px;&quot;&gt;&lt;span style=&quot;color: #351c75; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; font-size: large; text-align: left;&quot;&gt;&lt;span style=&quot;line-height: 21px;&quot;&gt;&lt;b&gt;Configure Tomcat to accept SSL handling of mod_jk&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; text-align: left;&quot;&gt;&lt;span style=&quot;line-height: 21px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot;&gt;We will now configure &quot;SSL Termination&quot; for &quot;TestWebSec20&quot; application.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot;&gt;We need to:&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot;&gt;1. Generate a self-signed SSL certificate.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot;&gt;&amp;nbsp; &amp;nbsp;This includes creating a &quot;.key&quot; file, a &quot;.csr&quot; file and &quot;.crt file&quot;.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot;&gt;2. Configure Apache virtual host i.e. host &quot;ahaha.com&quot; to use SSL&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot;&gt;3. Configure Tomcat to accept SSL handling of Apache and mod_jk.&lt;/span&gt;&lt;br /&gt;
&lt;br style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot; /&gt;
&lt;br /&gt;
&lt;strong style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot;&gt;6.1 Generate a self-signed SSL certificate&lt;/strong&gt;&lt;br /&gt;
&lt;strong style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/strong&gt;
&lt;span style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot;&gt;The following link is the best Tutorial I have ever found for creating self-signed SSL certificate:&lt;/span&gt;&lt;br /&gt;
&lt;a href=&quot;http://www.akadia.com/services/ssh_test_certificate.html&quot; style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left; text-decoration: none;&quot; title=&quot;Links active once published&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;http://www.akadia.com/services/ssh_test_certificate.html&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot;&gt;Please follow the link to create 3 files in following folders:&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot;&gt;&quot;/etc/apache2/ssl.key/ahaha.com.key&quot;, here &quot;ahaha.com.key&quot; is the key file name.&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot;&gt;&quot;/etc/apache2/ssl.csr/ahaha.com.csr&quot;, &amp;nbsp;here &quot;ahaha.com.csr&quot; is the csr file name.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;span style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot;&gt;&quot;/etc/apache2/ssl.crt/ahaha.com.crt&quot;, &amp;nbsp; here &quot;ahaha.com.crt&quot; is the crt file name.&lt;/span&gt;&lt;br /&gt;
&lt;br style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot; /&gt;
&lt;strong style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot;&gt;6.2 Configure Apache virtual host for SSL&lt;/strong&gt;&lt;br /&gt;
&lt;strong style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/strong&gt;
&lt;span style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot;&gt;Configure Apache virtual host for &quot;ahaha.com&quot; to use SSL.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot;&gt;Add a &quot;vhost-ssl.conf&quot; file to Apache&#39;s &quot;vhost.d&quot; folder, and add following content to the file:&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Tahoma, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 21px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Tahoma, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 21px;&quot;&gt;

&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;div style=&quot;background-color: #fff7b2; border-radius: 6px 6px 6px 6px; border: 1px solid #BBBBBB; padding: 5px 10px 5px;&quot;&gt;
&lt;span style=&quot;font-family: Tahoma, Geneva, sans-serif;&quot;&gt;####START vhost-ssl.conf&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Tahoma, Geneva, sans-serif;&quot;&gt;NameVirtualHost *:443&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Tahoma, Geneva, sans-serif;&quot;&gt;&amp;lt;IfDefine SSL&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Tahoma, Geneva, sans-serif;&quot;&gt;&amp;lt;IfDefine !NOSSL&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Tahoma, Geneva, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Tahoma, Geneva, sans-serif;&quot;&gt;&amp;lt;VirtualHost *:443&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Tahoma, Geneva, sans-serif;&quot;&gt;# &amp;nbsp;General setup for the virtual host&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Tahoma, Geneva, sans-serif;&quot;&gt;DocumentRoot &quot;/srv/www/vhosts/ahaha.com&quot;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Tahoma, Geneva, sans-serif;&quot;&gt;ServerName www.ahaha.com&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Tahoma, Geneva, sans-serif;&quot;&gt;#ServerAdmin webmaster@example.com&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Tahoma, Geneva, sans-serif;&quot;&gt;ErrorLog /var/log/apache2/error_log&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Tahoma, Geneva, sans-serif;&quot;&gt;TransferLog /var/log/apache2/access_log&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Tahoma, Geneva, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Tahoma, Geneva, sans-serif;&quot;&gt;# &amp;nbsp; SSL Engine Switch:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Tahoma, Geneva, sans-serif;&quot;&gt;# &amp;nbsp; Enable/Disable SSL for this virtual host.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Tahoma, Geneva, sans-serif;&quot;&gt;SSLEngine on&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Tahoma, Geneva, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Tahoma, Geneva, sans-serif;&quot;&gt;# &amp;nbsp;SSL protocols&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Tahoma, Geneva, sans-serif;&quot;&gt;# &amp;nbsp;Supporting TLS only is adequate nowadays&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Tahoma, Geneva, sans-serif;&quot;&gt;SSLProtocol all -SSLv2 -SSLv3&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Tahoma, Geneva, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Tahoma, Geneva, sans-serif;&quot;&gt;# &amp;nbsp; SSL Cipher Suite:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Tahoma, Geneva, sans-serif;&quot;&gt;SSLCipherSuite ALL:!aNULL:!eNULL:!SSLv2:!LOW:!EXP:!MD5:@STRENGTH&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Tahoma, Geneva, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Tahoma, Geneva, sans-serif;&quot;&gt;# &amp;nbsp; Server Certificate:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Tahoma, Geneva, sans-serif;&quot;&gt;SSLCertificateFile /etc/apache2/ssl.crt/ahaha.com.crt&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Tahoma, Geneva, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Tahoma, Geneva, sans-serif;&quot;&gt;# &amp;nbsp; Server Private Key:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Tahoma, Geneva, sans-serif;&quot;&gt;SSLCertificateKeyFile /etc/apache2/ssl.key/ahaha.com.key&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Tahoma, Geneva, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Tahoma, Geneva, sans-serif;&quot;&gt;CustomLog /var/log/apache2/ssl_request_log &amp;nbsp; ssl_combined&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Tahoma, Geneva, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;JkMountCopy On&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Tahoma, Geneva, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;JkMount / worker1&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Tahoma, Geneva, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;JkMount /* worker1&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Tahoma, Geneva, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Tahoma, Geneva, sans-serif;&quot;&gt;&amp;lt;/VirtualHost&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Tahoma, Geneva, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Tahoma, Geneva, sans-serif;&quot;&gt;&amp;lt;/IfDefine&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Tahoma, Geneva, sans-serif;&quot;&gt;&amp;lt;/IfDefine&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Tahoma, Geneva, sans-serif;&quot;&gt;####END vhost-ssl.conf&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Tahoma, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 21px;&quot;&gt;

&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot; /&gt;
&lt;span style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot;&gt;With this vhost configuration for SSL, a SSL request to &quot;ahahacom&quot; will be first processed by mod_jk. mod_jk will take care of the SSL communication:&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot;&gt;providing client with the corresponding SSL certifiacte&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot;&gt;do the SSL hand shake&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot;&gt;do encryption and decryption&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Tahoma, Geneva, sans-serif; text-align: left;&quot;&gt;&lt;span style=&quot;line-height: 21px;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot;&gt;and forward it to Tomcat&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;span style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot;&gt;The communication between mod_jk and Tomcat are in &quot;plain&quot; text, &amp;nbsp;NO SSL. &amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot; /&gt;
&lt;strong style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot;&gt;6.3 Configure Tomcat &amp;nbsp;to accept SSL handling of mod_jk.&lt;/strong&gt;&lt;br /&gt;
&lt;strong style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/strong&gt;
&lt;span style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot;&gt;With the SSL configuration in &quot;vhost-ssl.conf&quot;, mod_jk will take care of the SSL conmunication to browser, and forward client request to Tomcat. Tomcat need to be configured to believe the request from mod_jk is &quot;secured&quot;.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot;&gt;Remembe in part5, we configured tomcat for a &quot;ajp connector&quot;.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: #fff7b2; border-radius: 6px 6px 6px 6px; border: 1px solid #BBBBBB; padding: 5px 10px 5px;&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Tahoma, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 21px;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Tahoma, Geneva, sans-serif;&quot;&gt;...&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Tahoma, Geneva, sans-serif;&quot;&gt;&amp;lt;Connector port=&quot;8009&quot; protocol=&quot;AJP/1.3&quot; redirectPort=&quot;8443&quot;/&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Tahoma, Geneva, sans-serif;&quot;&gt;...&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Tahoma, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 21px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot;&gt;To make Tomcat accept mod_jk SSL handling is easy, we just need to change the redirectPort of the above ajp connector to 433:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: #fff7b2; border-radius: 6px 6px 6px 6px; border: 1px solid #BBBBBB; padding: 5px 10px 5px;&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;color: #274e13; font-family: Tahoma, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 21px;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: #274e13; font-family: Tahoma, Geneva, sans-serif;&quot;&gt;...&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #274e13; font-family: Tahoma, Geneva, sans-serif;&quot;&gt;&amp;lt;Connector port=&quot;8009&quot; protocol=&quot;AJP/1.3&quot; redirectPort=&quot;443&quot;/&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #274e13; font-family: Tahoma, Geneva, sans-serif;&quot;&gt;...&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot;&gt;No restart Apache and Tomcat. Try accessing &quot;secure/HalloSec&quot; again:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot;&gt;http://ahaha.com/TestWebSec20/secure/HalloSec&lt;/span&gt;&lt;br /&gt;
&lt;br style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot; /&gt;
&lt;span style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot;&gt;Your browser will be redirected to HTPPS, and now the server certificate is shown &amp;nbsp;corectly, and SSL port is not shown any more:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiA07TJOgC0lsRXVb-MkkekFephhng9ZM7IfVZOdF9KnL0sa4uVz0oW6FJJemIMEz-Fmdumfu8_kRURcp3eO3WcEWj9YQjUZHab43Eyvo6zBfb7GMRoXLDrH1QhVUf5JuVnUv2B28HLmV6j/s1600/ssl_p6.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiA07TJOgC0lsRXVb-MkkekFephhng9ZM7IfVZOdF9KnL0sa4uVz0oW6FJJemIMEz-Fmdumfu8_kRURcp3eO3WcEWj9YQjUZHab43Eyvo6zBfb7GMRoXLDrH1QhVUf5JuVnUv2B28HLmV6j/s1600/ssl_p6.jpg&quot; /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b style=&quot;text-align: left;&quot;&gt;&lt;a href=&quot;http://milestonenext.blogspot.de/2012/09/ssl-offloading-with-modjk-part-1.html&quot;&gt;part1&amp;nbsp;&lt;/a&gt;&lt;/b&gt;&lt;a href=&quot;http://milestonenext.blogspot.de/2012/09/ssl-offloading-with-modjk-part-2.html&quot; style=&quot;font-weight: bold; text-align: left;&quot;&gt;part2&lt;/a&gt;&lt;b style=&quot;text-align: left;&quot;&gt;&amp;nbsp;&lt;/b&gt;&lt;b style=&quot;color: #868686; font-size: 14px; line-height: 21px;&quot;&gt;&lt;a href=&quot;http://milestonenext.blogspot.de/2012/09/ssl-offloading-with-modjk-part-3.html&quot;&gt;part3&lt;/a&gt;&amp;nbsp;&lt;a href=&quot;http://milestonenext.blogspot.de/2012/09/ssl-offloading-with-modjk-part-4.html&quot;&gt;part4&lt;/a&gt;&amp;nbsp;&lt;/b&gt;&lt;b style=&quot;text-align: left;&quot;&gt;&lt;a href=&quot;http://milestonenext.blogspot.de/2012/09/ssl-offloading-with-modjk-part-5.html&quot;&gt;part5&lt;/a&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://milestonenext.blogspot.com/feeds/3257445013028813280/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://milestonenext.blogspot.com/2012/09/ssl-offloading-with-modjk-part-6.html#comment-form' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7515187228721563448/posts/default/3257445013028813280'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7515187228721563448/posts/default/3257445013028813280'/><link rel='alternate' type='text/html' href='http://milestonenext.blogspot.com/2012/09/ssl-offloading-with-modjk-part-6.html' title='SSL Offloading with mod_jk part 6'/><author><name>Beijing Beijing</name><uri>http://www.blogger.com/profile/12013373726184997758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='28' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTm1nk7ZqbPTfBofk6dIg7Zfx820i-FNuXqGbSlZNbRw5-RPJuqgDFNoW_zdgJCMCYj6R5cTGNgNKmwTzeDsEm2EHkqni9ywIanrN-PIRd4Z4yZXUOHhC12zzDid1A1w/s220/profile.png'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiA07TJOgC0lsRXVb-MkkekFephhng9ZM7IfVZOdF9KnL0sa4uVz0oW6FJJemIMEz-Fmdumfu8_kRURcp3eO3WcEWj9YQjUZHab43Eyvo6zBfb7GMRoXLDrH1QhVUf5JuVnUv2B28HLmV6j/s72-c/ssl_p6.jpg" height="72" width="72"/><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7515187228721563448.post-2082049316314575828</id><published>2012-09-09T12:22:00.001-07:00</published><updated>2013-01-26T23:45:29.411-08:00</updated><title type='text'>SSL Offloading with mod_jk part 5</title><content type='html'>&lt;div style=&quot;background-color: white; color: #222222; font-family: Lato, arial, sans-serif; line-height: 24px;&quot;&gt;
&lt;div style=&quot;margin-left: 10px; margin-right: 10px;&quot;&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;Document &amp;nbsp;Version 1.0&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;releaseinfo&quot; style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; margin-left: 10px; margin-right: 10px;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;span style=&quot;background-color: white; color: #666666; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;&amp;nbsp; Copyright © 2012-2013 beijing.beijing.012@gmail.com&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; color: #351c75; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14px; line-height: 17px;&quot;&gt;&lt;b&gt;Keywords:&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #351c75; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14px; line-height: 17px;&quot;&gt;SSLOffloading SSL-Offloading, SSL Termination, Apache, Tomcat, mod_jk configuration, multiple vhosts,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #351c75; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14px; line-height: 17px;&quot;&gt;multiple SSL certificates one ip&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #351c75; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 17px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: #351c75; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 17px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: inherit; font-size: large;&quot;&gt;&lt;b&gt;SSL Port Problem&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;In part4 of this serial, we have successfully configured, a virtual host &quot;ahaha.com&quot;, we have configured Apache and mod_jk, so that when a request comes form browser(clien), mod_jk will try to communicate this request to Tomcat. mod_jk talks &quot;ajp language&quot; to Tomcat. Now we need to configure Tomcat so that, he can also understand &quot;ajp&quot;. &lt;br /&gt;This could be accmplished by uncommenting following lines of &quot;server.xml&quot; of  tomcat:&lt;/span&gt;

&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: #fffff8; border-radius: 6px 6px 6px 6px; border: 1px solid #BBBBBB; padding: 5px 10px 5px;&quot;&gt;
...&lt;br /&gt;
&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;lt;Connector&lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt; port=&lt;/span&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;&quot;8009&quot;&lt;/span&gt; &lt;span style=&quot;color: #660000;&quot;&gt;protocol=&lt;/span&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;&quot;AJP/1.3&quot;&lt;/span&gt; &lt;span style=&quot;color: #660000;&quot;&gt;redirectPort&lt;/span&gt;=&lt;span style=&quot;color: #0b5394;&quot;&gt;&quot;8443&quot;&lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;
...&lt;/div&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;Now restart Tomcat and try accessing the &quot;TestWebSec20&quot;applicaiton again:&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&quot;http://www.ahaha.com/TestWebSec20/HalloNormal&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;And now you will see:&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwH6Tm2Unat1kbNT5Di7pjTvPc4j5-k3luX2qpmAlZe8tsYQq-4TSbc-Rv6GzsnhtGMBjbrqmPw3INKixb8PRQSWQ0LELSVSyB06q92ZLPoZRebxYMCGU3B1ZHf74xhyphenhyphensncqKb7CKj2GUm/s1600/8542680_orig.jpeg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwH6Tm2Unat1kbNT5Di7pjTvPc4j5-k3luX2qpmAlZe8tsYQq-4TSbc-Rv6GzsnhtGMBjbrqmPw3INKixb8PRQSWQ0LELSVSyB06q92ZLPoZRebxYMCGU3B1ZHf74xhyphenhyphensncqKb7CKj2GUm/s1600/8542680_orig.jpeg&quot; height=&quot;166&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;Now you could access the &quot;TestWebSec20&quot; web applicaiton through a &quot;real&quot; domain name. &lt;br /&gt;And you do NOT see the port 8080 in browser input any more!&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;Let&#39;s try accessing the secured resource, namly:&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;http://www.ahaha.com/TestWebSec20/secure/HalloSec&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
And you will see in you browser:&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #999999; font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUBQVFH8W1fJ5rP1MOkpD6IruKwtqSQoCyjh4bD3DbCLAZsOKmO1q9_p27zTML2gCVsk801zC9YiNy0iS4_cIfOBkZrXYU0mXMW1axszMrouvU8w5XKOIHfduqfOZC6G389rscCnrjmwVj/s1600/ssl_p4.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUBQVFH8W1fJ5rP1MOkpD6IruKwtqSQoCyjh4bD3DbCLAZsOKmO1q9_p27zTML2gCVsk801zC9YiNy0iS4_cIfOBkZrXYU0mXMW1axszMrouvU8w5XKOIHfduqfOZC6G389rscCnrjmwVj/s1600/ssl_p4.jpg&quot; height=&quot;136&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;Cool! Isn&#39;t it?&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;The brower was redirected  to HTTPS, and after confirmation of th SSL certificate, we see the protected resource!&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;b&gt;But, wait a minute! There is still something wrong!&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;The&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: inherit; text-align: justify;&quot;&gt;&amp;nbsp;browser was redirected to HTTPS, but we see now another port numer 8443 (which is configured &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: inherit; text-align: justify;&quot;&gt;for Tomcat https), &amp;nbsp;but we actually don&#39;t want to show users the port number in browser. We are&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: inherit; text-align: justify;&quot;&gt;expecting something like this&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;https:///www.ahaha.com/TestWebSec20/secure/HalloSec&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;font-family: inherit; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;When we take a closer look at the SSL certificate details, we will see that the certificate here is the&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;certificate of Tomcat, not the certificate of&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&quot;www.ahaha.com&quot;.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;To sum it up, we do NOT want to show the SSL port to brower; we want to show the user our &quot;real&quot; certificate that we created for domain &quot;ahaha.com&quot;.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;To solve these two problems, we need to introduce a new &quot;term&quot;, i.e. so called &quot;SSL offload&quot; or &quot;SSL Termination&quot;. This is actually the main purpose of &amp;nbsp;the &amp;nbsp;&quot;&lt;/span&gt;SSL Offloading with mod_jk&lt;span style=&quot;font-family: inherit;&quot;&gt;&quot; serial I am writing!&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;b&gt;So what is SSLTermination / Offloading?&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;SSL Termination is used take care of &amp;nbsp;everything about SSL in a centralized position in a system, at the border between secured and unsecured areas. &quot;SSL Terminator&quot; takes care of the SSL things between client and Servers, and all the traffic behinde &quot;SSL Terminator&quot; is not encrypted but thought to be secure.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;To make it simple, &amp;nbsp;in our case we want  apache / mod_jk to take care of the SSL handling, and by NOT Tomcat.&lt;br /&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #999999;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: #999999;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;a href=&quot;http://milestonenext.blogspot.de/2012/09/ssl-offloading-with-modjk-part-6.html&quot;&gt;SSL Offloading with mod_jk part 6&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;b style=&quot;text-align: left;&quot;&gt;&lt;a href=&quot;http://milestonenext.blogspot.de/2012/09/ssl-offloading-with-modjk-part-1.html&quot;&gt;part1&amp;nbsp;&lt;/a&gt;&lt;/b&gt;&lt;a href=&quot;http://milestonenext.blogspot.de/2012/09/ssl-offloading-with-modjk-part-2.html&quot; style=&quot;font-weight: bold; text-align: left;&quot;&gt;part2&lt;/a&gt;&lt;b style=&quot;text-align: left;&quot;&gt;&amp;nbsp;&lt;/b&gt;&lt;b style=&quot;color: #868686; font-size: 14px; line-height: 21px;&quot;&gt;&lt;a href=&quot;http://milestonenext.blogspot.de/2012/09/ssl-offloading-with-modjk-part-3.html&quot;&gt;part3&lt;/a&gt;&amp;nbsp;&lt;a href=&quot;http://milestonenext.blogspot.de/2012/09/ssl-offloading-with-modjk-part-4.html&quot;&gt;part4&lt;/a&gt;&lt;/b&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://milestonenext.blogspot.com/feeds/2082049316314575828/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://milestonenext.blogspot.com/2012/09/ssl-offloading-with-modjk-part-5.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7515187228721563448/posts/default/2082049316314575828'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7515187228721563448/posts/default/2082049316314575828'/><link rel='alternate' type='text/html' href='http://milestonenext.blogspot.com/2012/09/ssl-offloading-with-modjk-part-5.html' title='SSL Offloading with mod_jk part 5'/><author><name>Beijing Beijing</name><uri>http://www.blogger.com/profile/12013373726184997758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='28' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTm1nk7ZqbPTfBofk6dIg7Zfx820i-FNuXqGbSlZNbRw5-RPJuqgDFNoW_zdgJCMCYj6R5cTGNgNKmwTzeDsEm2EHkqni9ywIanrN-PIRd4Z4yZXUOHhC12zzDid1A1w/s220/profile.png'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwH6Tm2Unat1kbNT5Di7pjTvPc4j5-k3luX2qpmAlZe8tsYQq-4TSbc-Rv6GzsnhtGMBjbrqmPw3INKixb8PRQSWQ0LELSVSyB06q92ZLPoZRebxYMCGU3B1ZHf74xhyphenhyphensncqKb7CKj2GUm/s72-c/8542680_orig.jpeg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7515187228721563448.post-6672127350730269879</id><published>2012-09-09T10:33:00.001-07:00</published><updated>2013-01-26T23:45:16.809-08:00</updated><title type='text'>SSL Offloading with mod_jk part 4</title><content type='html'>&lt;div style=&quot;background-color: white; color: #222222; font-family: Lato, arial, sans-serif; line-height: 24px;&quot;&gt;
&lt;div style=&quot;margin-left: 10px; margin-right: 10px;&quot;&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;Document &amp;nbsp;Version 1.0&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;releaseinfo&quot; style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; margin-left: 10px; margin-right: 10px;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;span style=&quot;background-color: white; color: #666666; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;&amp;nbsp; Copyright © 2012-2013 beijing.beijing.012@gmail.com&lt;/span&gt;&lt;br /&gt;
&lt;strong style=&quot;background-color: white; color: #868686; font-family: Tahoma, Geneva, sans-serif; font-size: 14px; line-height: 21px; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/strong&gt;
&lt;span style=&quot;background-color: white; color: #351c75; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14px; line-height: 17px;&quot;&gt;&lt;b&gt;Keywords:&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #351c75; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14px; line-height: 17px;&quot;&gt;SSLOffloading SSL-Offloading, SSL Termination, Apache, Tomcat, mod_jk configuration, multiple vhosts,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #351c75; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14px; line-height: 17px;&quot;&gt;multiple SSL certificates one ip&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: -webkit-auto;&quot;&gt;
&lt;span style=&quot;font-size: 14px; line-height: 17px;&quot;&gt;&lt;span style=&quot;color: #351c75; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: -webkit-auto;&quot;&gt;
&lt;span style=&quot;font-size: 14px; line-height: 17px;&quot;&gt;&lt;span style=&quot;color: #351c75; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;strong style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Fronting Tomcat with Apache and mod_jk&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;br style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot; /&gt;
&lt;span style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot;&gt;Now, we will &amp;nbsp;try to front Tomcat with Apache and mod_jk. The target OS is Linux -OpenSuse12.1. The procedure might be slightly different between different Linux systems.&lt;/span&gt;&lt;br /&gt;
&lt;br style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot; /&gt;
&lt;br /&gt;
&lt;strong style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot;&gt;4.1 Install Apache2&lt;/strong&gt;&lt;br /&gt;
&lt;strong style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/strong&gt;
&lt;span style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot;&gt;Normmally Apache2 is included in OpenSuse12.1 package. If Apache is installed , there will be an apache2 folder under &quot;etc&quot;:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot;&gt;/etc/apache2/&lt;/span&gt;&lt;br /&gt;
&lt;br style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot; /&gt;
&lt;span style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot;&gt;When you can&#39;t find this folder, just try to install Apache2 and mod_jk with &quot;Yast&quot;.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot;&gt;After installation, start apache2:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/span&gt;


&lt;br /&gt;
&lt;div style=&quot;background-color: #fff7b2; border-radius: 6px 6px 6px 6px; border: 1px solid #BBBBBB; padding: 5px 10px 5px;&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Tahoma, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 21px;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Tahoma, Geneva, sans-serif;&quot;&gt;# &amp;nbsp;cd /etc/init.d&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Tahoma, Geneva, sans-serif;&quot;&gt;# ./apache2 start&lt;/span&gt;&lt;/div&gt;
&lt;br style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot; /&gt;
&lt;span style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot;&gt;Now when you type following URL in brower input &quot;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot;&gt;http://localhost&quot;, y&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot;&gt;ou will land on &amp;nbsp;the apache2 default page.&lt;/span&gt;&lt;br /&gt;
&lt;br style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot; /&gt;
&lt;span style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot;&gt;Just now we have also installed mod_jk ( Yast, search mod_jk, and install). But mod_jk is not loaded by apache via default.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;strong style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot;&gt;4.2 Configure Apache to load/use mod_jk&lt;/strong&gt;&lt;br /&gt;
&lt;strong style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/strong&gt;
&lt;span style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot;&gt;Configuration of Apache to use mod_jk, three things need to be done:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot;&gt;1. &amp;nbsp;Add a file &quot;mod_jk. conf&quot; to Apache. This will load mod_jk module and specify &quot;worker.properties&quot; file for mod_jk&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot;&gt;2. &amp;nbsp;Add a &quot;worker.properties&quot; file to configure mod_jk workers&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot;&gt;3. &amp;nbsp;Add vritual host which will use mod_jk&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;strong style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot;&gt;4.2.1 mod_jk.conf&lt;/strong&gt;&lt;br /&gt;
&lt;strong style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/strong&gt;
&lt;span style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot;&gt;Create a &quot;mod_jk.conf&quot; file in folder &quot;/etc/apache2/conf.d/&quot;.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot;&gt;You could also name the file &quot;sample.sss.conf&quot;, but important is, the file name must have &quot;.conf&quot; at the end, and the is put in &quot;conf.d&quot; folder. In this way, the file will be found and loaded by apache.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot;&gt;Content of the &quot;mod_jk.conf&quot; file:&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Tahoma, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 21px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fff7b2; border-radius: 6px 6px 6px 6px; border: 1px solid #BBBBBB; padding: 5px 10px 5px;&quot;&gt;
&lt;br /&gt;
&lt;br /&gt;
#### START mod_jk.conf&lt;br /&gt;
# mod_jk configuration for Apache&lt;br /&gt;
# Load mod_jk module&lt;br /&gt;
LoadModule jk_module /usr/lib/apache2/mod_jk.so&lt;br /&gt;
&lt;br /&gt;
# Tell Apache where to find workers.properties. We assume Tomcat runs on a differerent machine than # Apache. and put workers.properties file near to apache&lt;br /&gt;
JkWorkersFile /etc/apache2/conf.d/workers.properties&lt;br /&gt;
&lt;br /&gt;
# mod_jk log configuration&lt;br /&gt;
JkLogFile /var/log/apache2/mod_jk.log&lt;br /&gt;
JkLogLevel debug&lt;br /&gt;
jkLogStampFormat &quot;[%a %b %H:%M:%S %Y]&quot;&lt;br /&gt;
&lt;br /&gt;
# JkOptions indicate to send SSL KEY SIZE,&lt;br /&gt;
JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories&lt;br /&gt;
&lt;br /&gt;
# JkRequestLogFormat set the request format&lt;br /&gt;
JkRequestLogFormat &quot;%W %V %T&quot;&lt;br /&gt;
&lt;br /&gt;
# Send everything for context /TestWebSec20 to worker ajp13&lt;br /&gt;
JkMount /TestWebSec20 worker1&lt;br /&gt;
JkMount /TestWebSec20/* worker1&lt;br /&gt;
&lt;br /&gt;
# Send everything for context /sampple to worker ajp13&lt;br /&gt;
#JkMount /sample worker1&lt;br /&gt;
#JkMound /sample/* worker1&lt;br /&gt;
&lt;br /&gt;
##### END mod_jk.conf&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Tahoma, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 21px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Tahoma, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 21px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Tahoma, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 21px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;strong style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot;&gt;Explanation to the &quot;mod_jk.conf&quot; file&lt;/strong&gt;&lt;br /&gt;
&lt;strong style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/strong&gt;
&lt;span style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot;&gt;1.&amp;nbsp;LoadModule tells Apache to load &amp;nbsp;mod_jk module.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot;&gt;2.&amp;nbsp;JkWorkersFile specifies the worker file location. Workers file tells mod_jk, where to find the real&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot;&gt;&amp;nbsp; &amp;nbsp; application (i.e. ip and port of the Server / application).&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot;&gt;3.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot;&gt;JkMount, have 2 entries, one with another without &quot;*&quot;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;strong style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot;&gt;4.2.2 workers.properties file&lt;/strong&gt;&lt;br /&gt;
&lt;strong style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/strong&gt;
&lt;span style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot;&gt;Create a &quot;workers.properties&quot; file in conf.d folder with following content:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: #fff7b2; border-radius: 6px 6px 6px 6px; border: 1px solid #BBBBBB; padding: 5px 10px 5px;&quot;&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Tahoma, Geneva, sans-serif;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Tahoma, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 21px;&quot;&gt;##### SATART works.properties&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Tahoma, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 21px;&quot;&gt;# Define a worker named &quot;worker1&quot;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Tahoma, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 21px;&quot;&gt;# Several worker names are separated by &quot;,&quot;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Tahoma, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 21px;&quot;&gt;worker.list=worker1&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Tahoma, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 21px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Tahoma, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 21px;&quot;&gt;# Set properties for worker1 to use ajp13 protocol and run on port 8009&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Tahoma, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 21px;&quot;&gt;worker.worker1.type=ajp13&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Tahoma, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 21px;&quot;&gt;worker.worker1.host=localhost&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Tahoma, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 21px;&quot;&gt;worker.worker1.port=8009&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Tahoma, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 21px;&quot;&gt;worker.worker1.lbfactor=50&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Tahoma, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 21px;&quot;&gt;worker.worker1.cachesize=10&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Tahoma, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 21px;&quot;&gt;worker.worker1.cache_timeout=600&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Tahoma, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 21px;&quot;&gt;worker.worker1.socket_keepalive=1&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Tahoma, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 21px;&quot;&gt;worker.worker1.socket_timeout=300&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Tahoma, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 21px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Tahoma, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 21px;&quot;&gt;##### END works.properties&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;line-height: 21px;&quot;&gt;
&lt;span style=&quot;font-family: Tahoma, Geneva, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Tahoma, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 21px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Tahoma, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 21px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Tahoma, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 21px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;strong style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot;&gt;Explanation to the workers.properties file:&lt;/strong&gt;&lt;br /&gt;
&lt;strong style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/strong&gt;
&lt;span style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot;&gt;1. We just configured one worker. In case of more workers, worker names are separated by &quot;,&quot;.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot;&gt;&amp;nbsp; &amp;nbsp;For example:&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot;&gt;&amp;nbsp; &amp;nbsp;worker.list=worker1, worker2&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot;&gt;&amp;nbsp;2. Workers are configured to use / communicate to certain host and port using &quot;ajp&quot; protocol.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;When a request comes to apache /mod_jk &amp;nbsp;via http or https, mod_jk will redirect the request &amp;nbsp;NOT to &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;HTTP or HTTPS ports, but to AJP ports.(We will configure Tomcat to use AJP connector).&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;strong style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot;&gt;4.2.3 Create virtual host and configure the virtual host to use mod_jk&lt;/strong&gt;&lt;br /&gt;
&lt;strong style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/strong&gt;
&lt;span style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot;&gt;Assume we will configure a new virtual host &quot;ahahacom&quot;, t&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot;&gt;wo steps are needed:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;strong style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot;&gt;&amp;nbsp;&lt;/strong&gt;&lt;strong style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot;&gt;&amp;nbsp;Step 1&lt;/strong&gt;&lt;span style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot;&gt;.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot;&gt;&amp;nbsp; &amp;nbsp; Add virtual host to &quot;hosts&quot; file. E&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot;&gt;dit &quot;hosts&quot; file under &quot;/etc/&quot;, add following lines:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot;&gt;&amp;nbsp; &amp;nbsp;127.0.0.1&amp;nbsp;&lt;/span&gt;&lt;strong style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot;&gt;&amp;nbsp;ahaha&lt;/strong&gt;&lt;span style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot;&gt;.com www.ahaha.com&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;b&gt;Step 2&lt;/b&gt;.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot;&gt;&amp;nbsp; &amp;nbsp;Create a vhost.conf file under &quot;/etc/apache2/vhost.d/&quot; with following content&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot;&gt;

&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;div style=&quot;background-color: #fff7b2; border-radius: 6px 6px 6px 6px; border: 1px solid #BBBBBB; padding: 5px 10px 5px;&quot;&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Tahoma, Geneva, sans-serif;&quot;&gt;#### STAART vhost.conf&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Tahoma, Geneva, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;lt;VirtualHost *:80&amp;gt; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Tahoma, Geneva, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ServerAdmin info@ahaha.com&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Tahoma, Geneva, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ServerName ahaha.com&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Tahoma, Geneva, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Tahoma, Geneva, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; # DocumentRoot: The directory out of which you will serve your&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Tahoma, Geneva, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; # documents. By default, all requests are taken from this directory, but&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Tahoma, Geneva, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; # symbolic links and aliases may be used to point to other locations.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Tahoma, Geneva, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DocumentRoot /srv/www/vhosts/ahaha.com&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Tahoma, Geneva, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Tahoma, Geneva, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; # if not specified, the global error log is used&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Tahoma, Geneva, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ErrorLog /var/log/apache2/ahaha.com_error.log&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Tahoma, Geneva, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; CustomLog /var/log/apache2/ahaha.com_access.log combined&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Tahoma, Geneva, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Tahoma, Geneva, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; JkMount / worker1&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Tahoma, Geneva, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; JkMount /* worker1 &amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Tahoma, Geneva, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;lt;/VirtualHost&amp;gt; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Tahoma, Geneva, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp;#### END vhost.conf&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Tahoma, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 21px;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Tahoma, Geneva, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot;&gt;

&lt;/span&gt;&lt;br /&gt;
&lt;br style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot; /&gt;
&lt;span style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot;&gt;With vhost configured, the &quot;TestWebSec20&quot; web application could be accessed &quot;later&quot; using following URL:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot;&gt;http://www.ahaha.com/TestWebSec20&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;br style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot; /&gt;
&lt;span style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot;&gt;Now restart apache:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot;&gt;./apache2 restart&lt;/span&gt;&lt;br /&gt;
&lt;br style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot; /&gt;
&lt;span style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot;&gt;Try accessing the &quot;http://www.ahaha.com/TestWebSec20/HalloNormal&quot; with your browser.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot;&gt;The browser will show an error &quot;Service Temporarily Unavailable&quot;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot;&gt;Check the mod_jk error log we just configured &quot;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot;&gt;/var/log/apache2/ahaha.com_error.log&quot;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot;&gt;You will see a new error log entry like this:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: #fff7b2; border-radius: 6px 6px 6px 6px; border: 1px solid #BBBBBB; padding: 5px 10px 5px;&quot;&gt;
&lt;span style=&quot;background-color: white; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;background-color: white; text-align: left;&quot;&gt;&lt;span style=&quot;font-family: Tahoma, Geneva, sans-serif;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: white; text-align: left;&quot;&gt;&lt;span style=&quot;font-family: Tahoma, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 21px;&quot;&gt;[Mon Sep 03 20:36:32 2012] [error] [client 127.0.0.1] (2)No such file or directory: cannot access type map file: HTTP_SERVICE_UNAVAILABLE.html.var&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;background-color: white; text-align: left;&quot;&gt;&lt;span style=&quot;font-family: Tahoma, Geneva, sans-serif;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Tahoma, Geneva, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 21px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot; /&gt;
&lt;span style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot;&gt;When you see this error, your virtual host configuration and &amp;nbsp;mod_jk configuration at Apache/mod_jk side are correct!&lt;/span&gt;&lt;br /&gt;
&lt;br style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot; /&gt;
&lt;span style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot;&gt;This above error says that mod_jk can not find the worker, i.e. it can not find the Tomcat server. Remember, mod_jk tries to talk to Tomcat with &quot;ajp&quot; protocol, to certain host name and port (as configured in &quot;workers.properties&quot;), so the question is now, does Tomcat know about the &quot;ajp&quot; thing?&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot;&gt;No not yet!&lt;/span&gt;&lt;br /&gt;
&lt;br style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot; /&gt;
&lt;strong style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-align: left;&quot;&gt;Configure Tomcat to communicate with mod_jk, using AJP&lt;/strong&gt;&lt;br /&gt;
&lt;strong style=&quot;background-color: white; color: #868686; font-family: Tahoma, Geneva, sans-serif; font-size: 14px; line-height: 21px; text-align: left;&quot;&gt;&lt;a href=&quot;http://milestonenext.blogspot.de/2012/09/ssl-offloading-with-modjk-part-5.html&quot;&gt;SSL Offloading with mod_jk part 5&lt;/a&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;b style=&quot;text-align: left;&quot;&gt;&lt;a href=&quot;http://milestonenext.blogspot.de/2012/09/ssl-offloading-with-modjk-part-1.html&quot;&gt;part1&amp;nbsp;&lt;/a&gt;&lt;/b&gt;&lt;a href=&quot;http://milestonenext.blogspot.de/2012/09/ssl-offloading-with-modjk-part-2.html&quot; style=&quot;font-weight: bold; text-align: left;&quot;&gt;part2&lt;/a&gt;&lt;b style=&quot;text-align: left;&quot;&gt;&amp;nbsp;&lt;/b&gt;&lt;b style=&quot;color: #868686; font-size: 14px; line-height: 21px;&quot;&gt;&lt;a href=&quot;http://milestonenext.blogspot.de/2012/09/ssl-offloading-with-modjk-part-3.html&quot;&gt;part3&lt;/a&gt;&amp;nbsp;&lt;a href=&quot;http://milestonenext.blogspot.de/2012/09/ssl-offloading-with-modjk-part-6.html&quot;&gt;part6&lt;/a&gt;&lt;/b&gt;</content><link rel='replies' type='application/atom+xml' href='http://milestonenext.blogspot.com/feeds/6672127350730269879/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://milestonenext.blogspot.com/2012/09/ssl-offloading-with-modjk-part-4.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7515187228721563448/posts/default/6672127350730269879'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7515187228721563448/posts/default/6672127350730269879'/><link rel='alternate' type='text/html' href='http://milestonenext.blogspot.com/2012/09/ssl-offloading-with-modjk-part-4.html' title='SSL Offloading with mod_jk part 4'/><author><name>Beijing Beijing</name><uri>http://www.blogger.com/profile/12013373726184997758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='28' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTm1nk7ZqbPTfBofk6dIg7Zfx820i-FNuXqGbSlZNbRw5-RPJuqgDFNoW_zdgJCMCYj6R5cTGNgNKmwTzeDsEm2EHkqni9ywIanrN-PIRd4Z4yZXUOHhC12zzDid1A1w/s220/profile.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7515187228721563448.post-8916185312652527344</id><published>2012-09-09T09:54:00.002-07:00</published><updated>2013-01-26T23:45:03.086-08:00</updated><title type='text'>SSL Offloading with mod_jk part 3</title><content type='html'>&lt;div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;div style=&quot;background-color: white; font-family: Lato, arial, sans-serif; line-height: 24px;&quot;&gt;
&lt;div style=&quot;margin-left: 10px; margin-right: 10px;&quot;&gt;
Document &amp;nbsp;Version 1.0&lt;/div&gt;
&lt;div class=&quot;releaseinfo&quot; style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; margin-left: 10px; margin-right: 10px;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;span style=&quot;background-color: white; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;&amp;nbsp; &amp;nbsp;Copyright © 2012-2013 beijing.beijing.012@gmail.com&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; color: #351c75; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14px; line-height: 17px; text-align: -webkit-auto;&quot;&gt;&lt;b&gt;Keywords:&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #351c75; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14px; line-height: 17px; text-align: -webkit-auto;&quot;&gt;SSLOffloading SSL-Offloading, SSL Termination, Apache, Tomcat, mod_jk configuration, multiple vhosts,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #351c75; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14px; line-height: 17px; text-align: -webkit-auto;&quot;&gt;multiple SSL certificates one ip&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: -webkit-auto;&quot;&gt;
&lt;span style=&quot;color: #351c75; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 17px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: -webkit-auto;&quot;&gt;
&lt;span style=&quot;color: #351c75; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 17px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px;&quot;&gt;Till now we have successfuly protected our TestWevSec20 Web application with SSL.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px;&quot;&gt;The 2 servlets are accessed via following links:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;a href=&quot;https://localhost:8443/TestWebSec20/secure/HalloSec&quot; style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-decoration: none;&quot; title=&quot;Links active once published&quot;&gt;&lt;span style=&quot;color: #444444;&quot;&gt;http://localhost:8080/TestWebSec20/Hallo&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Tahoma, Geneva, sans-serif; line-height: 21px;&quot;&gt;Normal&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px;&quot;&gt;And&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;a href=&quot;https://localhost:8443/TestWebSec20/secure/HalloSec&quot; style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-decoration: none;&quot; title=&quot;Links active once published&quot;&gt;&lt;span style=&quot;color: #444444;&quot;&gt;http://localhost:8080/TestWebSec20/secure/HalloSec&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;background-color: white; color: black; font-family: Tahoma, Geneva, sans-serif; line-height: 21px;&quot;&gt;, which is redirected to&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;a href=&quot;https://localhost:8443/TestWebSec20/secure/HalloSec&quot; style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-decoration: none;&quot; title=&quot;Links active once published&quot;&gt;&lt;span style=&quot;color: #444444;&quot;&gt;https://localhost:8443/TestWebSec20/secure/HalloSec&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px;&quot; /&gt;
&lt;span style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px;&quot;&gt;However, for a real web page, we expect to visit the page via a &quot;real&quot; domain name like &quot;www.sample.com&quot;, and NOT localhost. We also don&#39;t want browser show http/https ports to user.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px;&quot;&gt;So we need to hide the application behinde some proxy/load_balancer... what ever, make&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px;&quot;&gt;&amp;nbsp;the&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px;&quot;&gt;&quot;TestWevSec20&quot; to be accessed using following URLs:&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;background-color: white; color: #444444; font-family: Tahoma, Geneva, sans-serif; line-height: 21px;&quot;&gt;http://www.ahaha.com/&lt;/span&gt;&lt;a href=&quot;https://localhost:8443/TestWebSec20/secure/HalloSec&quot; style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-decoration: none;&quot; title=&quot;Links active once published&quot;&gt;&lt;span style=&quot;color: #444444;&quot;&gt;TestWebSec20/Hallo&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Tahoma, Geneva, sans-serif; line-height: 21px;&quot;&gt;Normal&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px;&quot;&gt;And&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px;&quot;&gt;&lt;span style=&quot;color: #444444;&quot;&gt;http://www.ahaha.com/&lt;/span&gt;&lt;/span&gt;&lt;a href=&quot;https://localhost:8443/TestWebSec20/secure/HalloSec&quot; style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; line-height: 21px; text-decoration: none;&quot; title=&quot;Links active once published&quot;&gt;&lt;span style=&quot;color: #444444;&quot;&gt;TestWebSec20/secure/Hallo&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Tahoma, Geneva, sans-serif; line-height: 21px;&quot;&gt;Sec&lt;/span&gt;&lt;br /&gt;
&lt;strong style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; font-size: 14px; line-height: 21px;&quot;&gt;&lt;br /&gt;For this purpose, we need to front Tomcat with Apache and mod_jk&lt;/strong&gt;&lt;br /&gt;
&lt;strong style=&quot;background-color: white; font-family: Tahoma, Geneva, sans-serif; font-size: 14px; line-height: 21px;&quot;&gt;&lt;br /&gt;&lt;/strong&gt;
&lt;strong style=&quot;background-color: white; color: #868686; font-family: Tahoma, Geneva, sans-serif; font-size: 14px; line-height: 21px;&quot;&gt;&lt;a href=&quot;http://milestonenext.blogspot.de/2012/09/ssl-offloading-with-modjk-part-4.html&quot;&gt;SSL Offloading with mod_jk part 4&lt;/a&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;b&gt;&lt;a href=&quot;http://milestonenext.blogspot.de/2012/09/ssl-offloading-with-modjk-part-1.html&quot;&gt;part1&amp;nbsp;&lt;/a&gt;&lt;/b&gt;&lt;a href=&quot;http://milestonenext.blogspot.de/2012/09/ssl-offloading-with-modjk-part-2.html&quot; style=&quot;font-weight: bold;&quot;&gt;part2&lt;/a&gt;&lt;b&gt;&amp;nbsp;&lt;/b&gt;&lt;b style=&quot;color: #868686; font-size: 14px; line-height: 21px; text-align: -webkit-auto;&quot;&gt;&lt;a href=&quot;http://milestonenext.blogspot.de/2012/09/ssl-offloading-with-modjk-part-5.html&quot;&gt;part5&lt;/a&gt;&amp;nbsp;&lt;a href=&quot;http://milestonenext.blogspot.de/2012/09/ssl-offloading-with-modjk-part-6.html&quot;&gt;part6&lt;/a&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://milestonenext.blogspot.com/feeds/8916185312652527344/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://milestonenext.blogspot.com/2012/09/ssl-offloading-with-modjk-part-3.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7515187228721563448/posts/default/8916185312652527344'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7515187228721563448/posts/default/8916185312652527344'/><link rel='alternate' type='text/html' href='http://milestonenext.blogspot.com/2012/09/ssl-offloading-with-modjk-part-3.html' title='SSL Offloading with mod_jk part 3'/><author><name>Beijing Beijing</name><uri>http://www.blogger.com/profile/12013373726184997758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='28' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTm1nk7ZqbPTfBofk6dIg7Zfx820i-FNuXqGbSlZNbRw5-RPJuqgDFNoW_zdgJCMCYj6R5cTGNgNKmwTzeDsEm2EHkqni9ywIanrN-PIRd4Z4yZXUOHhC12zzDid1A1w/s220/profile.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7515187228721563448.post-9139005960532158436</id><published>2012-09-09T09:33:00.001-07:00</published><updated>2013-01-26T23:44:46.209-08:00</updated><title type='text'>SSL Offloading with mod_jk part 2</title><content type='html'>&lt;br /&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: Lato, arial, sans-serif; line-height: 24px;&quot;&gt;
&lt;div style=&quot;margin-left: 10px; margin-right: 10px;&quot;&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;Document &amp;nbsp;Version 1.0&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;releaseinfo&quot; style=&quot;font-family: Arial, Helvetica, Geneva, sans-serif; margin-left: 10px; margin-right: 10px;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div class=&quot;copyright&quot; style=&quot;margin-left: 10px; margin-right: 10px;&quot;&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: Arial, Helvetica, Geneva, sans-serif; line-height: 24px;&quot;&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;Copyright © 2012-2013 beijing.beijing.012@gmail.com&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;span style=&quot;background-color: white; color: #351c75; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14px; line-height: 17px;&quot;&gt;&lt;b&gt;Keywords:&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #351c75; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14px; line-height: 17px;&quot;&gt;SSLOffloading SSL-Offloading, SSL Termination, Apache, Tomcat, mod_jk configuration, multiple vhosts, &lt;/span&gt;&lt;span style=&quot;color: #351c75; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14px; line-height: 17px;&quot;&gt;multiple SSL certificates one ip&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #351c75; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 17px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: #351c75; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 17px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;In part1, we have created a sample web application TestWebSec20, and could successfully access the servlet &quot;HalloNormal&quot;.&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;paragraph&quot; style=&quot;margin: 0px; padding: 0.5em 0px; text-align: left;&quot;&gt;
&lt;div style=&quot;background-color: white; line-height: 1.5;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;Now we will try to access the &quot;HalloSec&quot; servlet. Since the &quot;HalloSec&quot; servlet is declared to be accessd via URL pattern &quot;/secure/HalloSec&quot;. So we put following URL in brower input:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fff7b2; border-bottom-left-radius: 6px; border-bottom-right-radius: 6px; border-top-left-radius: 6px; border-top-right-radius: 6px; border: 1px solid rgb(187, 187, 187); padding: 5px 10px;&quot;&gt;
&lt;span style=&quot;line-height: 24px;&quot;&gt;http://localhost:8080/TestWebSec20/HalloSec&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; line-height: 1.5;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;

&lt;span style=&quot;font-family: inherit;&quot;&gt;We get error like &quot;..can not connect to localhost...&quot;. &amp;nbsp;And when we have a look &amp;nbsp;at Tomcat&#39;s log, we will see that Tomcat has logged a fatal error at start (and we ignored it in part1):&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white;&quot;&gt;
&lt;div style=&quot;background-color: #fff7b2; border-bottom-left-radius: 6px; border-bottom-right-radius: 6px; border-top-left-radius: 6px; border-top-right-radius: 6px; border: 1px solid rgb(187, 187, 187); padding: 5px 10px;&quot;&gt;
&lt;span style=&quot;line-height: 24px;&quot;&gt;java.io.FileNotFoundException: /home/xx/.keystore (No such file or directory)&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;background-color: white; line-height: 1.5;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;

&lt;span style=&quot;font-family: inherit;&quot;&gt;This is because, Tomcat detected that a resource is protected with HTTPS, so it tries to locad the SSL keystore (keystore is needed by JAAS) in the users home location (Linux). But for the default Tomcat instllation there is no keystore file available yet.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; font-size: 14px; line-height: 1.5;&quot;&gt;
&lt;span style=&quot;color: #868686; font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;strong&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Create and configure keystore for Tomcat&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; font-size: 14px; line-height: 1.5;&quot;&gt;
&lt;strong&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; font-size: 14px; line-height: 1.5;&quot;&gt;
&lt;strong&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Creating keystore&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; font-size: 14px; line-height: 1.5;&quot;&gt;
&lt;strong&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; line-height: 1.5;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;In standard JDK package there is &quot;keytool&quot; under JAVA_HOME/bin/. This keytool could be used to create a keystore for Tomcat/JAAS. Run following conmand:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fff7b2; border-bottom-left-radius: 6px; border-bottom-right-radius: 6px; border-top-left-radius: 6px; border-top-right-radius: 6px; border: 1px solid rgb(187, 187, 187); padding: 5px 10px;&quot;&gt;
&lt;span style=&quot;font-size: 14px; line-height: 21px;&quot;&gt;keytool -genkey -alias localhost -keyalg RSA -keystore /opt/local_keystore/localhost_keystore&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; font-size: 14px; line-height: 1.5;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; line-height: 1.5;&quot;&gt;
&lt;span style=&quot;font-family: inherit; font-size: 14px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;Now a keystore file named &quot;localhost_keystore&quot; is created. (with &amp;nbsp;password &quot;test1234&quot;, we will need the password to configure Tomcat SSL)&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; line-height: 1.5;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;Here instead of using default&amp;nbsp;&amp;nbsp;&quot;.keystore&quot; location, we used customer keystore location and keystore name. Now we need to configure Tomcat&#39;s ssl connector in server.xml:&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #fff7b2; border-radius: 6px 6px 6px 6px; border: 1px solid #BBBBBB; padding: 5px 10px 5px;&quot;&gt;
&lt;br /&gt;
...&lt;br /&gt;
&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;lt;Connector&lt;/span&gt; &lt;span style=&quot;color: #660000;&quot;&gt;port=&lt;/span&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;&quot;8443&quot;&lt;/span&gt; &lt;span style=&quot;color: #660000;&quot;&gt;protocol=&lt;/span&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;&quot;HTTP/1.1&quot;&lt;/span&gt; &lt;span style=&quot;color: #660000;&quot;&gt;SSLEnabled=&lt;/span&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;&quot;true&quot;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: #660000;&quot;&gt;maxThreads=&lt;/span&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;&quot;150&quot;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #660000;&quot;&gt;&amp;nbsp;clientAuth=&lt;/span&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;&quot;false&quot;&lt;/span&gt; &lt;span style=&quot;color: #660000;&quot;&gt;sslProtocol=&lt;/span&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;&quot;TLS&quot;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: #660000;&quot;&gt; keystoreFile&lt;/span&gt;=&lt;span style=&quot;color: #0b5394;&quot;&gt;&quot;/opt/local_keystore/localhost_keystore&quot; keystorePass=&quot;test1234&quot;&lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;
...&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;background-color: white; clear: both; color: #868686; font-size: 14px; line-height: 1.5; text-align: left;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;background-color: white; clear: both; color: #868686; font-size: 14px; line-height: 1.5; text-align: left;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;background-color: white; clear: both; color: #868686; line-height: 1.5; text-align: left;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;Start Tomcat and try accessing the secured servlet again:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;background-color: white; clear: both; font-size: 14px; line-height: 1.5; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;background-color: white; clear: both; color: #868686; font-size: 14px; line-height: 1.5; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-25klxE1mcspJ4ca_Eam-FRK_AhTrlJMuZI7kimk3bFQNgNanEiRM6mK5Kq_hJbpJzRZ4RYf6pzPQAbMclyDc6SeBuTG9C7iTFPJF6UoFBCHRiDKmPM9mOI0Qn03e3T25PY2pvBfijXqf/s1600/ssl_p3.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-25klxE1mcspJ4ca_Eam-FRK_AhTrlJMuZI7kimk3bFQNgNanEiRM6mK5Kq_hJbpJzRZ4RYf6pzPQAbMclyDc6SeBuTG9C7iTFPJF6UoFBCHRiDKmPM9mOI0Qn03e3T25PY2pvBfijXqf/s1600/ssl_p3.jpg&quot; height=&quot;214&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #868686; font-size: 14px; line-height: 1.5;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #868686; font-size: 14px; line-height: 1.5;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;span style=&quot;background-color: white; font-family: inherit; line-height: 21px; text-align: left;&quot;&gt;Browser is redirected to HTTPS, and we need to confirm the SSL certificate:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;Click the left side area of browser input to show the certificate. &amp;nbsp;It is the certificate we just created! Successful!!&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #999999; font-family: inherit;&quot;&gt;&lt;b&gt;&lt;a href=&quot;http://milestonenext.blogspot.de/2012/09/ssl-offloading-with-modjk-part-3.html&quot;&gt;SSL Offloading with mod_jk part 3&lt;/a&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #999999; font-family: inherit;&quot;&gt;&lt;b&gt;&lt;a href=&quot;http://milestonenext.blogspot.de/2012/09/ssl-offloading-with-modjk-part-1.html&quot;&gt;part1&lt;/a&gt;&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;b style=&quot;color: #868686; font-size: 14px; line-height: 21px;&quot;&gt;&lt;a href=&quot;http://milestonenext.blogspot.de/2012/09/ssl-offloading-with-modjk-part-4.html&quot;&gt;part4&lt;/a&gt;&amp;nbsp;&lt;a href=&quot;http://milestonenext.blogspot.de/2012/09/ssl-offloading-with-modjk-part-5.html&quot;&gt;part5&lt;/a&gt;&amp;nbsp;&lt;a href=&quot;http://milestonenext.blogspot.de/2012/09/ssl-offloading-with-modjk-part-6.html&quot;&gt;part6&lt;/a&gt;&lt;/b&gt;</content><link rel='replies' type='application/atom+xml' href='http://milestonenext.blogspot.com/feeds/9139005960532158436/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://milestonenext.blogspot.com/2012/09/ssl-offloading-with-modjk-part-2.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7515187228721563448/posts/default/9139005960532158436'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7515187228721563448/posts/default/9139005960532158436'/><link rel='alternate' type='text/html' href='http://milestonenext.blogspot.com/2012/09/ssl-offloading-with-modjk-part-2.html' title='SSL Offloading with mod_jk part 2'/><author><name>Beijing Beijing</name><uri>http://www.blogger.com/profile/12013373726184997758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='28' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTm1nk7ZqbPTfBofk6dIg7Zfx820i-FNuXqGbSlZNbRw5-RPJuqgDFNoW_zdgJCMCYj6R5cTGNgNKmwTzeDsEm2EHkqni9ywIanrN-PIRd4Z4yZXUOHhC12zzDid1A1w/s220/profile.png'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-25klxE1mcspJ4ca_Eam-FRK_AhTrlJMuZI7kimk3bFQNgNanEiRM6mK5Kq_hJbpJzRZ4RYf6pzPQAbMclyDc6SeBuTG9C7iTFPJF6UoFBCHRiDKmPM9mOI0Qn03e3T25PY2pvBfijXqf/s72-c/ssl_p3.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7515187228721563448.post-4427862091803634831</id><published>2012-09-08T08:48:00.004-07:00</published><updated>2013-01-26T23:44:26.583-08:00</updated><title type='text'>SSL Offloading with mod_jk part 1</title><content type='html'>&lt;div style=&quot;background-color: white; font-family: Lato, arial, sans-serif; line-height: 24px;&quot;&gt;
&lt;div style=&quot;margin-left: 10px; margin-right: 10px;&quot;&gt;
&lt;div style=&quot;color: #222222; font-size: 14px;&quot;&gt;
&lt;span style=&quot;background-color: white; color: #666666; font-size: xx-small;&quot;&gt;Document &amp;nbsp;Version 1.0&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;releaseinfo&quot; style=&quot;color: #222222; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: 14px; margin-left: 10px; margin-right: 10px;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;span style=&quot;background-color: white; color: #666666; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: xx-small; line-height: 24px;&quot;&gt;&amp;nbsp; &amp;nbsp;Copyright © 2012-2013 beijing.beijing.012@gmail.com&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #351c75; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14px; line-height: 17px;&quot;&gt;&lt;b&gt;Keywords:&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #351c75; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14px; line-height: 17px;&quot;&gt;SSLOffloading SSL-Offloading, SSL Termination, Apache, Tomcat, mod_jk configuration, multiple vhosts, SSL certificate,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #351c75; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 17px;&quot;&gt;multiple SSL certificates one ip&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #351c75; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14px; line-height: 17px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: #b2ab66; border-bottom-left-radius: 2px; border-bottom-right-radius: 2px; border-top-left-radius: 2px; border-top-right-radius: 2px; border: 0px none; padding: 5px 10px;&quot;&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;Table of Contents&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;Part 1 : &amp;nbsp;&lt;span style=&quot;line-height: 21px; text-align: left;&quot;&gt;Create a simple servlet based Web Application &quot;TestWebSec20&quot;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;line-height: 21px; text-align: left;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1.1 &amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b style=&quot;line-height: 21px; text-align: left;&quot;&gt;System Architect&lt;/b&gt;&lt;br /&gt;
&lt;b style=&quot;line-height: 21px; text-align: left;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1.2&amp;nbsp;&lt;/b&gt;&lt;b style=&quot;color: #444444; line-height: 21px; text-align: left;&quot;&gt;&amp;nbsp;&lt;/b&gt;&lt;b style=&quot;line-height: 21px; text-align: left;&quot;&gt;Technical Infrastructure&lt;/b&gt;&lt;br /&gt;
&lt;b style=&quot;line-height: 21px; text-align: left;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1.3 &amp;nbsp;&quot;HalloNormal&quot; Servlet&lt;/b&gt;&lt;br /&gt;
&lt;b style=&quot;line-height: 21px; text-align: left;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1.4 &amp;nbsp; web.xml&lt;/b&gt;&lt;br /&gt;
&lt;b style=&quot;line-height: 21px; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;Part 2 : &amp;nbsp;&lt;/b&gt;&lt;strong&gt;Create and configure keystore for Tomcat&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;
&lt;b&gt;Part 3 : &amp;nbsp;&lt;/b&gt;&lt;strong&gt;Run &quot;HalloNormal&quot; and &quot;HalloSec&quot; Web Application&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;
&lt;strong&gt;Part 4 : Fronting Tomcat with Apache and mod_jk&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;4.1 &amp;nbsp; &amp;nbsp;Install Apache2&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;4.2 &amp;nbsp; &amp;nbsp;Configure Apache to load / use mod_jk&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;4.2.1 mod_jk.conf &amp;nbsp;file&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;4.2.2 workers.properties file&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;4.2.3 Create virtual hosts and configure the virtual host to use mod_jk&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;
&lt;strong&gt;Part 5 : SSL port problem&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;
&lt;strong&gt;Part 6 : Configure Tomcat to accept SSL handling of mod_jk&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;6.1 Generate a self-signed SSL certificate&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;6.2 Configure Apache virtual host for SSL&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;6.3 Configure Tomcat to accept SSL handling of mod_jk&lt;/strong&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;span style=&quot;background-color: white; color: #444444; font-family: inherit; line-height: 21px; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; color: #444444; font-family: inherit; line-height: 21px; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; color: #444444; font-family: inherit; line-height: 21px; text-align: left;&quot;&gt;There seems alway &amp;nbsp;to be a gap between the people who write applications, and those to take care of the running applications, i.e. the operation guys.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #444444; font-family: inherit; line-height: 21px; text-align: left;&quot;&gt;It was surprising to find, how things could be misunderstand, even done wrong, because lack of the whole understanding of both areas, concering topics like applicaiton load balancing, &amp;nbsp;scaling, failover, security, SSL ...&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: inherit;&quot;&gt;&lt;span style=&quot;background-color: white; line-height: 21px; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; line-height: 21px; text-align: left;&quot;&gt;Recently I had the chance again in a project to review the system architecture and security concept, and this made me to decide to &quot;document&quot; some of my experinence and considerations, practices ...., &amp;nbsp;not only about this project, but also back to the years, in the hope to help those who just looking for a solution to some problmes.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; font-family: inherit; line-height: 21px; text-align: left;&quot;&gt;&lt;b&gt;Lets begin with SSL Termination / &amp;nbsp;SSL Offloading, and this is the part 1/7&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: inherit;&quot;&gt;&lt;span style=&quot;background-color: white; line-height: 21px; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; line-height: 21px; text-align: left;&quot;&gt;With a simple servlet based Web Applicaion, we will trying to make it run like a real world web application, which has its own domain name(s), which run behind a locad balancer, which has resources protected by SSL, and SSL handled &amp;nbsp;by SSL offloading ...&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: inherit;&quot;&gt;&lt;span style=&quot;background-color: white; line-height: 21px; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; line-height: 21px; text-align: left;&quot;&gt;&lt;b&gt;1.1 System Architect:&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: inherit;&quot;&gt;&lt;span style=&quot;background-color: white; line-height: 21px; text-align: left;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjr9PEAH9ZiKvQuj-TWsTCWdpAWfikPBmBtfGyqmf43uqSSHty2hjR2e23yTEa3Tzt50plPoy3Cjsrl7B-LsZSFyEhRNkxcrDHItJuBfAEqqORzeGV9L6sDRFNQ2h4Qb3wv6OcrQ9xBTub8/s1600/ssl_p1_arch.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjr9PEAH9ZiKvQuj-TWsTCWdpAWfikPBmBtfGyqmf43uqSSHty2hjR2e23yTEa3Tzt50plPoy3Cjsrl7B-LsZSFyEhRNkxcrDHItJuBfAEqqORzeGV9L6sDRFNQ2h4Qb3wv6OcrQ9xBTub8/s320/ssl_p1_arch.png&quot; height=&quot;136&quot; width=&quot;320&quot; /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;strong style=&quot;background-color: white; line-height: 21px; text-align: left;&quot;&gt;&lt;span style=&quot;color: #444444; font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/strong&gt;
&lt;strong style=&quot;background-color: white; line-height: 21px; text-align: left;&quot;&gt;&lt;span style=&quot;color: #444444; font-family: inherit;&quot;&gt;When we finished, we will have:&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;strong style=&quot;background-color: white; line-height: 21px; text-align: left;&quot;&gt;&lt;span style=&quot;color: #444444; font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/strong&gt;
&lt;span style=&quot;background-color: white; color: #444444; font-family: inherit; line-height: 21px; text-align: left;&quot;&gt;1. A simple Web application with partially ssl protected resources&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #444444; font-family: inherit; line-height: 21px; text-align: left;&quot;&gt;2. Web Applicaiton running in Tomcat, and Tomcat fronted with Apache + mod_jk&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #444444; font-family: inherit; line-height: 21px; text-align: left;&quot;&gt;3. Web Applicaiton &amp;nbsp;being accessed using &amp;nbsp;&quot;virtual host&quot;, &amp;nbsp;with its own SSL certificate&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #444444; font-family: inherit; line-height: 21px; text-align: left;&quot;&gt;4. Multiple &quot;virtual host&quot; addressing the same Web Application, each having it own certificate&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #444444; font-family: inherit; line-height: 21px; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #444444; font-family: inherit;&quot;&gt;&lt;span style=&quot;background-color: white; line-height: 21px; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; line-height: 21px; text-align: left;&quot;&gt;&lt;b&gt;1.2 The necessary technical infrastructure:&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: inherit;&quot;&gt;&lt;span style=&quot;background-color: white; line-height: 21px; text-align: left;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; color: #444444; font-family: inherit; line-height: 21px; text-align: left;&quot;&gt;1. Linux (openSuse 12.1) with Apache2 installed&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #444444; font-family: inherit; line-height: 21px; text-align: left;&quot;&gt;2. Tomcat (7.x)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #444444; font-family: inherit; line-height: 21px; text-align: left;&quot;&gt;3. Eclispe IDE for Java&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: inherit;&quot;&gt;&lt;span style=&quot;background-color: white; line-height: 21px; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;color: #444444; font-family: inherit; line-height: 21px;&quot;&gt;&lt;b&gt;Part 1 : Create a simple servlet based Web Application &quot;TestWebSec20&quot;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: inherit; line-height: 21px;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;background-color: white; color: #444444; font-family: inherit; line-height: 21px;&quot;&gt;We will create a servlet based Web Application called &quot;TestWebSec20&quot; with Eclipse IDE.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #444444; font-family: inherit; line-height: 21px;&quot;&gt;TestWebSec20 Web Application has 2 servlets:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #444444; font-family: inherit; line-height: 21px;&quot;&gt;&amp;nbsp;&quot;HalloNormal&quot; servlet&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #444444; font-family: inherit; line-height: 21px;&quot;&gt;&amp;nbsp; &quot;HalloSec&quot; servlet. &quot;HalloNormal&quot; will be protected with SSL.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #444444; font-family: inherit; line-height: 21px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: inherit; line-height: 21px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;strong style=&quot;background-color: white; line-height: 21px;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;1.3 &quot;HalloNormal&quot; servlet:&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;strong style=&quot;background-color: white; font-size: 14px; line-height: 21px;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: #fff7b2; border-radius: 6px 6px 6px 6px; border: 1px solid #BBBBBB; padding: 5px 10px 5px;&quot;&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #660000;&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt; java.io.IOException;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #660000;&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt; java.io.PrintWriter;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #660000;&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt; javax.servlet.ServletException;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #660000;&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt; javax.servlet.http.HttpServlet;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #660000;&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt; javax.servlet.http.HttpServletRequest;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #660000;&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt; javax.servlet.http.HttpServletResponse;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #0b5394;&quot;&gt;/**&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0b5394;&quot;&gt;&amp;nbsp;* Servlet implementation class HalloSec&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0b5394;&quot;&gt;&amp;nbsp;*/&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #660000;&quot;&gt;public class&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt; HalloSec&lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt; extends&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt; HttpServlet {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt; private static final&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt; long serialVersionUID = 1L;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt; /**&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0b5394;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;* @see HttpServlet#HttpServlet()&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0b5394;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;*/&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt; HalloSec() {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt; super&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;();&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt; // TODO Auto-generated constructor stub&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;&amp;nbsp; /**&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0b5394;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;* @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0b5394;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;*/&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;protected void&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt; doGet(HttpServletRequest request, HttpServletResponse response) &lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;throws&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt; &amp;nbsp; &amp;nbsp; ServletException, IOException {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; doPost(request, response);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt; /**&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0b5394;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;* @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0b5394;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;*/&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;protected void&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt; doPost(HttpServletRequest request, HttpServletResponse response) &lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;throws&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt; ServletException, IOException {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0c343d;&quot;&gt; &amp;nbsp;// TODO Auto-generated method stub&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; PrintWriter writer =response.getWriter();&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; writer.write(&lt;/span&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;&quot;Hallo Sec&quot;&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; writer.flush();&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; writer.close();&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;background-color: white; color: #868686; font-size: 14px; line-height: 21px;&quot;&gt;
&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;background-color: white; color: #868686; font-size: 14px; line-height: 21px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;background-color: white; color: #868686; font-size: 14px; line-height: 21px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #444444; font-family: inherit;&quot;&gt;&lt;span style=&quot;background-color: white; line-height: 21px;&quot;&gt;&lt;b&gt;1.4 web.xml:&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #868686;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 21px;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: #fff7b2; border-radius: 6px 6px 6px 6px; border: 1px solid #BBBBBB; padding: 5px 10px 5px;&quot;&gt;
&lt;span style=&quot;color: #274e13;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;lt;?xml &lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;version=&lt;/span&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;&quot;1.0&quot;&lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt; encoding=&lt;/span&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;&quot;UTF-8&quot;&lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;lt;!DOCTYPE web-app &lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;PUBLIC&lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;&quot;-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN&quot; &quot;http://java.sun.com/j2ee/dtds/web-app_2_2.dtd&quot;&lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;lt;web-app &lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;id=&lt;/span&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;&quot;WebApp_ID&quot;&lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;lt;display-name&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;TestWebSec20&lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;lt;/display-name&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;servlet&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;servlet-name&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;HalloNormal&lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;lt;/servlet-name&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;display-name&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;HalloNormal&lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;lt;/display-name&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;description&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;TestWebSec20&lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;lt;/description&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;servlet-class&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;web.sec.HalloNormal&lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;lt;/servlet-class&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/servlet&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;servlet&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;servlet-name&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;HalloSec&lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;lt;/servlet-name&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;display-name&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;HalloSec&lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;lt;/display-name&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;description&amp;gt;&amp;lt;/description&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;servlet-class&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;web.sec.HalloSec&lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;lt;/servlet-class&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/servlet&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #274e13;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;servlet-mapping&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;servlet-name&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;HalloNormal&lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;lt;/servlet-name&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;url-pattern&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;/HalloNormal&lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;lt;/url-pattern&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/servlet-mapping&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #274e13;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;servlet-mapping&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;servlet-name&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;HalloSec&lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;lt;/servlet-name&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;url-pattern&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;/secure/HalloSec&lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;lt;/url-pattern&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/servlet-mapping&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #274e13;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;welcome-file-list&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;welcome-file&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;index.html&lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;lt;/welcome-file&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/welcome-file-list&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #274e13;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;security-constraint&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;display-name&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;Example Security Constraint&lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;lt;/display-name&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;web-resource-collection&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;web-resource-name&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;Secure Area&lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;lt;/web-resource-name&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;url-pattern&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;/secure/*&lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;lt;/url-pattern&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;http-method&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;GET&lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;lt;/http-method&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;http-method&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;POST&lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;lt;/http-method&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/web-resource-collection&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0b5394;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0b5394;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;!--&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0b5394;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;auth-constraint&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0b5394;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;role-name&amp;gt;*&amp;lt;/role-name&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0b5394;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/auth-constraint&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0b5394;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;--&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0b5394;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;user-data-constraint&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;transport-guarantee&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;CONFIDENTIAL&lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;lt;/transport-guarantee&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/user-data-constraint&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/security-constraint&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;lt;/web-app&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;b style=&quot;background-color: white; color: #666666; font-size: small; line-height: 21px;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;
&lt;b style=&quot;background-color: white; line-height: 21px;&quot;&gt;&lt;span style=&quot;color: #444444; font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b style=&quot;background-color: white; line-height: 21px;&quot;&gt;&lt;span style=&quot;color: #444444; font-family: inherit;&quot;&gt;Explanation to web.xml&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;background-color: white; line-height: 21px;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt; * &amp;nbsp;&quot;HalloSec&quot; servlet will be accessed using url &quot;/secure/HalloSec&quot;.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: inherit;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;This RUL is protected by &quot;security-constraint&quot;. &lt;br /&gt;&amp;nbsp; &amp;nbsp; * &amp;nbsp;&quot;auth-constraint&quot; is commented out, so that here no &quot;login form&quot; is required.&lt;br /&gt;&amp;nbsp; &amp;nbsp; * &amp;nbsp;transport-guarantee CONFIDENTIAL makes the path protected by SSL.&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;A HTTP request to this path /secure/* will be redirected to HTTPS&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: inherit;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;line-height: 15px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; line-height: 21px;&quot;&gt;Deploy the TestWebSec20 Web Application(TestWebSec20.war) to Tomcat (v.7.x).&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: inherit;&quot;&gt;&lt;span style=&quot;background-color: white; line-height: 21px;&quot;&gt;Start Tomcat.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; line-height: 21px;&quot;&gt;Now try accessing the HalloNormal servlet using following URL:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: inherit;&quot;&gt;&lt;span style=&quot;background-color: white; line-height: 21px;&quot;&gt;http://localhost:8080/TestWebSec20/HalloNormal,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; line-height: 21px;&quot;&gt;You willl now see text &quot;Hallo Normal&quot; in your browser:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;background-color: white; color: #868686; font-size: 14px; line-height: 21px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjm1y8RFn6wY1_VnTUloNj8ZXIkCVdx0smz1fta0OAiZ2YLbnE5CeqjLeR2G-k3_fNLdQydLEtHBmHQUgdnit5TS02BgZGJ0ImEYbhEIidVz-C4kBa-oLPKcN3Vj5lc9EDDSIjcKqeq7IQT/s1600/ssl_p2.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjm1y8RFn6wY1_VnTUloNj8ZXIkCVdx0smz1fta0OAiZ2YLbnE5CeqjLeR2G-k3_fNLdQydLEtHBmHQUgdnit5TS02BgZGJ0ImEYbhEIidVz-C4kBa-oLPKcN3Vj5lc9EDDSIjcKqeq7IQT/s320/ssl_p2.png&quot; height=&quot;185&quot; width=&quot;320&quot; /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;background-color: white; color: #868686; font-family: inherit; font-size: 14px; line-height: 21px;&quot;&gt;&lt;b&gt;&lt;a href=&quot;http://milestonenext.blogspot.de/2012/09/ssl-offloading-with-modjk-part-2.html&quot;&gt;SSL Offloading with mod_jk part 2&lt;/a&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #868686; font-family: inherit; font-size: 14px; line-height: 21px;&quot;&gt;&lt;b&gt;&lt;a href=&quot;http://milestonenext.blogspot.de/2012/09/ssl-offloading-with-modjk-part-3.html&quot;&gt;part3&lt;/a&gt;&amp;nbsp;&lt;a href=&quot;http://milestonenext.blogspot.de/2012/09/ssl-offloading-with-modjk-part-4.html&quot;&gt;part4&lt;/a&gt;&amp;nbsp;&lt;a href=&quot;http://milestonenext.blogspot.de/2012/09/ssl-offloading-with-modjk-part-5.html&quot;&gt;part5&lt;/a&gt;&amp;nbsp;&lt;a href=&quot;http://milestonenext.blogspot.de/2012/09/ssl-offloading-with-modjk-part-6.html&quot;&gt;part6&lt;/a&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;background-color: white; color: #868686; font-size: 14px; line-height: 21px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://milestonenext.blogspot.com/feeds/4427862091803634831/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://milestonenext.blogspot.com/2012/09/ssl-offloading-with-modjk-part-1.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7515187228721563448/posts/default/4427862091803634831'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7515187228721563448/posts/default/4427862091803634831'/><link rel='alternate' type='text/html' href='http://milestonenext.blogspot.com/2012/09/ssl-offloading-with-modjk-part-1.html' title='SSL Offloading with mod_jk part 1'/><author><name>Beijing Beijing</name><uri>http://www.blogger.com/profile/12013373726184997758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='28' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTm1nk7ZqbPTfBofk6dIg7Zfx820i-FNuXqGbSlZNbRw5-RPJuqgDFNoW_zdgJCMCYj6R5cTGNgNKmwTzeDsEm2EHkqni9ywIanrN-PIRd4Z4yZXUOHhC12zzDid1A1w/s220/profile.png'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjr9PEAH9ZiKvQuj-TWsTCWdpAWfikPBmBtfGyqmf43uqSSHty2hjR2e23yTEa3Tzt50plPoy3Cjsrl7B-LsZSFyEhRNkxcrDHItJuBfAEqqORzeGV9L6sDRFNQ2h4Qb3wv6OcrQ9xBTub8/s72-c/ssl_p1_arch.png" height="72" width="72"/><thr:total>3</thr:total></entry></feed>