<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <title>R&amp;amp;D blog</title>
  <link rel="alternate" href="https://www.bluesoft.net.pl/en/rnd/blog/-/blogs/rss" />
  <subtitle>R&amp;amp;D blog</subtitle>
  <entry>
    <title>Software AG integrates Terracotta Inc. technology across product suite</title>
    <link rel="alternate" href="https://www.bluesoft.net.pl/en/rnd/blog/-/blogs/software-ag-integrates-terracotta-inc-technology-across-product-suite" />
    <author>
      <name>Daniel Bachan</name>
    </author>
    <id>https://www.bluesoft.net.pl/en/rnd/blog/-/blogs/software-ag-integrates-terracotta-inc-technology-across-product-suite</id>
    <updated>2012-01-17T08:31:54Z</updated>
    <published>2011-12-19T12:00:37Z</published>
    <summary type="html">&lt;p&gt;
	On the 23rd of May 2011 Software AG announced the acquisition of Terracota Inc. Today we know that the integration of the new tools with existing products - webMethods and Centrasite - was successful.&lt;/p&gt;
&lt;p&gt;
	Terracotta Server Array allowed webMethods to fully utilize cloud environments. Terracota Ehcache greatly improved the performance of CentraSite - according to the provider we should experience a 50% increase in performance:&lt;/p&gt;
&lt;p align="center"&gt;
	&lt;em&gt;„Terracotta’s Ehcache caching technology dramatically improves product performance for CentraSite® by up to 50 percent”&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;
	With new technologies we not only gain additional performance, but we are also able to run clustered webMethods on Amazon EC2 public cloud.&lt;/p&gt;
&lt;p&gt;
	More information about the inclusion of Terracota's tools in Software AG's products can be found in related articles:&lt;/p&gt;
&lt;p style="margin-left: 40px; "&gt;
	&lt;strong&gt;Computerworld (Polish)&lt;/strong&gt;&lt;/p&gt;
&lt;p style="margin-left:35.4pt;"&gt;
	&lt;a href="http://www.computerworld.pl/news/377896/Software.AG.wprowadza.technologie.in.memory.by.przyspieszyc.prace.aplikacji.html" target="_blank"&gt;Software AG wprowadza technologię in memory, by przyspieszyć pracę aplikacji&lt;/a&gt;&lt;/p&gt;
&lt;p style="margin-left: 40px; "&gt;
	&lt;strong&gt;BusinessWire (English)&lt;/strong&gt;&lt;/p&gt;
&lt;p style="margin-left:35.4pt;"&gt;
	&lt;a href="http://www.businesswire.com/news/home/20111116005196/en/Software-AG-rapidly-integrates-Terracotta-technology-product" target="_blank"&gt;Software AG rapidly integrates Terracotta Inc. technology across product suite in just five months&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;
	Software AG has been very active in the takeover market recently. Aside from the aforementioned Terracota Inc., this year Software AG also acquired Metismo Ltd. - a mobile application platform provider. We will see how this acquisition influences existing products.&lt;/p&gt;</summary>
    <dc:creator>Daniel Bachan</dc:creator>
    <dc:date>2011-12-19T12:00:37Z</dc:date>
  </entry>
  <entry>
    <title>Creating and maintaining production and test environments in the field of integration.</title>
    <link rel="alternate" href="https://www.bluesoft.net.pl/en/rnd/blog/-/blogs/creating-and-maintaining-production-and-test-environments-in-the-field-of-integration" />
    <author>
      <name>Arkadiusz Garbacz</name>
    </author>
    <id>https://www.bluesoft.net.pl/en/rnd/blog/-/blogs/creating-and-maintaining-production-and-test-environments-in-the-field-of-integration</id>
    <updated>2011-10-25T14:36:05Z</updated>
    <published>2011-10-25T14:25:47Z</published>
    <summary type="html">&lt;p&gt;
	&lt;strong&gt;Creating and maintaining production and test environments in the field of integration - how to make one's life easier by ensuring the highest quality of the environments and their building and updating processes?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;
	 &lt;/p&gt;
&lt;p&gt;
	Business system integration increasingly often enters various areas of the companies' activities. This development brings not only the increased number of areas where integration is applied. It also makes the integration environments more complex. Among the companies that use integration solutions in their everyday activity we will find numerous examples of businesses that use tens/hundreds of integration servers, as well as various technologies used simultaneously.&lt;/p&gt;
&lt;p&gt;
	 &lt;/p&gt;
&lt;p&gt;
	Companies that specialize in integration solutions provide complete software to install individual integration servers, but what if the whole integration platform consists of tens or hundreds of machines that work together, when the code, server parameters and their configuration have to be updated on all these machines daily? Of course it is possible to perform all these tasks manually, but does it have to be this way?&lt;/p&gt;
&lt;p&gt;
	 &lt;/p&gt;
&lt;p&gt;
	Building a complex integration environment through manual installation of individual servers seems to be a very painful process in itself. The whole process is not repeatable, which can result in large divergences on individual machines resulting from human error. Not mentioning the costs and time it takes to complete such process. Machine cloning may seem to reduce the environment installation costs and time, but it can also have unforeseeable consequences, for example, the errors made in the base installation will be propagated onto the whole environment. We do not have any clear list that would tell us what elements compose individual servers and what their configuration is. Looking from the point of view of environment maintenance, we do not have access to the change history of the configuration. We can only hope that the actions performed manually by the administrators were completed meticulously and identically on all the servers. Another problem for very large integration environments is the maintenance of the updated code in the environment. What is meant here is not only the proper update process, but also the downtime of the environments. Imagine 100 testers that idly wait for the environment update or configuration improvement. Costs of such actions are enormous because it is not only the costs of the work performed on the environment, but also all the other costs associated with the unavailability of the environments.&lt;/p&gt;
&lt;p&gt;
	 &lt;/p&gt;
&lt;p&gt;
	All these arguments convinced BlueSoft that it is necessary to create a tool that would automatically perform all the actions associated with the installation and maintenance of integration environments&amp;nbsp; in a repeatable manner. Such work should be done simultaneously on all the machines that constitute the integration environment. The tool is called Enterprise Deployer. It is designed to support integration environment administrators in everyday activities. It fully automates the installation and maintenance processes, it provides mechanisms for updating code and configuration on servers that work on WebMethods, WebSphere and Tibco technologies. The tool's requirements, the logic it is based on and all the other details were consulted with administrators that take care of integration environments every day. The result of this cooperation is the tool that optimizes and facilitates the work of administrators, at the same time ensuring high quality of the environments, their repeatability, and minimized downtime that results from standard procedures as well as human errors that become apparent when the environment is used. Main advantages of this tool include:&lt;/p&gt;
&lt;p&gt;
	1.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Mapping environment structures in the configuration repository (division into editions, areas, environments, servers)&lt;/p&gt;
&lt;p&gt;
	2.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Separating the files that define the actions that are to be executed on individual machines from the physical location of the machine, additional services etc. (quick creation of new environments through copying the existing configurations, only the file that contains the physical location needs to be modified)&lt;/p&gt;
&lt;p&gt;
	3.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Running various operation sets on any level of the configuration tree with the option to define which operations will be executed (e.g. calling the installation operation from the edition level and all the lower levels, which results in automatic installation of shared elements of the whole edition simultaneous with the installation executed on individual servers).&lt;/p&gt;
&lt;p&gt;
	4.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Defining dependencies between the performed operations in the form of clear rules (e.g. blocking any server installation stage until the shared element defined on a different level of the tree is installed).&lt;/p&gt;
&lt;p&gt;
	5.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Defining if the grouped operations are to be executed sequentially or simultaneously (in combination with rule definitions it is a very flexible tool that optimizes the time it takes to create and update the environments).&lt;/p&gt;
&lt;p&gt;
	6.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Modular approach to the operations the tool can perform (option to add plugins that expand its functionality through a simple interface).&lt;/p&gt;
&lt;p&gt;
	7.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Support for integration technologies such as WebMethods, Tibco and WebSphere&lt;/p&gt;
&lt;p&gt;
	8.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Simple text interface and complex reporting mechanism that allows the administrator to run automatic window overlay (automatic environment updating along with mail notifications and full reports on general and detailed level).&lt;/p&gt;
&lt;p&gt;
	9.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; The option to use standard mechanisms offered by svn to verify the configuration of individual elements of integration environments (verification of configuration changes history, comparing configuration of 2 different areas/machines etc.)&lt;/p&gt;
&lt;p&gt;
	 &lt;/p&gt;</summary>
    <dc:creator>Arkadiusz Garbacz</dc:creator>
    <dc:date>2011-10-25T14:25:47Z</dc:date>
  </entry>
  <entry>
    <title>RIS Invocation Manager and Tibco BusinessWorks</title>
    <link rel="alternate" href="https://www.bluesoft.net.pl/en/rnd/blog/-/blogs/ris-invocation-manager-and-tibco-businessworks" />
    <author>
      <name>Marcin Rzedzicki</name>
    </author>
    <id>https://www.bluesoft.net.pl/en/rnd/blog/-/blogs/ris-invocation-manager-and-tibco-businessworks</id>
    <updated>2011-10-20T08:56:40Z</updated>
    <published>2011-10-20T08:48:18Z</published>
    <summary type="html">&lt;p&gt;
	In the situation where time to market is the key competence of our client and the complex and numerous business workflows make it hard to perform a quick analysis, we need a tool that can collect and easily combine real calls of consecutive layers of the integration platform. Let us now take a look at a few solutions for this problem using Tibco as an example.&lt;/p&gt;
&lt;p&gt;
	The easiest way is to log everything everywhere. Let us look at such solution more closely:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;
		every platform enables putting messages into logs, regardless of the system that is being used;&lt;/li&gt;
	&lt;li&gt;
		the person that operates the platform can find consecutive workflow calls;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
	But there are more cons:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;
		the code is littered by logger calls in inappropriate places. What was good when the code was being written is not always good when performing tests. We can change/introduce additional loggers, but will they perform well in the future? I have seen Tibco processes where there were more logging steps than business logic. Let&amp;#39;s all agree that that is not what we are looking for;&lt;/li&gt;
	&lt;li&gt;
		performance markup of the left out log entry calls. Nobody is changing the tested code and the exclusion of logging does not clean the code.&lt;/li&gt;
	&lt;li&gt;
		if error occurs, the logs will not facilitate debugging. They usually have the wrong format, they do not contain all the required fields and their recovery is time-consuming;&lt;/li&gt;
	&lt;li&gt;
		and what if the technical architecture is complex? We know that the message cannot be lost behind the mediation layer. The documentation says that it will reach systems A and B. But the adapters for each of these systems consist of 4 or 5 machines. And the event took place 3 or 4 days ago. We need an efficient grep and know what we are looking for. And still we need to unpack and grep the following: 1 mediation layer log (maybe something didn&amp;#39;t work there), 5 logs for each adapter machine X 2 days. That is simply a waste of time of our client;&lt;/li&gt;
	&lt;li&gt;
		people responsible for operating the system should enrich their experience with development projects to keep their knowledge up to date. Therefore there is no time to introduce new people to the project;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
	Income/costs ratio falls below the expected level. But we need information required to analyze the problems.&lt;/p&gt;
&lt;p&gt;
	Let us look for a solution that meets our requirements:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;
		invocations - it has to enable the collection and easy utility of invocations;&lt;/li&gt;
	&lt;li&gt;
		transparency - the logic of collecting information cannot modify the present code;&lt;/li&gt;
	&lt;li&gt;
		configuration - enabling its modification in an easy and centralized manner&lt;/li&gt;
	&lt;li&gt;
		invocation binding - combining any business workflow into 1 string regardless of the machine where the call is to be made using automatic or predefined ID (e.g. order id);&lt;/li&gt;
	&lt;li&gt;
		efficiency - tool&amp;#39;s markup on the platform is minimal;&lt;/li&gt;
	&lt;li&gt;
		speed - the result, as well as input and output of the service should be visible within 3 minutes after the execution&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
	Having these requirements in mind, our R&amp;amp;D team started working on such tool. A tool where the analysis of a given problem could be performed using the browser and Tibco Designer.&lt;/p&gt;
&lt;p&gt;
	RIS Invocation Manager is the result of our work.&lt;/p&gt;
&lt;p&gt;
	It completes all the required tasks. Tibco processes do not contain any additional steps necessary to collect information. A centralized way of saving the configuration enables quick modification without the need to stop or restart the platform and without introducing any other interruptions.&lt;/p&gt;
&lt;p&gt;
	Processing performance tests conducted with RIS Invocation Manager confirm the reliability of the solution with minimal load coming from Tibco BusinessWorks and other components: Tibco EMS, Rv and the database that works with the platform. Further calls are available in the format that is ready to perform debugging on the working code.&lt;/p&gt;
&lt;p&gt;
	Implementation of this solution has significantly shortened the troubleshooting time on the integration platform, reduced the number of analysis mistakes and enabled us to provide proven data for the architects and developers, required in the analysis of the new functionalities.&lt;/p&gt;
&lt;p&gt;
	I invite you to take a look at the &lt;strong&gt;&lt;a href="http://www.bluesoft.net.pl/en/products/ris/invocation_manager"&gt;product&amp;#39;s page&lt;/a&gt;&lt;/strong&gt;.&lt;/p&gt;</summary>
    <dc:creator>Marcin Rzedzicki</dc:creator>
    <dc:date>2011-10-20T08:48:18Z</dc:date>
  </entry>
  <entry>
    <title>Order Management</title>
    <link rel="alternate" href="https://www.bluesoft.net.pl/en/rnd/blog/-/blogs/order-management" />
    <author>
      <name>Łukasz Mosiej</name>
    </author>
    <id>https://www.bluesoft.net.pl/en/rnd/blog/-/blogs/order-management</id>
    <updated>2011-10-20T22:50:16Z</updated>
    <published>2011-10-20T08:30:08Z</published>
    <summary type="html">&lt;p&gt;
	Order Management is a BPM (Business Process Management) system that enables modeling, processing and management of business processes. In most cases, OM systems are not out-of-box solutions, since the architecture of the system is strictly connected to the business process topology in the given company.&lt;/p&gt;
&lt;p&gt;
	An important thing at the stage of OM system analysis in the given company is the choice of proper technology. When selecting the technology, one should consider the following aspects:&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;
		Level of complexity of the business processes&lt;/li&gt;
	&lt;li&gt;
		Number of simultaneously processes orders&lt;/li&gt;
	&lt;li&gt;
		Number of internal systems with which the Order Management system will communicate&lt;/li&gt;
	&lt;li&gt;
		Scalability of the solution&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
	When implementing the subsequent versions of the OM system in the company, it is often necessary to raise the version of the orders for which the processing has started in the old version of the code. To do that, it is necessary to thoroughly analyze the impact of each change on the regression in each project. If it turns out that the target solution is not a strictly regressive solution, one should make necessary changes to the orders in progress to properly process those orders.&lt;/p&gt;
&lt;p&gt;
	Main advantages of the OM system:&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;
		High efficiency&lt;/li&gt;
	&lt;li&gt;
		Low maintenance and development costs&lt;/li&gt;
	&lt;li&gt;
		Processing of large number of orders coming in from external systems&lt;/li&gt;
	&lt;li&gt;
		Resistant to infrastructure failures&lt;/li&gt;
	&lt;li&gt;
		Low costs of adding new sales channel (ordering system)&lt;/li&gt;
	&lt;li&gt;
		Low costs of adding new domain system&lt;/li&gt;
	&lt;li&gt;
		Addition of new domain system is transparent for ordering systems&lt;/li&gt;
	&lt;li&gt;
		Easy configuration of order fulfillment&lt;/li&gt;
	&lt;li&gt;
		Flexible architecture and configuration&lt;/li&gt;
	&lt;li&gt;
		Scalability of the system&lt;/li&gt;
	&lt;li&gt;
		Asynchronous processing mode&lt;/li&gt;
&lt;/ol&gt;</summary>
    <dc:creator>Łukasz Mosiej</dc:creator>
    <dc:date>2011-10-20T08:30:08Z</dc:date>
  </entry>
  <entry>
    <title>Who is the leader on the integration solution market?</title>
    <link rel="alternate" href="https://www.bluesoft.net.pl/en/rnd/blog/-/blogs/who-is-the-leader-on-the-integration-solution-market" />
    <author>
      <name>Michał Kossakowski</name>
    </author>
    <id>https://www.bluesoft.net.pl/en/rnd/blog/-/blogs/who-is-the-leader-on-the-integration-solution-market</id>
    <updated>2011-10-19T13:50:43Z</updated>
    <published>2011-10-19T13:31:54Z</published>
    <summary type="html">&lt;p&gt;
	In the &amp;#39;90s, the IT market has seen a visible development of technologies used in system integration. After less than 20 years from the appearance of the first, pioneer solutions, they are used every day in many companies, not only the largest ones. Successful implementation of integration solutions that, which are counted in hundreds or even thousands by leading vendors, are often the only way to keep up with the modern markets. In some cases, they can even bring the competitive advantage.&amp;nbsp; A great deal of factors can be quoted that influence this, for example:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;
		faster reaction to frequently occurring changes (external as well as internal)&lt;/li&gt;
	&lt;li&gt;
		process approach support in the company&lt;/li&gt;
	&lt;li&gt;
		automation, and, as a result, acceleration of process realization.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
	There are currently a number of companies that provide integration solutions. Although this segment has been very dynamic for the last few years, three providers always lead the rankings (in random order):&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;
		&lt;a href="http://www.softwareag.com"&gt;Software AG&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;
		&lt;a href="http://www.tibco.com/"&gt;Tibco Software&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;
		&lt;a href="http://www.ibm.com"&gt;IBM&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
	These companies are characterized by very extensive experience in the integration product market, as well as the comprehensiveness of the solutions they provide. This can be confirmed by the last reports made by the largest research companies - Forrester and Gartner.&lt;/p&gt;
&lt;p&gt;
	&amp;nbsp;In the report entitles &amp;quot;The Forrester Wave&amp;trade;: Comprehensive Integration Solutions&amp;quot; from the 4th quarter of 2010, the largest providers of complete integration solutions (EAI, BPM, EDI, SOA etc.) &amp;nbsp;were evaluated. The criteria were divided into two groups - &amp;quot;current offering&amp;quot; and &amp;quot;strategy&amp;quot;. In addition, the diagram includes the companies&amp;#39; presence on the market (fig. 1).&lt;/p&gt;
&lt;p style="text-align: center;"&gt;
	&lt;img alt="" src="https://www.bluesoft.net.pl/image/image_gallery?uuid=c9cd123b-54e2-497d-8f78-876dc2c2080b&amp;amp;groupId=21028&amp;amp;t=1319031254354" style="width: 410px; height: 416px;" /&gt;&lt;/p&gt;
&lt;p style="text-align: center; font-size:8px;"&gt;
	Figure 1. Forrester Wave - Comprehensive Integration Solutions&lt;br /&gt;
	Source: Forrester Research, Inc., &amp;quot;The Forrester Wave&amp;trade;: Comprehensive Integration Solutions&amp;quot;&lt;/p&gt;
&lt;p&gt;
	&amp;nbsp;&lt;/p&gt;
&lt;p&gt;
	In the first group, the most important criteria that included summarized 110 attributes, were architecture, integration server, BPM, support and application development framework.&lt;/p&gt;
&lt;p&gt;
	In the field of strategy, the costs, product strategy, customer reference checks and strategic alliances were evaluated.&lt;/p&gt;
&lt;p&gt;
	All three aforementioned companies made it to the top of the list. The interesting fact is that the differences between those providers are slight, in many categories even unnoticeable. In the &amp;quot;strategy&amp;quot; group, among the most important criteria, the ratings of the leaders were identical, only the cost of the software turned out to be slightly worse for Software AG. In the &amp;quot;current offering&amp;quot; category, Software AG and Tibco were considered to be the best providers from the architecture point of view, and Tibco Software became the leader in the case of integration server.&lt;/p&gt;
&lt;p&gt;
	As we can see on the diagram, SAG occupies the highest position, although it is slightly moved to the left side due to the cost of its solution. Notice the position of Oracle, which won in the &amp;quot;strategy&amp;quot; category (maximum points for &amp;quot;customer reference checks&amp;quot;). It was, however, rated low for its offer, compared to the three leaders mentioned before.&lt;/p&gt;
&lt;p&gt;
	Gartner included similar evaluations in its &amp;quot;Magic Quadrant for Application Infrastructure for Systematic Application Integration Projects&amp;quot; report. The criteria and scope of research differed from the report described previously. In this case the position on the diagram depended on the &amp;quot;completeness of vision&amp;quot; and the &amp;quot;ability to execute&amp;quot; (more information on the methodology used for evaluation can be found &lt;a href="http://www.gartner.com/DisplayDocument?id=486094"&gt;here&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;
	Although the methodology was different, Software AG, Tibco Software and IBM occupy the leaders quadrant (fig. 2). Again, very close to each other.&lt;/p&gt;
&lt;p style="text-align: center;"&gt;
	&lt;img alt="" src="https://www.bluesoft.net.pl/image/image_gallery?uuid=f5ca96fc-dfb8-409a-b611-abf74f5bf554&amp;amp;groupId=21028&amp;amp;t=1319031267614" style="width: 400px; height: 410px;" /&gt;&lt;/p&gt;
&lt;p style="text-align: center; font-size:8px; "&gt;
	Figure 2. Gartner&amp;rsquo; s Magic Quadrant for application integration technologies vendors&lt;br /&gt;
	Source: Gartner, Inc. &amp;quot;Magic Quadrant for Application Infrastructure for Systematic Application Integration Projects&amp;quot;&lt;/p&gt;
&lt;p&gt;
	&amp;nbsp;&lt;/p&gt;
&lt;p&gt;
	Is there a simple way to choose the best technology? Obviously not. As we can see on the included diagrams, despite the enormity of the research spectrum, the differences in ratings are very small. The completeness of each mentioned solution will surely meet the requirements of business clients. This can be confirmed by a large number of implementations completed by every leader.&lt;/p&gt;
&lt;p&gt;
	In most cases the obvious factor would be the cost of the system&amp;#39;s implementation and its maintenance. It is easy to explain to project sponsor.&lt;/p&gt;
&lt;p&gt;
	The second, easily verifiable factor is the availability of providers that specialize in the given technology. Larger selection means easier negotiations for the client - this translates into price again.&amp;nbsp; But what is more important, large base of providers facilitates their change. You should never preclude the possibility that the cooperation will not go perfectly.&lt;/p&gt;
&lt;p&gt;
	Thinking about other factors - efficiency, simplicity of the solution, easiness to introduce a new system analyst etc. I&amp;#39;m getting the impression that their verification is often limited to reading the marketing materials. Pure guesswork. Of course, the providers will gladly prepare the proof of concept in order to confirm the excellence of their solution. However, it can be very time-consuming, so the clients usually don&amp;#39;t decide to make a number of PoC&amp;#39;s&amp;nbsp; in different technologies to compare them.&lt;/p&gt;
&lt;p&gt;
	However, there is a new field in which the technology providers now compete - business orientation. More emphasis is being put on comfortable and easy modeling, modification and analysis of the implemented processes. It would be best to operate the processes after the successful installation without IT. Business has to pay for IT, so the direction is reasonable, although the resignation from IT is also quite utopian. Aren&amp;#39;t we limiting the selection to marketing issues this way?&lt;/p&gt;
&lt;p&gt;
	Getting back to proof of concept - an independent business case, performed in every leading technology, would be very useful. Such materials are most likely unavailable. Maybe we should make such exercise one day...&lt;/p&gt;</summary>
    <dc:creator>Michał Kossakowski</dc:creator>
    <dc:date>2011-10-19T13:31:54Z</dc:date>
  </entry>
  <entry>
    <title>Consequences of improper use of technologies in application integration and BPM</title>
    <link rel="alternate" href="https://www.bluesoft.net.pl/en/rnd/blog/-/blogs/consequences-of-improper-use-of-technologies-in-application-integration-and-bpm" />
    <author>
      <name>Bartosz Barczynski</name>
    </author>
    <id>https://www.bluesoft.net.pl/en/rnd/blog/-/blogs/consequences-of-improper-use-of-technologies-in-application-integration-and-bpm</id>
    <updated>2011-10-19T14:29:39Z</updated>
    <published>2011-10-19T13:06:25Z</published>
    <summary type="html">&lt;p&gt;
	Integration platform designing and business process modeling require good analytical skills and high competence in technology in which the whole environment is to be implemented. Whether it&amp;#39;s Webmethods, Tibco or WebSphere, the analyst has to know the performance limits and restrictions each technology has. It&amp;#39;s also impossible to design an application in isolation from programmers&amp;#39; feedback, since wrong decisions made at the stage of analysis will result in slow execution of the application and lack of scalability etc. Worst case scenario is a caricature of a system where every functionality is implemented using components that are not fit for particular tasks.&lt;br /&gt;
	&amp;nbsp;&lt;/p&gt;
&lt;h4&gt;
	Too many steps in process&lt;/h4&gt;
&lt;p&gt;
	When modeling business processes, a question arises whether the particular task or action is a new activity (results in a new step of the process) or an element of the existing activity. Whether it&amp;#39;s BPML model or process implementation in a given technology, processes should be created that consist of low number of steps and that combine similar tasks into one activity. Each step requires the preparation of input data, memory allocation and in general prolongs the duration of the process. If the tasks completed in a given step are short, the performance markup caused by the creation and execution of this step may exceed the time required to perform the target action. It is unacceptable to create sequences of steps of the same type that, for example, process information independently. It is better to aggregate such list into one element of the process. The documentation of each of the aforementioned technologies recommends creating as few steps as possible in the project processes. New step in the process should be created only when a new type of step is required, when processing is split into numerous branches or when joint processing occurs.&lt;br /&gt;
	&amp;nbsp;&lt;/p&gt;
&lt;h4&gt;
	Too big input data&lt;/h4&gt;
&lt;p&gt;
	When implementing business processes, the most common mistake is saving large quantities of information on the pipeline and forwarding them through the whole process. Each step in the process acquires a lot of data and uses only a small portion of it. It causes a decrease in performance and prolongs the execution of each step. Webmethods and WebSphere technologies enable clearing the pipeline and allow the designer to specify what will be forwarded to the next step in the process. This functionality should always be used and the designer should remember that the less data in the pipeline between the steps the better. Tibco technology does not allow clearing the pipeline . It has a cumulative character, which means that each step acquires the cumulated data from all the previous steps. The conclusion is obvious - long processes will be extremely ineffective since the last steps will acquire large quantities of useless data. The solution in this situation is creating short processes that execute strictly defined tasks.&lt;br /&gt;
	&amp;nbsp;&lt;/p&gt;
&lt;h4&gt;
	Other side effects&lt;/h4&gt;
&lt;p&gt;
	Oversized pipeline and long processes will cause the integrated environment to run slowly and inefficiently. Out of memory, CPU overload and depletion of connections and thread pool etc. may appear, as well as hard-to-analyze errors caused by the platform overload. For example, Webmethods technology features an error resulting from the loss of transition between the steps in the process. In test environments it was impossible to recreate this problem, since it appeared in random moments when the integration platform was overloaded and lacked resources. After performing an optimization consisting of lowering the quantity of data forwarded between the steps in the processes (documents consisting only of basic types, structure with 2-3 levels), the error no longer appeared and the efficiency of the whole application increased significantly. If the step in a process required more data, it was able to obtain it from the database. In other technologies problems may appear where processes are preemptived if their execution takes too long. This will cause the process to stop and it is not guaranteed that it will start again shortly. It is much better for the processes or services to be executed completely without any interruptions.&lt;br /&gt;
	&amp;nbsp;&lt;/p&gt;
&lt;h4&gt;
	Summary&lt;/h4&gt;
&lt;p&gt;
	Lack of knowledge in the technology used to create a given integration platform or business processes may cause numerous errors, especially efficiency-related errors. An application created using the technology not meant for its function may meet the functional requirements but its throughput, scalability and further development will be very difficult. When creating a new system, the designer should always thoroughly analyze the technology that is going to be utilized.&lt;/p&gt;</summary>
    <dc:creator>Bartosz Barczynski</dc:creator>
    <dc:date>2011-10-19T13:06:25Z</dc:date>
  </entry>
  <entry>
    <title>Multi-Project management of application development - Meet RIS RM</title>
    <link rel="alternate" href="https://www.bluesoft.net.pl/en/rnd/blog/-/blogs/multi-project-management-of-application-development-meet-ris-rm" />
    <author>
      <name>Maciej Błaszczak</name>
    </author>
    <id>https://www.bluesoft.net.pl/en/rnd/blog/-/blogs/multi-project-management-of-application-development-meet-ris-rm</id>
    <updated>2011-10-19T12:53:23Z</updated>
    <published>2011-10-19T11:47:21Z</published>
    <summary type="html">&lt;p&gt;
	How to effectively control the production process in a large, integrated environment where the application code is divided into numerous, dependent components that are developed by different vendors and the code is tested on various test environments? Let us think about the solution to this problem. It can be essential to the development of our application. The task is difficult, especially when tight schedule comes into play. Every mistake can cost us a lot of stress and wasted time, which is precious in such moments. How to avoid involving a team of specialists that will watch over the coherence of the whole process? Let&amp;#39;s try using RIS RM.&lt;/p&gt;
&lt;p&gt;
	&amp;nbsp;&lt;/p&gt;
&lt;h2&gt;
	USE CASE&lt;/h2&gt;
&lt;ul&gt;
	&lt;li&gt;
		The application consists of 30 components that are interconnected with dependencies. A change made in component X may result in the necessity to update components Y and Z.&lt;/li&gt;
	&lt;li&gt;
		The projects are made by 3 providers:
		&lt;ul&gt;
			&lt;li&gt;
				provider A - a provider with long experience&lt;/li&gt;
			&lt;li&gt;
				provider B - a provider with medium level of experience&lt;/li&gt;
			&lt;li&gt;
				provider C - a provider with little experience - did not participate in application development before&lt;/li&gt;
		&lt;/ul&gt;
	&lt;/li&gt;
	&lt;li&gt;
		Test environments:
		&lt;ul&gt;
			&lt;li&gt;
				Automatic test environment - ST&lt;/li&gt;
			&lt;li&gt;
				Integration test environment - INT&lt;/li&gt;
			&lt;li&gt;
				Efficiency test environment - EF&lt;/li&gt;
		&lt;/ul&gt;
	&lt;/li&gt;
&lt;/ul&gt;
&lt;p style="margin-left:35.4pt;"&gt;
	Each environment has its own application code line. These lines are based on the same version of the code - the last release version.&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;
		Projects:
		&lt;ul&gt;
			&lt;li&gt;
				provider A works on 2 projects that introduce new functionalities and modifies existing elements of the application as part of the 3rd project&lt;/li&gt;
			&lt;li&gt;
				provider B improves the efficiency of the application&lt;/li&gt;
			&lt;li&gt;
				provider C works on 1 small project that also introduces new functionalities&lt;/li&gt;
		&lt;/ul&gt;
	&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
	&amp;nbsp;&lt;/p&gt;
&lt;h2&gt;
	POSSIBLE ERROR SCENARIOS&lt;/h2&gt;
&lt;p&gt;
	Let us describe a few scenarios that can occur in case of lack of proper monitoring of our application development. The providers work simultaneously on the code, each of them has different goal and experience - this can cause potential errors. One of the basic ones is overwriting changes of one provider by another provider. Referring to our earlier example, the situation can look like this: providers A and C include changes in the X component. Provider C, the less experienced one, needs more time to make the necessary modifications. When C is making changes to the code of the component, A delivers 2 new changes. Provider C, after finishing his changes, updates the code of the component, at the same time removing the 2 last changes made by provider A. As a result, the work made by one of the providers is lost. Best case scenario - the error will come out during the tests and the problem will be solved in a relatively short time. However, it is also possible that A has finished tests of the given functionality and will remain unaware that his changes have been overwritten.&lt;/p&gt;
&lt;p&gt;
	Another source of problems can be the fact that the code is tested simultaneously on more than one environment. These environments have different character and scope of the tested functionalities. Error that can occur here is the wrong change propagation from one environment to another. To put it in the context of our example - provider B works mainly in EF test environment when performing efficiency tests. He introduces frequent but small modifications and the results of the work are periodically reported to the code in other environments. Due to provider B&amp;#39;s oversight, part of the modifications made to the applications is not transferred to the code in ST and INT. As a result, his work is not comprehensively tested along with the changes introduced by providers A and C, which causes a relatively high risk that the whole planned optimization will not bring the desired effect.&lt;/p&gt;
&lt;p&gt;
	Various consequences can result from such scenarios, and the situations where further errors occur can be multiplied infinitely: overwriting each other&amp;#39;s code by the providers, scope conflicts, erroneous, incomplete change propagation between the test environments, different order of introducing changes into the environments resulting in different versions of the application on parallel branches of the code, developing changes basing on outdated code and many more. How to avoid these situations to minimize the risk of error? Let us see what RIS RM can offer in this area.&lt;/p&gt;
&lt;p&gt;
	&amp;nbsp;&lt;/p&gt;
&lt;h2&gt;
	RIS RM - SOLUTION&lt;/h2&gt;
&lt;p&gt;
	RIS RM supports simultaneous management of multiple projects with independently defined scopes. The application detects and solves conflicts for code delivered by different providers. It also allows easy definition of its workflow.&lt;/p&gt;
&lt;p&gt;
	In RIS RM every change made to the application is submitted by creating a new notification, the co-called &lt;em&gt;release note&lt;/em&gt;. It is the only way to deliver code to the test environments. Each &lt;em&gt;release note&lt;/em&gt; is associated with the factual change (depending on the type, it can be application code or configuration). Each notification contains the present state, information on the origin, type, scope and full history of the circulation. Circulation of every &lt;em&gt;release note&lt;/em&gt; is controlled using a definable workflow, which, with its system of rules and rights, leads the notification through test environments.&lt;/p&gt;
&lt;p&gt;
	Let us now refer to the aforementioned situations where errors occurred and see how RIS RM can handle these problems. In the case where provider C overwrites the changes made in the meantime by provider A - with its scope mechanism, RIS RM automatically detects such events. The conflict is indicated when the code is provided by C in the form of a proper status in the &lt;em&gt;release note&lt;/em&gt;. Conflict details appear along with the status, which allows the provider to easily locate the section where the potential overwrite would occur. Complex reporting and notifications allow other parties to observe the event and control the way it is handled.&lt;/p&gt;
&lt;p&gt;
	Second case - provider B does not propagate changes from EF environment to other environments correctly. When working with RIS RM we do not have to worry about such situations - the tool will handle them for us. Changes in the application are submitted through subsequent &lt;em&gt;release notes&lt;/em&gt; and then introduced in series or in parallel (depending on the workflow configuration) onto the test environments - no change is lost on the way. With the available reports and notifications we can control the state of development of our application in real time.&lt;/p&gt;
&lt;p&gt;
	In both cases RIS RM stands on guard and does not allow the unwanted situations to occur. Similarly to the aforementioned problems, RIS RM handles a wide spectrum of other potential anomalies associated with code circulation.&lt;/p&gt;
&lt;p&gt;
	&amp;nbsp;&lt;/p&gt;
&lt;h2&gt;
	SUMMARY&lt;/h2&gt;
&lt;p&gt;
	The quoted examples show only a portion of features offered by RIS RM. The tool works perfectly as a mean to organize code provision process in a multi-project environment in a safe, controlled and manageable manner. High configurability and flexibility make it a perfect choice for large as well as small production environments.&lt;/p&gt;
&lt;p&gt;
	&amp;nbsp;&lt;/p&gt;
&lt;h2&gt;
	MORE INFORMATION&lt;/h2&gt;
&lt;p&gt;
	More information can be found at: &lt;a href="http://www.bluesoft.net.pl/products/ris/release_mind"&gt;http://www.bluesoft.net.pl/products/ris/release_mind&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;
	&amp;nbsp;&lt;/p&gt;</summary>
    <dc:creator>Maciej Błaszczak</dc:creator>
    <dc:date>2011-10-19T11:47:21Z</dc:date>
  </entry>
  <entry>
    <title>How to measure and ensure the quality of the integration code?</title>
    <link rel="alternate" href="https://www.bluesoft.net.pl/en/rnd/blog/-/blogs/how-to-measure-and-ensure-the-quality-of-the-integration-code" />
    <author>
      <name>Michał Zaczek</name>
    </author>
    <id>https://www.bluesoft.net.pl/en/rnd/blog/-/blogs/how-to-measure-and-ensure-the-quality-of-the-integration-code</id>
    <updated>2011-10-19T11:16:22Z</updated>
    <published>2011-10-19T10:50:04Z</published>
    <summary type="html">&lt;p&gt;
	People responsible for the development and maintenance of integration platforms often ask how they could measure and ensure the quality of the integration code. While it&amp;#39;s easy in the case of Java, there are no globally accepted standards and tools available for platforms such as WebMethods, Tibco or WebSphere to verify the quality of the code. Quality understood as the compliance with the rules of implementation, models and good practices.&lt;/p&gt;
&lt;p&gt;
	Lacks in code quality as defined above may bring numerous potential risks, such as increased costs of code development or problems associated with the change of provider.&lt;/p&gt;
&lt;p&gt;
	Even the most complex and hermetic test process cannot guarantee that the implemented integration code is compliant with the implementation rules and models. A properly organized verification process can ensure the high quality of the code. Automation of this process ensures scalability and utilization of complex validation mechanisms without the need to use massive resources.&lt;/p&gt;
&lt;p&gt;
	&lt;br /&gt;
	I will now present how we used RIS ServiceAnalyser tool to organize such process.&lt;/p&gt;
&lt;p&gt;
	More information about RIS tools can be found &lt;a href="http://www.bluesoft.net.pl/products/ris/service_analyser"&gt;here&lt;/a&gt;.&lt;br /&gt;
	&amp;nbsp;&lt;/p&gt;
&lt;h3&gt;
	Development&lt;/h3&gt;
&lt;p&gt;
	Quality verification should start at the stage of development. The developer should possess the tools to verify his or her creation before sending it for testing. At this stage we provide the developers with appropriate plugin or application that verifies the code by presenting the report showing the compliance with implementation models and rules.&lt;/p&gt;
&lt;h3&gt;
	Code circulation through test environments&lt;/h3&gt;
&lt;p&gt;
	RIS ServiceAnalyser is the integrated RIS Release Mind tool that enabled the developer to organize the code flow through test environments. By integrating these tools we are able to run RIS ServiceAnalyser in &amp;ldquo;firewall&amp;rdquo; mode. When this mode is used, the code that is not compliant with the defined rules and models is rejected. With this we can be sure that the potential errors and lack of compliance with the implementation rules will not leave the development environments and move to test environments.&lt;/p&gt;
&lt;h3&gt;
	Cyclical code reviews&lt;/h3&gt;
&lt;p&gt;
	The last stage of code validation is the cyclical quality review. RIS ServiceAnalyser contains a module responsible for cyclical verification of the production code and presentation of results in the form of appropriately defined benchmarks.&lt;br /&gt;
	&amp;nbsp;&lt;/p&gt;</summary>
    <dc:creator>Michał Zaczek</dc:creator>
    <dc:date>2011-10-19T10:50:04Z</dc:date>
  </entry>
  <entry>
    <title>How Liferay Portal boosts crime-prevention effectiveness</title>
    <link rel="alternate" href="https://www.bluesoft.net.pl/en/rnd/blog/-/blogs/how-liferay-portal-boosts-crime-prevention-effectiveness" />
    <author>
      <name>Konrad Kurzydło</name>
    </author>
    <id>https://www.bluesoft.net.pl/en/rnd/blog/-/blogs/how-liferay-portal-boosts-crime-prevention-effectiveness</id>
    <updated>2012-01-17T08:59:59Z</updated>
    <published>2011-10-14T17:40:38Z</published>
    <summary type="html">&lt;h2&gt;
	Use case&lt;/h2&gt;
&lt;p&gt;
	In the beginning of the year 2011 Central Forensic Laboratory of the Polish Police ordered the implementation of web-based application consisting of knowledge base frontend and the database of cars, motorcycles, trucks, lorries, buses and spare parts. This application is now available for police experts accross countries from Central and Eastern Europe. The application is called FAVI (Forensic Aid for Vehicle Identification).&amp;nbsp;&lt;/p&gt;
&lt;p&gt;
	One of the most important and inovative issue was to give police experts the opportunity to build the community for their narrow specialization together with the ability of quick communication and sharing of thoughts and knowledge. Its target user is an expert from toolmark examination unit of the police who is responsible for identification of removed manufacture markings on metal surfaces of vehicle bodies, engines, etc.&lt;/p&gt;
&lt;h2&gt;
	Liferay Based Solution&lt;/h2&gt;
&lt;p&gt;
	Our solution was designed to be based on Liferay Portal architecture. We chose it because it has built-in plugins and features which makes building a community easier and faster, such as forum, chat, wiki, user profiles. Liferay Portal covers all issues with user account management, groups, roles and permissions, which allows to create the solution for several levels of access. Registered users have the possibility to fill in their profile information which identifies authors of articles and forum messages.&lt;/p&gt;
&lt;p&gt;
	Using Liferay as a base of our solution has let us minimize internal cost and time of the project. Our client estimated one year as sufficient period of time for building the system. We managed to do this in 6 months.&lt;/p&gt;
&lt;p&gt;
	To summarize, the solution uses Liferay features as listed below:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;
		user acconts and profiles, session management&lt;/li&gt;
	&lt;li&gt;
		groups, roles, permission, security, authentication, authorization&lt;/li&gt;
	&lt;li&gt;
		forum&lt;/li&gt;
	&lt;li&gt;
		chat&lt;/li&gt;
	&lt;li&gt;
		wiki&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
	FAVI application, which is built as a Liferay JSR-168 portlet, allows experts to build common knowledge base by writing and saving articles with studies on specific vehicles. These articles are instantly visible for other experts. Our implementation of GUI is a Flash text and graphical editor of articles and pictures. Graphical editor allows to:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;
		scale, rotate, format pictures&lt;/li&gt;
	&lt;li&gt;
		control of contrast, brightness, transparency of pictures&lt;/li&gt;
	&lt;li&gt;
		overlap and compare of several pictures&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
	Beasides graphical features it also has the capability of uploading videos and text documents (word and pdf). We used Lucene as a searching engine, and jackrabbit as a content repository which stores all the information within the knowledge base.&lt;/p&gt;
&lt;h2&gt;
	Liferay Portal and Virtual Hosts&lt;/h2&gt;
&lt;p&gt;
	During the last phase of the project - the deployment of the system on production environment - we encountered the problem with linking the same instance of Liferay Portal with two different HTTPS domains: first one for the internet and vpn, second for the intranet. The problem was related to the fact that each Liferay Portlet can create URLs in HTTP response independently and in different way. One way of generating URL is by using Virtual Host Name which can be set in Liferay administration console. So, what domain: internal or external should be set in Liferay?&lt;/p&gt;
&lt;p&gt;
	We came to the solution that virtual name should be set to "localhost" and we need to have configured Apache HTTP Server with SSL on the front and with appropriate mod_substitute configuration. In Apache we need to have set two virtual domains with mod_proxy to Liferay Portal. For each of the domain we implemented substitution for URL in Response Body, which substitutes each localhost in URLs. The example is shown below:&lt;/p&gt;
&lt;div style="font-size: 12px;"&gt;
	&lt;pre class="brush: xml; smart-tabs: true;"&gt;
&amp;lt;VirtualHost *:443&amp;gt;
  ServerName intranet_domain_name 
  SSLEngine on
  SSLCertificateFile _path_to_certificate_file
  SSLCertificateKeyFile _path_to_private_key

  ProxyRequests Off
  ProxyPass / http://127.0.0.1:8088/ #Liferay is running on the same 
host as Apache HTTP Server.
  ProxyPassReverse / http://127.0.0.1/ #We are using Liferay on Tomcat 
and in server.conf file there is nothing about SSL or domain configuration, 
just localhost is set everywhere
  &amp;lt;Location /&amp;gt;
	FilterProvider gzinflate INFLATE resp=Content-Encoding $gzip 
	FilterProvider replace SUBSTITUTE resp=Content-Type $text/ 
	FilterProvider replace SUBSTITUTE resp=Content-Type $/xml
	FilterProvider replace SUBSTITUTE resp=Content-Type $/json
	FilterProvider replace SUBSTITUTE resp=Content-Type $/javascript
	FilterProvider gzdeflate DEFLATE Content-Type $text/ 
	FilterProvider gzdeflate DEFLATE Content-Type $/xml 
	FilterProvider gzdeflate DEFLATE Content-Type $/json 
	FilterProvider gzdeflate DEFLATE Content-Type $/javascript 
	FilterChain +gzinflate +replace +gzdeflate

	Substitute "s|http://127.0.0.1|https://intranet_domain_name|ni"
	Substitute "s|http://127.0.0.1|https://intranet_domain_name|ni"
	Substitute "s|http%3A%2F%2F127.0.0.1|https%3A%2F%2Fintranet_domain_name|ni"
	Substitute "s|http%253A%252F%252F127.0.0.1|https%253A%252F%252Fintranet_domain_name|ni"
  &amp;lt;/Location&amp;gt;
&amp;lt;/VirtualHost&amp;gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;div id="disqus_thread"&gt;
	&amp;nbsp;&lt;/div&gt;
&lt;script type="text/javascript"&gt;
    /* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
    var disqus_shortname = 'bluesoft'; // required: replace example with your forum shortname

    // The following are highly recommended additional parameters. Remove the slashes in front to use.
    var disqus_identifier = 'blogs/how-liferay-portal-boosts-crime-prevention-effectiveness';
    var disqus_url = 'http://www.bluesoft.net.pl/en/web/guest/rnd/blog/-/blogs/how-liferay-portal-boosts-crime-prevention-effectiveness';

    /* * * DON'T EDIT BELOW THIS LINE * * */
    (function() {
        var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
        dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';
        (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
    })();
&lt;/script&gt;&lt;noscript&gt;Please enable JavaScript to view the &lt;a href="http://disqus.com/?ref_noscript"&gt;comments powered by Disqus.&lt;/a&gt;&lt;/noscript&gt;
&lt;p&gt;
	&lt;a class="dsq-brlink" href="http://disqus.com"&gt;blog comments powered by &lt;span class="logo-disqus"&gt;Disqus&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;</summary>
    <dc:creator>Konrad Kurzydło</dc:creator>
    <dc:date>2011-10-14T17:40:38Z</dc:date>
  </entry>
  <entry>
    <title>Mule ESB - how fast it really is?</title>
    <link rel="alternate" href="https://www.bluesoft.net.pl/en/rnd/blog/-/blogs/mule-esb-how-fast-it-really-is-" />
    <author>
      <name>Tomek Lipski</name>
    </author>
    <id>https://www.bluesoft.net.pl/en/rnd/blog/-/blogs/mule-esb-how-fast-it-really-is-</id>
    <updated>2012-01-17T09:07:52Z</updated>
    <published>2011-10-03T14:46:52Z</published>
    <summary type="html">&lt;h2&gt;
	Mule ESB highlights&lt;/h2&gt;
&lt;p&gt;
	Mule ESB is an Open Source enterprise message bus. It allows message routing, transformation and adaptation between different integration technologies (&lt;a href="https://www.bluesoft.net.pl/innovations/rnd/mule" target="_blank"&gt;more information...&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;
	Two things make Mule special among other ESB implementations:&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;
		Open standard - Mule ESB is released as an Open Source, but also - XML used to configure Mule services is standarized and available in Mule documentation. This thing alone allows third parties to build Mule-based tools and solutions, such as service generators or service analysers.&lt;/li&gt;
	&lt;li&gt;
		Lightweight implementation - Mule combines existing standards and frameworks, such as Apache CXF, Jetty or Apache ActiveMQ in a unique way, building light and agile foundation for deployment of integration services&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;
	Use case&lt;/h2&gt;
&lt;p&gt;
	One of the enterprise use cases for an ESB is a translation between synchronous client using SOAP over HTTP and asynchronous service, operating over JMS. Such translation should produce as little overhead as possible while maintaining high throughput.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;
	What our test case service did, was:&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;
		Receive 64kb message by SOAP over HTTP&lt;/li&gt;
	&lt;li&gt;
		Log message to console (Mule's venerable Echo Service)&lt;/li&gt;
	&lt;li&gt;
		Send this message to ActiveMQ queue (non-persistent)&lt;/li&gt;
	&lt;li&gt;
		Receive this message back from the same ActiveMQ queue using JMS correlation id&amp;nbsp;&lt;/li&gt;
	&lt;li&gt;
		Send the message back to the client using SOAP over HTTP.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
	Such translation layer, can also provide other significant features, such as:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;
		authentication &amp;amp; authorization&lt;/li&gt;
	&lt;li&gt;
		error and timeout handling&lt;/li&gt;
	&lt;li&gt;
		message logging&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
	Test setup&lt;/h2&gt;
&lt;p&gt;
	All tests have been performed using Mule EE 3.1.2, ActiveMQ 5.5.0 and JMeter 2.4. The test machine was&amp;nbsp;Sun Fire X4270, Xeon 2.53GHz (E5540); 4 physical cores, 48 GB RAM (of which 4 GB was used) and all of the software, including JMeter was running on the same machine at the same time.&lt;/p&gt;
&lt;h2 style="margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 1.6em; font-weight: bold; "&gt;
	Test results&lt;/h2&gt;
&lt;p&gt;
	We were astounded to find, that Mule ESB (and ActiveMQ) performs very well. Up to &lt;strong&gt;450 req/s&lt;/strong&gt;, the average delay was around &lt;strong&gt;7-8 ms&lt;/strong&gt; (including ActiveMQ and client delay). At 450 req/s max delay for tens of thousands of requests was &lt;strong&gt;only 78 ms&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;
	The whole setup managed to reach 520 req/s, with average delay of &lt;strong&gt;20 ms&lt;/strong&gt;. &amp;nbsp;&lt;/p&gt;
&lt;h2&gt;
	Test config&lt;/h2&gt;
&lt;p&gt;
	Mule service configuration file is really straightforward. We have used Mule service model to simplify our implementation.&lt;/p&gt;
&lt;p&gt;
	Sample soap-config.xml (service definition file deployed to Mule):&lt;/p&gt;
&lt;div style="font-size: 12px;"&gt;
	&lt;pre class="brush: xml; smart-tabs: true;"&gt;
	&amp;lt;?xml version="1.0" encoding="utf-8" ?&amp;gt; 
&amp;lt;mule xmlns="http://www.mulesoft.org/schema/mule/core"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns:http="http://www.mulesoft.org/schema/mule/http"
      xmlns:jms="http://www.mulesoft.org/schema/mule/jms"
       xmlns:cxf="http://www.mulesoft.org/schema/mule/cxf"
      xsi:schemaLocation="
       http://www.mulesoft.org/schema/mule/core 
       http://www.mulesoft.org/schema/mule/core/3.1/mule.xsd
       http://www.mulesoft.org/schema/mule/http 
       http://www.mulesoft.org/schema/mule/http/3.1/mule-http.xsd
       http://www.mulesoft.org/schema/mule/cxf 
       http://www.mulesoft.org/schema/mule/cxf/3.1/mule-cxf.xsd
       http://www.mulesoft.org/schema/mule/jms 
       http://www.mulesoft.org/schema/mule/jms/3.1/mule-jms.xsd"&amp;gt;

    &amp;lt;http:connector name="http_in"
                   validateConnections="false"
                   keepAlive="true"/&amp;gt;
    &amp;lt;jms:activemq-connector name="amq"
                           specification="1.1"
                           jndiDestinations="false"
                           forceJndiDestinations="false"
                           acknowledgementMode="AUTO_ACKNOWLEDGE"
                           clientId="testmq"
                           durable="false"
                           noLocal="false"
                           persistentDelivery="false"
                           honorQosHeaders="false"
                           maxRedelivery="0"
                           cacheJmsSessions="true"
                           eagerConsumer="true"
                           numberOfConsumers="20"
                           disableTemporaryReplyToDestinations="false"
                           embeddedMode="false"
                           brokerURL="tcp://localhost:61616"/&amp;gt;
    &amp;lt;configuration&amp;gt;
        &amp;lt;default-threading-profile
            maxThreadsActive="300" doThreading="true"/&amp;gt;
    &amp;lt;/configuration&amp;gt;

    &amp;lt;model name="Async_Request-Response_Message_Pattern"&amp;gt;
        &amp;lt;service name="AsyncRequestResponseService"&amp;gt;
            &amp;lt;inbound&amp;gt;
                &amp;lt;inbound-endpoint address="http://localhost:8030/hello"
                                  exchange-pattern="request-response"
                                  connector-ref="http_in"&amp;gt;
                    &amp;lt;cxf:simple-service/&amp;gt;
                &amp;lt;/inbound-endpoint&amp;gt;
            &amp;lt;/inbound&amp;gt;

            &amp;lt;echo-component/&amp;gt;

            &amp;lt;outbound&amp;gt;
                &amp;lt;pass-through-router enableCorrelation="ALWAYS"&amp;gt;
                    &amp;lt;jms:outbound-endpoint queue="reply.queue"
                                           exchange-pattern="one-way"
                                           connector-ref="amq"/&amp;gt;
                    &amp;lt;reply-to address="jms://reply.queue"/&amp;gt;
                &amp;lt;/pass-through-router&amp;gt;
            &amp;lt;/outbound&amp;gt;

            &amp;lt;async-reply timeout="4000"&amp;gt;
                &amp;lt;jms:inbound-endpoint queue="reply.queue"
                                      exchange-pattern="one-way"
                                      connector-ref="amq"/&amp;gt;
                &amp;lt;single-async-reply-router/&amp;gt;
            &amp;lt;/async-reply&amp;gt;
        &amp;lt;/service&amp;gt;
    &amp;lt;/model&amp;gt;
&amp;lt;/mule&amp;gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;
	ActiveMQ file only disables persistence for all queues - &lt;a href="https://raw.github.com/gist/1150230/de020c3901c9e6aedfe1016d9ff023a396c60073/activemq.xml" target="_blank"&gt;activemq.xml&lt;/a&gt;, JMeter script sends soap requests (64kb file content commented out), logs responses and manages throughput on a desired level - &lt;a href="https://raw.github.com/gist/1150230/a0c5e407ac70efbece1ea8334b80c557ea284470/soap-mule.jmx" target="_blank"&gt;soap-mule.jmx&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;
	The conclusion&lt;/h2&gt;
&lt;p&gt;
	It looks like Mule ESB is capable of high performance operation indeed. Average delay of 7 or 8 ms per such operation is a very good result and bodes well for the future of Mule ESB.&lt;/p&gt;
&lt;div id="disqus_thread"&gt;
	&amp;nbsp;&lt;/div&gt;
&lt;script type="text/javascript"&gt;
    /* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
    var disqus_shortname = 'bluesoft'; // required: replace example with your forum shortname

    // The following are highly recommended additional parameters. Remove the slashes in front to use.
    var disqus_identifier = 'blogs/mule-esb-how-fast-it-really-is-';
    var disqus_url = 'http://www.bluesoft.net.pl/rnd/blog/-/blogs/mule-esb-how-fast-it-really-is-';

    /* * * DON'T EDIT BELOW THIS LINE * * */
    (function() {
        var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
        dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';
        (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
    })();
&lt;/script&gt;&lt;noscript&gt;Please enable JavaScript to view the &lt;a href="http://disqus.com/?ref_noscript"&gt;comments powered by Disqus.&lt;/a&gt;&lt;/noscript&gt;
	&lt;p&gt;
		&lt;a class="dsq-brlink" href="http://disqus.com"&gt;blog comments powered by &lt;span class="logo-disqus"&gt;Disqus&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;</summary>
    <dc:creator>Tomek Lipski</dc:creator>
    <dc:date>2011-10-03T14:46:52Z</dc:date>
  </entry>
  <entry>
    <title>Newsletter for Liferay - Newsletter Admin Portlet</title>
    <link rel="alternate" href="https://www.bluesoft.net.pl/en/rnd/blog/-/blogs/newsletter-for-liferay-newsletter-admin-portlet" />
    <author>
      <name>Tomek Lipski</name>
    </author>
    <id>https://www.bluesoft.net.pl/en/rnd/blog/-/blogs/newsletter-for-liferay-newsletter-admin-portlet</id>
    <updated>2011-10-05T20:48:24Z</updated>
    <published>2011-10-03T14:53:42Z</published>
    <summary type="html">&lt;div style="width: 100%"&gt;
	&lt;p&gt;
		The configuration portlet allows the Portal Administrator to manage available subscription categories. In future, such portlet could grow to support subscription administration. As an administrative portlet, Newsletter Admin Portlet is available only in Liferay Control Panel.&lt;/p&gt;
	&lt;p style="text-align: center; "&gt;
		&lt;img alt="Newsletter Admin Portlet" src="https://www.bluesoft.net.pl/image/image_gallery?img_id=50031&amp;amp;t=1311945629630" style="width: 507px; height: 282px;" /&gt;&lt;/p&gt;
	&lt;p&gt;
		&lt;b&gt;For the impatient, the entire solution has been made available under LGPL at GitHub: &lt;a href="https://github.com/tlipski/newsletter-for-liferay"&gt;https://github.com/tlipski/newsletter-for-liferay&lt;/a&gt;&lt;/b&gt;.&lt;/p&gt;
	&lt;p&gt;
		Also, feel free to visit discussion thread on Liferay Forums: &lt;a href="http://www.liferay.com/community/forums/-/message_boards/view_message/9856880" target="_blank"&gt;http://www.liferay.com/community/forums/-/message_boards/view_message/9856880&lt;/a&gt;. In this thread, there are some additional valuable notes and tips provided by other users.&lt;/p&gt;
	&lt;h3&gt;
		Putting your portlet in Control Panel&lt;/h3&gt;
	&lt;p&gt;
		Putting portlet in a Liferay&amp;#39;s Control Panel requires that you do two things only:&lt;/p&gt;
	&lt;ol&gt;
		&lt;li&gt;
			&lt;b&gt;Hide the portlet in Liferay&amp;#39;s &amp;quot;Add content&amp;quot; dialogue&lt;/b&gt;&lt;/li&gt;
		&lt;li&gt;
			&lt;b&gt;Make the portlet visible in Control Panel&lt;/b&gt;&lt;/li&gt;
	&lt;/ol&gt;
	&lt;p&gt;
		Step 1 is optional, but when skipped, requires the developer/administrator to consider setting additional permission restrictions on a portlet (if necessary).&lt;/p&gt;
	&lt;p&gt;
		To hide a portlet in Liferay&amp;#39;s &amp;quot;Add content&amp;quot; dialogue, you have put your portlet in a special category in liferay-display.xml:&lt;/p&gt;
&lt;div style="font-size: 12px;"&gt;
&lt;pre class="brush: xml; smart-tabs: true;"&gt;
&amp;lt;category name=&amp;quot;category.hidden&amp;quot;&amp;gt;
    &amp;lt;portlet id=&amp;quot;Newsletter Admin Portlet&amp;quot;/&amp;gt;
&amp;lt;/category&amp;gt;
&lt;/pre&gt;&lt;/div&gt;
	&lt;p&gt;
		To make portlet visible in a Liferay&amp;#39;s Control Panel, you have to add additional information about a portlet in liferay-portlet.xml:&lt;/p&gt;
&lt;div style="font-size: 12px;"&gt;&lt;pre class="brush: xml; smart-tabs: true;"&gt;
&amp;lt;portlet&amp;gt;
    &amp;lt;portlet-name&amp;gt;Newsletter Admin Portlet&amp;lt;/portlet-name&amp;gt;
    &amp;lt;instanceable&amp;gt;false&amp;lt;/instanceable&amp;gt;
    &amp;lt;ajaxable&amp;gt;false&amp;lt;/ajaxable&amp;gt;
    &amp;lt;control-panel-entry-category&amp;gt;content&amp;lt;/control-panel-entry-category&amp;gt;
    &amp;lt;control-panel-entry-weight&amp;gt;1&amp;lt;/control-panel-entry-weight&amp;gt;
&amp;lt;/portlet&amp;gt;        
&lt;/pre&gt;
&lt;/div&gt;
	&lt;h3&gt;
		The portlet&lt;/h3&gt;
	&lt;p&gt;
		The implementation of this portlet is even more straightforward than a Subscription Portlet. Everything is contained inside of class&amp;nbsp;&lt;a href="https://github.com/tlipski/newsletter-for-liferay/blob/master/src/main/java/pl/net/bluesoft/rnd/newsletter/gui/NewsletterAdminPane.java" target="_blank"&gt;pl.net.bluesoft.rnd.newsletter.gui.NewsletterAdminPane&lt;/a&gt; using only 100 lines of code.&lt;/p&gt;
	&lt;p&gt;
		The portlet consists of:&lt;/p&gt;
	&lt;ul&gt;
		&lt;li&gt;
			&lt;b&gt;Category list&lt;/b&gt; - simple VerticalLayout containing one HorizontalLayout per each category (of course, Vaadin&amp;#39;s Table could be more applicable when newsletter category could would increase to, let&amp;#39;s say - 20 newsletters)&lt;/li&gt;
		&lt;li&gt;
			&lt;b&gt;Add new category&lt;/b&gt; Button&lt;/li&gt;
		&lt;li&gt;
			&lt;b&gt;Category add/edit&lt;/b&gt; Window. This Window contains simple form generated by VaadinUtil.simpleScaffoldForJPA method. This method simply takes a Java class and displays edit form for fields specified in a method parameter. The type of Field used to represent each field is determined using JPA annotations. Also, the form is enriched with I18n-enabled labels and captions.&lt;/li&gt;
	&lt;/ul&gt;
	&lt;div id="disqus_thread"&gt;
		&amp;nbsp;&lt;/div&gt;
&lt;script type="text/javascript"&gt;
    /* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
    var disqus_shortname = 'bluesoft'; // required: replace example with your forum shortname

    // The following are highly recommended additional parameters. Remove the slashes in front to use.
    var disqus_identifier = 'blogs/newsletter-for-liferay-newsletter-admin-portlet';
    var disqus_url = 'http://www.bluesoft.net.pl/web/guest/rnd/blog/-/blogs/newsletter-for-liferay-newsletter-admin-portlet';

    /* * * DON'T EDIT BELOW THIS LINE * * */
    (function() {
        var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
        dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';
        (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
    })();
&lt;/script&gt;&lt;noscript&gt;Please enable JavaScript to view the &lt;a href="http://disqus.com/?ref_noscript"&gt;comments powered by Disqus.&lt;/a&gt;&lt;/noscript&gt;	&lt;p&gt;
		&lt;a class="dsq-brlink" href="http://disqus.com"&gt;blog comments powered by &lt;span class="logo-disqus"&gt;Disqus&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;</summary>
    <dc:creator>Tomek Lipski</dc:creator>
    <dc:date>2011-10-03T14:53:42Z</dc:date>
  </entry>
  <entry>
    <title>Newsletter for Liferay - Subscription Portlet</title>
    <link rel="alternate" href="https://www.bluesoft.net.pl/en/rnd/blog/-/blogs/newsletter-for-liferay-subscription-portlet" />
    <author>
      <name>Tomek Lipski</name>
    </author>
    <id>https://www.bluesoft.net.pl/en/rnd/blog/-/blogs/newsletter-for-liferay-subscription-portlet</id>
    <updated>2011-10-10T20:32:46Z</updated>
    <published>2011-10-05T16:32:55Z</published>
    <summary type="html">&lt;div&gt;
	&lt;p&gt;
		The first, and most important portlet in a newsletter application is the Subscription Portlet. This portlet allows users, whether logged-in, or anonymous, to subscribe and unsubscribe from a newsletter configured for this portlet.&lt;/p&gt;
	&lt;p&gt;
		&lt;b&gt;For the impatient, the entire solution has been made available under LGPL at GitHub: &lt;a href="https://github.com/tlipski/newsletter-for-liferay"&gt;https://github.com/tlipski/newsletter-for-liferay&lt;/a&gt;&lt;/b&gt;.&lt;/p&gt;
	&lt;p&gt;
		Also, feel free to visit discussion thread on Liferay Forums: &lt;a href="http://www.liferay.com/community/forums/-/message_boards/view_message/9856880" target="_blank"&gt;http://www.liferay.com/community/forums/-/message_boards/view_message/9856880&lt;/a&gt;. In this thread, there are some additional valuable notes and tips provided by other users.&lt;/p&gt;
	&lt;p&gt;
		The portlet supports two modes of operation:&lt;/p&gt;
	&lt;ul&gt;
		&lt;li&gt;
			PortletMode.&lt;b&gt;VIEW&lt;/b&gt; - available to all users, and&lt;/li&gt;
		&lt;li&gt;
			PortletMode.&lt;b&gt;EDIT&lt;/b&gt; - which enables the portal or site administrator to configure particular instance of this portlet&lt;/li&gt;
	&lt;/ul&gt;
	&lt;p&gt;
		The modes were enabled for this portlet using &amp;lt;supports&amp;gt; tag in portlet.xml:&lt;/p&gt;
	&lt;p&gt;
		The logic controlling which Vaadin controls are displayed is placed inside of Vaadin Application used by this portlet (&lt;a href="https://github.com/tlipski/newsletter-for-liferay/blob/master/src/main/java/pl/net/bluesoft/rnd/newsletter/portlets/NewsletterPortletApplication.java"&gt;pl.net.bluesoft.rnd.newsletter.portlets.NewsletterPortletApplication&lt;/a&gt;. This Application also accesses Portlet Preferences API, to make used components abstract from Liferay:&lt;/p&gt;
&lt;/div&gt;
&lt;div style="font-size: 12px"&gt;
	&lt;pre class="brush: java;"&gt;
	@Override
public void handleRenderRequest(RenderRequest renderRequest,
                                RenderResponse renderResponse,
                                Window window) {
    try {
        this.preferences = renderRequest.getPreferences();
        PortletMode portletMode = renderRequest.getPortletMode();
        if (!portletMode.equals(previousMode)) {
            getMainWindow().setContent(new VerticalLayout());
            if (portletMode.equals(PortletMode.VIEW)) {
                String val = preferences.getValue(NEWSLETTER_CATEGORY_ID, null);
                if (val == null) {
                    getMainWindow().addComponent(new Label(&amp;quot;Please configure this portlet.&amp;quot;));
                    return;
                }
                long id = Long.parseLong(val);
                NewsletterCategory newsletterCategory = (NewsletterCategory)
                        HibernateUtil.getSession().get(NewsletterCategory.class, id);
                subscriptionPane = new NewsletterSubscriptionPane(newsletterCategory);
                getMainWindow().addComponent(subscriptionPane);
            } else if (portletMode.equals(PortletMode.EDIT)) {
                NewsletterCategory newsletterCategory = null;
                String val = preferences.getValue(NEWSLETTER_CATEGORY_ID, null);
                if (val != null) {
                    long id = Long.parseLong(val);
                    newsletterCategory = (NewsletterCategory) HibernateUtil.getSession()
                            .get(NewsletterCategory.class, id);
                }

                NewsletterSubscriptionEditPane editPane = new NewsletterSubscriptionEditPane(
                        newsletterCategory,
                        new NewsletterSubscriptionEditPane.SaveCallback() {

                    @Override
                    public void onSave(NewsletterCategory newCategory) {
                        try {
                            if (newCategory == null)
                                preferences.reset(NEWSLETTER_CATEGORY_ID);
                            else
                                preferences.setValue(NEWSLETTER_CATEGORY_ID,
                                        String.valueOf(newCategory.getId()));
                            preferences.store();
                        } catch (ReadOnlyException e) {
                            throw new RuntimeException(e);
                        } catch (ValidatorException e) {
                            throw new RuntimeException(e);
                        } catch (IOException e) {
                            throw new RuntimeException(e);
                        }
                    }
                });
                getMainWindow().addComponent(editPane);

            }
        }
        previousMode = portletMode;
        if (subscriptionPane != null)
            subscriptionPane.setUrl(PortalUtil.getPortalURL(renderRequest)
                    + PortalUtil.getCurrentURL(renderRequest));
    } catch (RuntimeException e) {
        e.printStackTrace();
        throw e;
    }
}
&lt;/pre&gt;
&lt;/div&gt;
&lt;div class="bls_article"&gt;
	&lt;p&gt;
		Also, an example of Vaadin-Portlet API integration has been provided in the init() method:&lt;/p&gt;
&lt;/div&gt;
&lt;!--&lt;script src="https://gist.github.com/1078723.js?file=NewsletterPortletApplication%23init().java"&gt;&lt;/script&gt;--&gt;&lt;div style="font-size: 12px"&gt;
	&lt;pre class="brush: java;"&gt;
	@Override
public void init() {

    final Window mainWindow = new Window();
    setMainWindow(mainWindow);

    ApplicationContext applicationContext = getContext();
    if (applicationContext instanceof PortletApplicationContext2) {
        PortletApplicationContext2 portletCtx =
                (PortletApplicationContext2) applicationContext;
        portletCtx.addPortletListener(this, this);
    } else {
        mainWindow.addComponent(new Label(&amp;quot;Please use this application from a Portlet&amp;quot;));
        return;
    }
}
&lt;/pre&gt;
&lt;/div&gt;
&lt;div class="bls_article"&gt;
	&lt;h3&gt;
		View mode - subscription/unsubscription&lt;/h3&gt;
	&lt;p style="text-align: center; "&gt;
		&lt;img alt="" src="https://www.bluesoft.net.pl/image/image_gallery?uuid=70b72fb3-1123-4d91-a926-a6750691810f&amp;amp;groupId=21322&amp;amp;t=1310638560016" style="width: 463px; height: 399px;" /&gt;&lt;/p&gt;
	&lt;p&gt;
		The entire view mode is provided in a class &lt;a href="https://github.com/tlipski/newsletter-for-liferay/blob/master/src/main/java/pl/net/bluesoft/rnd/newsletter/gui/NewsletterSubscriptionPane.java"&gt;pl.net.bluesoft.rnd.newsletter.gui.NewsletterSubscriptionPane&lt;/a&gt; (255 lines of code).&lt;/p&gt;
	&lt;p&gt;
		The portlet in this mode allows user to provide his/her email address and subscribe/unsubscribe from a newsletter. When a user performs an operation, a confirmation message is sent to a supplied email address. To confirm an operation, user has to invoke a popup window (method displayConfirmationCodeDialog) and enter the confirmation key from received email.&lt;/p&gt;
	&lt;p style="text-align: center; "&gt;
		&lt;img alt="" src="https://www.bluesoft.net.pl/image/image_gallery?uuid=fe02fc71-26da-4157-9411-354b8b4674ec&amp;amp;groupId=21322&amp;amp;t=1310638565902" style="width: 461px; height: 251px;" /&gt;&lt;/p&gt;
	&lt;p style="text-align: center; "&gt;
		&amp;nbsp;&lt;/p&gt;
	&lt;p&gt;
		The graphical interface is user-friendly and requires no page refresh thanks to Vaadin. The look of the interface is 100% Vaadin-theme dependent - remember, that you can change the theme used in Liferay&amp;#39;s portal-ext.properties configuration file.&lt;/p&gt;
	&lt;p&gt;
		Almost all of the mechanisms provided in a &lt;a href="https://www.bluesoft.net.pl/web/tlipski/blog/-/blogs/newsletter-for-liferay-introduction"&gt;previous post about Liferay Newsletter&lt;/a&gt; are used in this portlet.&lt;/p&gt;
	&lt;h3&gt;
		Edit mode - portlet configuration&lt;/h3&gt;
	&lt;p style="text-align: center; "&gt;
		&lt;img alt="" src="https://www.bluesoft.net.pl/image/image_gallery?uuid=0082e33a-bca6-465d-b324-d1e5b29c9a84&amp;amp;groupId=21322&amp;amp;t=1310638554281" style="width: 525px; height: 170px;" /&gt;&lt;/p&gt;
	&lt;p&gt;
		The configuration view (PortletMode.EDIT) is provided in a class &lt;a href="https://github.com/tlipski/newsletter-for-liferay/blob/master/src/main/java/pl/net/bluesoft/rnd/newsletter/gui/NewsletterSubscriptionEditPane.java"&gt;pl.net.bluesoft.rnd.newsletter.gui.NewsletterSubscriptionEditPane&lt;/a&gt; - only 89 lines of code, as the functionality is really simple. NewsletterSubscriptionEditPane does not integrate with Liferay directly - it provides a callback interface:&lt;/p&gt;
&lt;/div&gt;
&lt;div style="font-size: 12px"&gt;
	&lt;pre class="brush: java;"&gt;
	public static interface SaveCallback {
	void onSave(NewsletterCategory newCategory);
}

//called to save preferences:
addComponent(button(&amp;quot;newsletter.subscription.edit.save&amp;quot;, new Button.ClickListener() {
		@Override
		public void buttonClick(Button.ClickEvent clickEvent) {
			callback.onSave((NewsletterCategory) categoriesBox.getValue());
			VaadinUtil.displayNotification(getWindow(),
                          &amp;quot;newsletter.subscription.edit.save-succesfull&amp;quot;);
		}
}));

//and provided to Portlet Preferences API by NewsletterPortletApplication:
NewsletterSubscriptionEditPane editPane = new NewsletterSubscriptionEditPane(newsletterCategory,
        new NewsletterSubscriptionEditPane.SaveCallback() {

    @Override
    public void onSave(NewsletterCategory newCategory) {
        try {
            if (newCategory == null)
                preferences.reset(NEWSLETTER_CATEGORY_ID);
            else
                preferences.setValue(NEWSLETTER_CATEGORY_ID,
                        String.valueOf(newCategory.getId()));
            preferences.store();
        } catch (ReadOnlyException e) {
            throw new RuntimeException(e);
        } catch (ValidatorException e) {
            throw new RuntimeException(e);
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }
});
&lt;/pre&gt;
&lt;/div&gt;
&lt;div class="bls_article"&gt;
	&lt;h3&gt;
		Conclusion&lt;/h3&gt;
	&lt;p&gt;
		As you have seen, the newsletter subscription portlet is really simple, yet powerful due to mechanisms provided by Java Portlets API.&lt;/p&gt;
&lt;/div&gt;
&lt;div id="disqus_thread"&gt;
	&amp;nbsp;&lt;/div&gt;
&lt;script type="text/javascript"&gt;
/* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
var disqus_shortname = 'bluesoft'; // required: replace example with your forum shortname

// The following are highly recommended additional parameters. Remove the slashes in front to use.
var disqus_identifier = 'blogs/newsletter-for-liferay-subscription-portlet';
var disqus_url = 'http://www.bluesoft.net.pl/web/guest/rnd/blog/-/blogs/newsletter-for-liferay-subscription-portlet';

/* * * DON'T EDIT BELOW THIS LINE * * */
(function() {
    var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
    dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';
    (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
&lt;/script&gt;&lt;noscript&gt;Please enable JavaScript to view the &lt;a href="http://disqus.com/?ref_noscript"&gt;comments powered by Disqus.&lt;/a&gt;&lt;/noscript&gt;&lt;p&gt;
	&lt;a class="dsq-brlink" href="http://disqus.com"&gt;blog comments powered by &lt;span class="logo-disqus"&gt;Disqus&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;</summary>
    <dc:creator>Tomek Lipski</dc:creator>
    <dc:date>2011-10-05T16:32:55Z</dc:date>
  </entry>
  <entry>
    <title>Vaadin, Clojure and Google App Engine</title>
    <link rel="alternate" href="https://www.bluesoft.net.pl/en/rnd/blog/-/blogs/vaadin-clojure-and-google-app-engine" />
    <author>
      <name>Tomek Lipski</name>
    </author>
    <id>https://www.bluesoft.net.pl/en/rnd/blog/-/blogs/vaadin-clojure-and-google-app-engine</id>
    <updated>2011-10-05T20:56:16Z</updated>
    <published>2011-10-05T20:54:38Z</published>
    <summary type="html">&lt;div class="bls_article"&gt;
	&lt;h3&gt;
		Vaadin&lt;/h3&gt;
	&lt;p&gt;
		&lt;a href="http://vaadin.com" target="_blank"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Vaadin&lt;/span&gt;&lt;/a&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; is a great framework not only for enterprise, feature rich and desktop-like web applications. It can be also used in publicly available web 2.0 applications. And of course, there are many articles on how to use Vaadin on GAE - even on &lt;/span&gt;&lt;a href="http://vaadin.com" target="_blank"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Vaadin.com&lt;/span&gt;&lt;/a&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; -&amp;nbsp;&lt;/span&gt;&lt;a href="http://vaadin.com/wiki/-/wiki/Main/Google%20AppEngine%20HOWTO" target="_blank"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;http://vaadin.com/wiki/-/wiki/Main/Google%20AppEngine%20HOWTO&lt;/span&gt;&lt;/a&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;.&lt;/span&gt;&lt;/p&gt;
	&lt;h3&gt;
		Clojure&lt;/h3&gt;
	&lt;p&gt;
		&lt;span style="color: rgb(0, 0, 0);"&gt;But, Vaadin gives us another great possibility - to build our RIA applications on JVM using scripting languages. &lt;/span&gt;&lt;a href="http://clojure.org/" target="_blank"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Clojure&lt;/span&gt;&lt;/a&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; is a fine example of how quick the development of solutions on Java platform can be - when one is using a scripting language. &lt;/span&gt;&lt;/p&gt;
	&lt;p&gt;
		&lt;span style="color: rgb(0, 0, 0);"&gt;Besides powerful macros,elegant syntax, and easy interaction with Java, Clojure allows us to use REPL interactive console (just like in Python for example) to test and modify our code in a realtime. No more restarts, redeployments, etc. The development can be several times faster than in Java language.&lt;/span&gt;&lt;/p&gt;
	&lt;h3&gt;
		Google App Engine&lt;/h3&gt;
	&lt;p&gt;
		&lt;span style="color: rgb(0, 0, 0);"&gt;Google App Engine is a hosting service for building cloud computing applications. GAE introduces several restrictions on deployed applications, but such restrictions would appear in almost any highly scalable solution.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
	&lt;h3&gt;
		How do they work together?&lt;/h3&gt;
	&lt;p&gt;
		&lt;span style="color: rgb(0, 0, 0);"&gt;Pretty great actually, but ss there was no solution combining Vaadin, Clojure and Google App Engine, I have enhanced appengine-magic Clojure library with Vaadin support. The library is available as a GitHub public repository:&amp;nbsp;&lt;/span&gt;&lt;a href="https://github.com/tlipski/appengine-magic-vaadin"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 0);"&gt;https://github.com/tlipski/appengine-magic-vaadin&lt;/span&gt;&lt;/a&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 0);"&gt;.&lt;/span&gt;&lt;/p&gt;
	&lt;p&gt;
		&lt;span style="color: rgb(0, 0, 0);"&gt;Sample application looks like this:&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;script src="https://gist.github.com/1065536.js?file=sample_vaadin_app.clj"&gt;&lt;/script&gt;&lt;div id="disqus_thread"&gt;
	 &lt;/div&gt;
&lt;script type="text/javascript"&gt;
    /* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
    var disqus_shortname = 'bluesoft'; // required: replace example with your forum shortname

    // The following are highly recommended additional parameters. Remove the slashes in front to use.
    var disqus_identifier = 'blogs/vaadin-clojure-and-google-app-engine';
    var disqus_url = 'http://www.bluesoft.net.pl/web/guest/rnd/blog/vaadin-clojure-and-google-app-engine';

    /* * * DON'T EDIT BELOW THIS LINE * * */
    (function() {
    var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
    dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';
    (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
    })();
&lt;/script&gt;&lt;noscript&gt;Please enable JavaScript to view the &lt;a href="http://disqus.com/?ref_noscript"&gt;comments powered by Disqus.&lt;/a&gt;
&lt;/noscript&gt;&lt;p&gt;
	&lt;a class="dsq-brlink" href="http://disqus.com"&gt;blog comments powered by &lt;span class="logo-disqus"&gt;Disqus&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;</summary>
    <dc:creator>Tomek Lipski</dc:creator>
    <dc:date>2011-10-05T20:54:38Z</dc:date>
  </entry>
  <entry>
    <title>Newsletter for Liferay - Introduction</title>
    <link rel="alternate" href="https://www.bluesoft.net.pl/en/rnd/blog/-/blogs/newsletter-for-liferay-introduction" />
    <author>
      <name>Tomek Lipski</name>
    </author>
    <id>https://www.bluesoft.net.pl/en/rnd/blog/-/blogs/newsletter-for-liferay-introduction</id>
    <updated>2011-10-10T21:02:08Z</updated>
    <published>2011-10-10T20:48:29Z</published>
    <summary type="html">&lt;div class="bls_article"&gt;
    &lt;p&gt;
        &lt;span class="Apple-style-span" style="color: rgb(0, 0, 0);"&gt;In this post, I will describe basic mechanisms used in Newsletter for Liferay portlets. Such mechanisms can be used as a basis of any Liferay-Vaadin application.&lt;/span&gt;
    &lt;/p&gt;

    &lt;h3&gt;
        &lt;span style="color: rgb(0, 0, 0);"&gt;Liferay/Vaadin Integration&lt;/span&gt;&lt;/h3&gt;

    &lt;p&gt;
        &lt;span style="color: rgb(0, 0, 0);"&gt;The portlet descriptors (JSR168/286 compliant and Liferay specific) are rather standard. One thing worth mentioning is the extension of default Vaadin Portlet implementation:&lt;/span&gt;
    &lt;/p&gt;

    &lt;p&gt;
        &lt;span style="color: rgb(0, 0, 0);"&gt;in web.xml:&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div style="font-size: 12px"&gt;
	&lt;pre class="brush: xml;"&gt;
&amp;lt;servlet&amp;gt;
    &amp;lt;servlet-name&amp;gt;VaadinPortletServlet&amp;lt;/servlet-name&amp;gt;
    &amp;lt;servlet-class&amp;gt;com.liferay.portal.kernel.servlet.PortletServlet&amp;lt;/servlet-class&amp;gt;
    &amp;lt;init-param&amp;gt;
        &amp;lt;param-name&amp;gt;portlet-class&amp;lt;/param-name&amp;gt;
        &amp;lt;param-value&amp;gt;
            pl.net.bluesoft.rnd.newsletter.portlets.VaadinApplicationPortlet2
        &amp;lt;/param-value&amp;gt;
    &amp;lt;/init-param&amp;gt;
    &amp;lt;load-on-startup&amp;gt;0&amp;lt;/load-on-startup&amp;gt;
&amp;lt;/servlet&amp;gt;
&lt;/pre&gt;&lt;/div&gt;

&lt;div class="bls_article"&gt;
    &lt;div&gt;
        &lt;span style="color: rgb(0, 0, 0);"&gt;and also in portlet.xml (for all &amp;lt;portlet&amp;gt; entries):&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style="font-size: 12px"&gt;
	&lt;pre class="brush: xml;"&gt;
&amp;lt;portlet&amp;gt;
    &amp;lt;portlet-name&amp;gt;Newsletter Portlet&amp;lt;/portlet-name&amp;gt;
    &amp;lt;display-name&amp;gt;BlueSoft Newsletter Portlet&amp;lt;/display-name&amp;gt;
    &amp;lt;portlet-class&amp;gt;
        pl.net.bluesoft.rnd.newsletter.portlets.VaadinApplicationPortlet2
        &amp;lt;/portlet-class&amp;gt;
    &amp;lt;!-- ... --&amp;gt;
&amp;lt;/portlet&amp;gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;!--&lt;script src="https://gist.github.com/1065233.js?file=portlet.xml"&gt;&lt;/script&gt;--&gt;
&lt;div class="bls_article"&gt;
    &lt;div&gt;
        &amp;nbsp;&lt;/div&gt;
    &lt;div&gt;
        &lt;span style="color: rgb(0, 0, 0);"&gt;The other important thing is the ugrade of Liferay&amp;#39;s Vaadin widgetset and themes. I have encountered several problems when using Vaadin 6.4.10 on Liferay (default version provided with Liferay 6.0.6), so currently newsletter portlets depend on Vaadin 6.5.4. Anyway every version of Vaadin brings cool improvements and features, so it is always worth to upgrade!&lt;/span&gt;
    &lt;/div&gt;
    &lt;h3&gt;
        &lt;span style="color: rgb(0, 0, 0);"&gt;Hibernate Integration&lt;/span&gt;&lt;/h3&gt;

    &lt;div&gt;
        &lt;span style="color: rgb(0, 0, 0);"&gt;Portlet class mentioned above provides also seamless access to Hibernate Session and coordinates transaction,
            making it available to Hibernate SessionFactory.getCurrentSession() calls:&lt;/span&gt;
    &lt;/div&gt;
    &lt;div&gt;
        &amp;nbsp;&lt;/div&gt;
&lt;/div&gt;
&lt;div style="font-size: 12px"&gt;
	&lt;pre class="brush: java;"&gt;
protected void handleRequest(final PortletRequest request,
                             final PortletResponse response)
    throws PortletException, IOException {
    Session session = HibernateUtil.getSession();
    try {
        Transaction tx = session.beginTransaction();
        Locale locale = request.getLocale();
        VaadinUtil.setThreadLocale(locale);
        try {
            VaadinApplicationPortlet2.super
                .handleRequest(request, response);
        } finally {
            VaadinUtil.unsetThreadLocale();
        }
        tx.commit();
    } catch (Exception e) {
        session.getTransaction().rollback();
        throw new RuntimeException(e);
    }
}
&lt;/pre&gt;&lt;/div&gt;
&lt;!--&lt;script src="https://gist.github.com/1065233.js?file=VaadinApplicationPortlet2.java"&gt;&lt;/script&gt;--&gt;
&lt;div class="bls_article"&gt;
    &lt;div&gt;
        &lt;span style="color: rgb(0, 0, 0);"&gt;Of course, in a more complicated environment, Java Transaction API (JTA) should be used. The Hibernate configuration is pretty straightforward - of course more sophisticated deployment should use datasource instead of hibernate.cfg.xml database configuration.&lt;/span&gt;
    &lt;/div&gt;
    &lt;div&gt;
        &amp;nbsp;&lt;/div&gt;
    &lt;div&gt;
        &lt;span style="color: rgb(0, 0, 0);"&gt;The class&amp;nbsp;pl.net.bluesoft.rnd.newsletter.model.HibernateUtil governs Hibernate
            SessionFactory as a static field, which is enough in our example.
            Sample code (&lt;em&gt;NewsletterAdminPane.java&lt;/em&gt;) using our Hibernate mechanism:&lt;/span&gt;
    &lt;/div&gt;
    &lt;div&gt;
        &amp;nbsp;&lt;/div&gt;
&lt;/div&gt;
&lt;div style="font-size: 12px"&gt;
	&lt;pre class="brush: java;"&gt;
button("newsletter.admin.edit.change", new Button.ClickListener() {
    public void buttonClick(Button.ClickEvent event) {
        displayEditWindow((NewsletterCategory)
             HibernateUtil.getSession().get(NewsletterCategory.class, cat.getId()));
    }
}),
button("newsletter.admin.edit.remove", new Button.ClickListener() {
    public void buttonClick(Button.ClickEvent event) {
        HibernateUtil.getSession().delete(HibernateUtil.getSession()
             .get(NewsletterCategory.class, cat.getId()));
        loadData();
    }
})
&lt;/pre&gt;&lt;/div&gt;
&lt;!--&lt;script src="https://gist.github.com/1065233.js?file=NewsletterAdminPane.java"&gt;&lt;/script&gt;--&gt;
&lt;div class="bls_article"&gt;
    &lt;span style="color: rgb(0, 0, 0);"&gt;Even though method getSession is called multiple times (and never closed), the implementation uses Hibernate per-thread session scoping. In hibernate.cfg.xml we have:&lt;/span&gt;
&lt;/div&gt;
&lt;div style="font-size: 12px"&gt;
	&lt;pre class="brush: xml;"&gt;        
&amp;lt;?xml version="1.0"?&amp;gt;
&amp;lt;!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd"&amp;gt;
&amp;lt;hibernate-configuration&amp;gt;
    &amp;lt;session-factory&amp;gt;
        &amp;lt;property name="hibernate.dialect"&amp;gt;
            org.hibernate.dialect.PostgreSQLDialect
        &amp;lt;/property&amp;gt;
        &amp;lt;property name="hibernate.connection.driver_class"&amp;gt;
            org.postgresql.Driver
        &amp;lt;/property&amp;gt;
        &amp;lt;property name="hibernate.connection.url"&amp;gt;
            jdbc:postgresql://127.0.0.1:5432/newsletter
        &amp;lt;/property&amp;gt;
        &amp;lt;property name="hibernate.connection.username"&amp;gt;
            newsletter
        &amp;lt;/property&amp;gt;
        &amp;lt;property name="hibernate.connection.password"&amp;gt;
            newsletter
        &amp;lt;/property&amp;gt;
        &amp;lt;property name="hibernate.hbm2ddl.auto"&amp;gt;
            update
        &amp;lt;/property&amp;gt;
        &amp;lt;property name="hibernate.format_sql"&amp;gt;
            true
        &amp;lt;/property&amp;gt;
        &amp;lt;property name="hibernate.use_outer_join"&amp;gt;
            true
        &amp;lt;/property&amp;gt;
        &amp;lt;property name="hibernate.cglib.use_reflection_optimizer"&amp;gt;
            true
        &amp;lt;/property&amp;gt;
        &amp;lt;property name="hibernate.connection.autocommit"&amp;gt;
            false
        &amp;lt;/property&amp;gt;
        &amp;lt;property name="hibernate.show_sql"&amp;gt;
            true
        &amp;lt;/property&amp;gt;
        &amp;lt;property name="current_session_context_class"&amp;gt;
            thread
        &amp;lt;/property&amp;gt;
        &amp;lt;mapping
            class="pl.net.bluesoft.rnd.newsletter.model.NewsletterCategory"/&amp;gt;
        &amp;lt;mapping
            class="pl.net.bluesoft.rnd.newsletter.model.NewsletterSubscription"/&amp;gt;
        &amp;lt;mapping
            class="pl.net.bluesoft.rnd.newsletter.model.NewsletterJob"/&amp;gt;
        &amp;lt;mapping
            class="pl.net.bluesoft.rnd.newsletter.model.NewsletterJobRecipient"/&amp;gt;
    &amp;lt;/session-factory&amp;gt;
&amp;lt;/hibernate-configuration&amp;gt;
&lt;/pre&gt;&lt;/div&gt;

&lt;!--&lt;script src="https://gist.github.com/1065233.js?file=hibernate-cfg.xml"&gt;&lt;/script&gt;--&gt;
&lt;div class="bls_article"&gt;
    &lt;div&gt;
        &lt;span style="color: rgb(0, 0, 0);"&gt;&lt;cite&gt;And in HibernateUtil.java we call
            SessionFactory.getCurrentSession():&lt;/cite&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style="font-size: 12px"&gt;
	&lt;pre class="brush: java;"&gt;
public static Session getSession() {
    return sessionFactory.getCurrentSession();
}
&lt;/pre&gt;&lt;/div&gt;
&lt;!--&lt;script src="https://gist.github.com/1065233.js?file=HibernateUtil%23getSession.java"&gt;&lt;/script&gt;--&gt;
&lt;div class="bls_article"&gt;
    &lt;h3&gt;
        &lt;span style="color: rgb(0, 0, 0);"&gt;Locale support&lt;/span&gt;&lt;/h3&gt;

    &lt;p&gt;
        &lt;span style="color: rgb(0, 0, 0);"&gt;As you may have noticed, there is some Locale-related code in our custom VaadinApplicationPortlet2.
            The code simply sets a value of a Locale for the running thread. Portlet container provides us with Locale
            value in PortletRequest and we propagate it further.&lt;/span&gt;
    &lt;/p&gt;
&lt;/div&gt;
&lt;div style="font-size: 12px"&gt;
	&lt;pre class="brush: java;"&gt;
protected void handleRequest(final PortletRequest request,
                             final PortletResponse response)
    throws PortletException, IOException {
    Session session = HibernateUtil.getSession();
    try {
        Transaction tx = session.beginTransaction();
        Locale locale = request.getLocale();
        VaadinUtil.setThreadLocale(locale);
        try {
            VaadinApplicationPortlet2.super
                .handleRequest(request, response);
        } finally {
            VaadinUtil.unsetThreadLocale();
        }
        tx.commit();
    } catch (Exception e) {
        session.getTransaction().rollback();
        throw new RuntimeException(e);
    }
}
&lt;/pre&gt;&lt;/div&gt;
&lt;!--&lt;script src="https://gist.github.com/1065233.js?file=VaadinApplicationPortlet2.java"&gt;&lt;/script&gt;--&gt;
&lt;div class="bls_article"&gt;
    &lt;span style="color: rgb(0, 0, 0);"&gt;This setting is used in&amp;nbsp;&lt;code&gt;pl.net.bluesoft.rnd.newsletter.gui.VaadinUtil &lt;/code&gt;utility class, e.g.:&lt;/span&gt;
&lt;/div&gt;
&lt;div style="font-size: 12px"&gt;
	&lt;pre class="brush: java;"&gt;
public static String getValue(String key) {
    return nvl(ResourceBundle.getBundle("newsletter-messages",
           nvl(LOCALE_THREAD_MAP.get(Thread.currentThread()),
               Locale.getDefault())).getString(key), key);
}

public static Label label(String key) {
    return new Label(getValue(key));
}
&lt;/pre&gt;&lt;/div&gt;

&lt;!--&lt;script src="https://gist.github.com/1065233.js?file=VaadinUtil%23getValue,label.java"&gt;&lt;/script&gt;--&gt;
&lt;div class="bls_article"&gt;
    &lt;div&gt;
        &lt;span style="color: rgb(0, 0, 0);"&gt;As you can see, standard java.util.ResourceBundle mechanism is used. Language-dependent texts are read from newsletter-messages.properties message bundle. Currently, default texts are in English, but one text is in Polish language. Vaadin allows us to use XHTML code in some cases.&lt;/span&gt;
    &lt;/div&gt;
    &lt;div&gt;
        &amp;nbsp;&lt;/div&gt;
    &lt;div&gt;
        &lt;span style="color: rgb(0, 0, 0);"&gt;&lt;em&gt;&lt;code&gt;newsletter-messages.properties:&lt;/code&gt;&lt;/em&gt;&lt;/span&gt;&lt;/div&gt;
    &lt;div&gt;
        &amp;nbsp;&lt;/div&gt;
&lt;/div&gt;
&lt;div style="font-size: 12px"&gt;
	&lt;pre class="brush: text;"&gt;
newsletter.subscription.email.prompt=Type in your email address...
newsletter.subscription.info=Please enter your &lt;b&gt;Email address&lt;/b&gt; \
and press &lt;b&gt;Subscribe&lt;/b&gt; to subscribe to a mailing \
  group or &lt;b&gt;Unsubscribe&lt;/b&gt; to cancel your subscription. \
In either case, you will receive confirmation code.&lt;br/&gt; \
  To enter your confirmation code, please click on the \
&lt;b&gt;I have confirmation code...&lt;/b&gt; link.
newsletter.subscription.subscribe=Subscribe
newsletter.subscription.unsubscribe=Unsubscribe
....
&lt;/pre&gt;&lt;/div&gt;

&lt;!--&lt;script src="https://gist.github.com/1065233.js?file=newsletter-messages.properties"&gt;&lt;/script&gt;--&gt;
&lt;div class="bls_article"&gt;
    &amp;nbsp;&lt;/div&gt;
&lt;div&gt;
    &lt;div&gt;
        &lt;div&gt;
            &lt;div&gt;
                &lt;div&gt;
                    &lt;span style="color: rgb(0, 0, 0);"&gt;&lt;em&gt;&lt;code&gt;newsletter-messages_pl.properties:&lt;/code&gt;&lt;/em&gt;&lt;/span&gt;
                &lt;/div&gt;
&lt;div style="font-size: 12px"&gt;
	&lt;pre class="brush: text;"&gt;
newsletter.subscription.email.prompt=Wprowadź adres email...
&lt;/pre&gt;&lt;/div&gt;
                &lt;div&gt;
                    &lt;span style="color: rgb(0, 0, 0);"&gt;Default messages are taken from newsletter-messages.properties,
                        but any locale-dependent values can be set in specific properties file.&lt;/span&gt;
                &lt;/div&gt;
                &lt;div&gt;
                    &amp;nbsp;&lt;/div&gt;
                &lt;h3&gt;
                    &lt;span style="color: rgb(0, 0, 0);"&gt;Vaadin widgets/layout&lt;/span&gt;&lt;/h3&gt;

                &lt;p&gt;
                    &lt;span style="color: rgb(0, 0, 0);"&gt;To make the code short, some of the most commonly used Widgets or Layouts have been provided by simple utility functions (enriched with Locale support where possible). &lt;/span&gt;&lt;span
                        style="color: rgb(0, 0, 0);"&gt;These functions have been grouped in the pl.net.bluesoft.rnd.newsletter.gui.VaadinUtil&amp;nbsp;utility class, e.g.:&lt;/span&gt;
                &lt;/p&gt;

                &lt;p&gt;
                    &amp;nbsp;&lt;/p&gt;
            &lt;/div&gt;
&lt;div style="font-size: 12px"&gt;
	&lt;pre class="brush: java;"&gt;
public static Label htmlLabel(String key) {
    return new Label(getValue(key), Label.CONTENT_XHTML);
}

public static Button button(String key) {
    return new Button(getValue(key));
}

public static Button button(String key, Button.ClickListener clickListener) {
    Button b = button(key);
    b.addListener(clickListener);
    return b;
}

public static void displayNotification(Window w, String titleKey) {
    displayNotification(w, titleKey, null);
}

public static HorizontalLayout hl(Component... components) {
    return hl("100%", components);
}

public static HorizontalLayout hl(String width, Component... components) {
    HorizontalLayout hl = new HorizontalLayout();
    hl.setSpacing(true);
    hl.setWidth(width);
    for (Component c : components) hl.addComponent(c);

    return hl;
}
&lt;/pre&gt;&lt;/div&gt;

            &lt;!--&lt;script src="https://gist.github.com/1065233.js?file=VaadinUtility.java"&gt;&lt;/script&gt;--&gt;
            &lt;div class="bls_article"&gt;
                &lt;div&gt;
                    &lt;span style="color: rgb(0, 0, 0);"&gt;example code using such functions and static imports is presented below:&lt;/span&gt;
                &lt;/div&gt;
            &lt;/div&gt;
&lt;div style="font-size: 12px"&gt;
	&lt;pre class="brush: java;"&gt;
categoriesList.addComponent(hl(
    simpleLabel(cat.getDescription(), "120px"),
    simpleLabel(cat.getNewsletterInfoFrom(), "150px"),
    simpleLabel(cat.getNewsletterInfoMessage(), "180px"),
    button("newsletter.admin.edit.change",
           new Button.ClickListener() {
               public void buttonClick(Button.ClickEvent event) {
                   displayEditWindow((NewsletterCategory)
                                      HibernateUtil.getSession()
                                         .get(NewsletterCategory.class,
                                              cat.getId()));
               }
           }),
    button("newsletter.admin.edit.remove",
           new Button.ClickListener() {
               public void buttonClick(Button.ClickEvent event) {
                   HibernateUtil.getSession().delete(
                         HibernateUtil.getSession().get(
                                NewsletterCategory.class, cat.getId()));
                   loadData();
               }
           })));
&lt;/pre&gt;&lt;/div&gt;

            &lt;!--&lt;script src="https://gist.github.com/1065267.js?file=SampleUI.java"&gt;&lt;/script&gt;--&gt;
            &lt;div class="bls_article"&gt;
                &lt;h3&gt;
                    &lt;span style="color: rgb(0, 0, 0);"&gt;Mailing support&lt;/span&gt;&lt;/h3&gt;

                &lt;p&gt;
                    &lt;span style="color: rgb(0, 0, 0);"&gt;Sending of emails is provided on the basis of Liferay API. Class&amp;nbsp;pl.net.bluesoft.rnd.newsletter.mailing.MailingHelper uses this API in a rather straightforward manner:&lt;/span&gt;
                &lt;/p&gt;

                &lt;p&gt;
                    &amp;nbsp;&lt;/p&gt;
            &lt;/div&gt;
&lt;div style="font-size: 12px"&gt;
	&lt;pre class="brush: java;"&gt;
package pl.net.bluesoft.rnd.newsletter.mailing;

import com.liferay.mail.service.MailServiceUtil;
import com.liferay.portal.kernel.mail.MailMessage;

import javax.mail.internet.InternetAddress;

...

public void sendEmail(String rcpt, String from, String subject,
                      String body, boolean sendHtml) {
    try {
        MailMessage mailMessage = new MailMessage();
        mailMessage.setBody(body);
        mailMessage.setHTMLFormat(sendHtml);
        mailMessage.setFrom(new InternetAddress(from));
        mailMessage.setTo(new InternetAddress(rcpt));
        mailMessage.setSubject(subject);
        MailServiceUtil.sendEmail(mailMessage);
    } catch (Exception e) {
        throw new RuntimeException(e);
    }
}
&lt;/pre&gt;&lt;/div&gt;

            &lt;!--&lt;script src="https://gist.github.com/1065267.js?file=MailingHelper.java"&gt;&lt;/script&gt;--&gt;
            &lt;div class="bls_article"&gt;
                &lt;div&gt;
                    &lt;span style="color: rgb(0, 0, 0);"&gt;This approach allows us to use only one SMTP/javax.mail configuration.&lt;/span&gt;
                &lt;/div&gt;
                &lt;h3&gt;
                    &lt;span style="color: rgb(0, 0, 0);"&gt;Message templating&lt;/span&gt;&lt;/h3&gt;

                &lt;p&gt;
                    &lt;span style="color: rgb(0, 0, 0);"&gt;Some entries from newsletter-messages.properties are used when sending technical emails to the user (e.g. email confirmation). Simple String-based mechanism is used:&lt;/span&gt;
                &lt;/p&gt;

                &lt;p&gt;
                    &amp;nbsp;&lt;/p&gt;
            &lt;/div&gt;
&lt;div style="font-size: 12px"&gt;
	&lt;pre class="brush: java;"&gt;
private String expandTemplate(String templateKey, String[]... vars) {
    String tmpl = getValue(templateKey);
    for (String[] var : vars) {
        tmpl = tmpl.replace("${" + var[0] + "}", var[1]);
    }
    return tmpl;
}
&lt;/pre&gt;&lt;/div&gt;

            &lt;!--&lt;script src="https://gist.github.com/1065267.js?file=templating.java"&gt;&lt;/script&gt;--&gt;
            &lt;div class="bls_article"&gt;
                &lt;div&gt;
                    &amp;nbsp;&lt;/div&gt;
                &lt;div&gt;
                    &lt;span style="color: rgb(0, 0, 0);"&gt;Which is sufficient for our example, but of course could be replaced by a Freemarker
                        templating mechanism in a future.&lt;/span&gt;
                &lt;/div&gt;
            &lt;/div&gt;
        &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;

&lt;div id="disqus_thread"&gt;
    &amp;nbsp;&lt;/div&gt;
&lt;script type="text/javascript"&gt;
    /* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
    var disqus_shortname = 'bluesoft'; // required: replace example with your forum shortname

    // The following are highly recommended additional parameters. Remove the slashes in front to use.
    var disqus_identifier = 'blogs/newsletter-for-liferay-introduction';
//    var disqus_url = 'http://www.bluesoft.net.pl/web/guest/rnd/blog/newsletter-for-liferay-introduction';

    /* * * DON'T EDIT BELOW THIS LINE * * */
    (function() {
    var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
    dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';
    (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
    })();
&lt;/script&gt;
&lt;noscript&gt;Please enable JavaScript to view the &lt;a href="http://disqus.com/?ref_noscript"&gt;comments powered by Disqus.&lt;/a&gt;
&lt;/noscript&gt;&lt;p&gt;
    &lt;a class="dsq-brlink" href="http://disqus.com"&gt;blog comments powered by &lt;span class="logo-disqus"&gt;Disqus&lt;/span&gt;&lt;/a&gt;
&lt;/p&gt;</summary>
    <dc:creator>Tomek Lipski</dc:creator>
    <dc:date>2011-10-10T20:48:29Z</dc:date>
  </entry>
  <entry>
    <title>Enterprise Applications for Liferay - made easy with Vaadin</title>
    <link rel="alternate" href="https://www.bluesoft.net.pl/en/rnd/blog/-/blogs/enterprise-applications-for-liferay-made-easy-with-vaadin" />
    <author>
      <name>Tomek Lipski</name>
    </author>
    <id>https://www.bluesoft.net.pl/en/rnd/blog/-/blogs/enterprise-applications-for-liferay-made-easy-with-vaadin</id>
    <updated>2011-10-10T21:03:36Z</updated>
    <published>2011-10-10T21:03:36Z</published>
    <summary type="html">&lt;div class="bls_article"&gt;
	&lt;p style="text-align: justify;"&gt;
		&lt;a href="http://liferay.com"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Liferay&lt;/span&gt;&lt;/a&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; is a great enterprise portal with many pre-built features and options. One feature, that is still missing from Liferay default bundle is a Newsletter Portlet.&lt;/span&gt;&lt;/p&gt;
	&lt;p style="text-align: justify;"&gt;
		&lt;span style="color: rgb(0, 0, 0);"&gt;In the following posts, I will demonstrate how easy it is to build enterprise-grade solutions with Liferay and one of the best RIA frameworks - &lt;/span&gt;&lt;a href="http://www.vaadin.com"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Vaadin&lt;/span&gt;&lt;/a&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&amp;nbsp;on the example of a Newsletter Portlet. The&amp;nbsp;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 0);"&gt;Java code is very short (for Java standards at least) - only 1403 lines.&lt;/span&gt;&lt;/p&gt;
	&lt;p style="text-align: justify;"&gt;
		&lt;span style="color: rgb(0, 0, 0);"&gt;The solution uses simple Hibernate/JPA classes to provide persistency and supports multilingual (i18n) deployments using &lt;em&gt;java.util.ResourceBundle&lt;/em&gt; mechanism. Sending emails is done using &amp;nbsp;means provided by Liferay - &lt;em&gt;com.liferay.mail.service.MailServiceUtil&lt;/em&gt;.&lt;/span&gt;&lt;/p&gt;
	&lt;p style="text-align: justify;"&gt;
		&lt;span style="color: rgb(0, 0, 0);"&gt;For the impatient: Newsletter Portlet has already been developed and tested and is available under GNU LGPL at&amp;nbsp;&lt;/span&gt;&lt;a href="https://github.com/tlipski/newsletter-for-liferay"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;https://github.com/tlipski/newsletter-for-liferay&lt;/span&gt;&lt;/a&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;.&lt;/span&gt;&lt;/p&gt;
	&lt;p style="text-align: justify;"&gt;
		&lt;span style="color: rgb(0, 0, 0);"&gt;If you have any comments or questions, do not hesitate to contact me at:&amp;nbsp;&lt;/span&gt;&lt;a href="mailto:tlipski@bluesoft.net.pl"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;tlipski@bluesoft.net.pl&lt;/span&gt;&lt;/a&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
	&lt;p&gt;
		&lt;span class="Apple-style-span" style="font-size: 17px; font-weight: bold; color: rgb(0, 0, 0);"&gt;Subscription Portlet&lt;/span&gt;&lt;/p&gt;
	&lt;p style="text-align: justify;"&gt;
		&lt;span style="color: rgb(0, 0, 0);"&gt;Subscription Portlet can be available to all users - whether logged in or not. User can subscribe or unsubscribe and confirm the operation using token received by e-mail.&lt;/span&gt;&lt;/p&gt;
	&lt;p style="text-align: center;"&gt;
		&lt;a href="https://www.bluesoft.net.pl/image/image_gallery?uuid=67d15788-6348-468c-a1b8-b0d1cf1ddcc8&amp;amp;groupId=21322&amp;amp;t=1310115809233" rel="lightbox[page]"&gt;&lt;img alt="" src="https://www.bluesoft.net.pl/image/image_gallery?uuid=67d15788-6348-468c-a1b8-b0d1cf1ddcc8&amp;amp;groupId=21322&amp;amp;t=1310115809233" style="width: 350px; height: 302px;" /&gt;&lt;/a&gt;&lt;/p&gt;
	&lt;p style="text-align: center;"&gt;
		&amp;nbsp;&lt;/p&gt;
	&lt;p style="text-align: center;"&gt;
		&lt;a href="https://www.bluesoft.net.pl/image/image_gallery?uuid=a54b4160-5c2e-4a22-b2a2-2e394fcf7578&amp;amp;groupId=21322&amp;amp;t=1310115809234" rel="lightbox[page]"&gt;&lt;img alt="" src="https://www.bluesoft.net.pl/image/image_gallery?uuid=a54b4160-5c2e-4a22-b2a2-2e394fcf7578&amp;amp;groupId=21322&amp;amp;t=1310115809234" style="width: 350px; height: 191px;" /&gt;&lt;/a&gt;&lt;/p&gt;
	&lt;h3&gt;
		&lt;span class="Apple-style-span" style="color: rgb(0, 0, 0);"&gt;Newsletter Sending Portlet&lt;/span&gt;&lt;/h3&gt;
	&lt;h3 style="text-align: center;"&gt;
		&lt;a href="https://www.bluesoft.net.pl/image/image_gallery?uuid=690ad094-efd0-48d8-9652-c33cc74a31c7&amp;amp;groupId=21322&amp;amp;t=1310115809230" rel="lightbox[page]"&gt;&lt;img alt="" src="https://www.bluesoft.net.pl/image/image_gallery?uuid=690ad094-efd0-48d8-9652-c33cc74a31c7&amp;amp;groupId=21322&amp;amp;t=1310115809230" style="width: 350px; height: 344px;" /&gt;&lt;/a&gt;&lt;/h3&gt;
	&lt;h3&gt;
		&amp;nbsp;&lt;/h3&gt;
	&lt;h3 style="text-align: center;"&gt;
		&lt;a href="https://www.bluesoft.net.pl/image/image_gallery?uuid=5cea6cef-3ff0-4e70-a466-6aaea06ed248&amp;amp;groupId=21322&amp;amp;t=1310115809231" rel="lightbox[page]"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;img alt="" src="https://www.bluesoft.net.pl/image/image_gallery?uuid=5cea6cef-3ff0-4e70-a466-6aaea06ed248&amp;amp;groupId=21322&amp;amp;t=1310115809231" style="width: 350px; height: 371px;" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
	&lt;h3&gt;
		&lt;span style="color: rgb(0, 0, 0);"&gt;Newsletter Admin Portlet&lt;/span&gt;&lt;/h3&gt;
	&lt;p style="text-align: center;"&gt;
		&lt;a href="https://www.bluesoft.net.pl/image/image_gallery?uuid=fd8b1aa3-2021-4e61-934f-ef21eec4125b&amp;amp;groupId=21322&amp;amp;t=1310115809232" rel="lightbox[page]"&gt;&lt;img alt="" src="https://www.bluesoft.net.pl/image/image_gallery?uuid=fd8b1aa3-2021-4e61-934f-ef21eec4125b&amp;amp;groupId=21322&amp;amp;t=1310115809232" style="width: 350px; height: 195px;" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;</summary>
    <dc:creator>Tomek Lipski</dc:creator>
    <dc:date>2011-10-10T21:03:36Z</dc:date>
  </entry>
</feed>


