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

<channel>
	<title>Xebia Blog &#187; Sander Hautvast</title>
	<atom:link href="http://blog.xebia.com/author/shautvast/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.xebia.com</link>
	<description>Software development done right!</description>
	<lastBuildDate>Wed, 01 Feb 2012 00:30:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Middleware Management pitfalls 8. Application immaturity</title>
		<link>http://blog.xebia.com/2010/08/20/middleware-management-pitfalls-8-application-immaturity/</link>
		<comments>http://blog.xebia.com/2010/08/20/middleware-management-pitfalls-8-application-immaturity/#comments</comments>
		<pubDate>Fri, 20 Aug 2010 09:29:21 +0000</pubDate>
		<dc:creator>Sander Hautvast</dc:creator>
				<category><![CDATA[kanban]]></category>
		<category><![CDATA[lean architecture]]></category>
		<category><![CDATA[Middleware]]></category>

	<!-- AutoMeta Start -->
	<category></category>
	<!-- AutoMeta End -->
	
		<guid isPermaLink="false">http://blog.xebia.com/?p=5218</guid>
		<description><![CDATA[This is number 8, the third article in a top10 of middleware management pitfalls. The previous article dealt with infrastructure. This time I´ll discuss the application itself. There has been much cool stuff lately about devops and devs and ops working together in one team, like at sky.com. The uncool reality for a lot of [...]]]></description>
			<content:encoded><![CDATA[<p>This is number 8, the third article in a top10 of middleware management pitfalls. The <a href="http://blog.xebia.com/2010/06/04/middleware-management-pitfalls-9-differences-between-test-and-production/">previous article</a> dealt with infrastructure. This time I´ll discuss the application itself.</p>
<p>There has been much cool stuff lately about <a href="http://www.jedi.be/blog/2010/02/12/what-is-this-devops-thing-anyway/">devops</a> and devs and ops working together in one team, like at <a href="http://www.infoq.com/presentations/Sky.com-Infrastructure">sky.com</a>. The uncool reality for a lot of companies is that dev and ops are separated in different departments and don´t communicate well. Immature applications, at least from a middleware perspective, are what you get.</p>
<p><span id="more-5218"></span></p>
<p>One of the aims of middleware is to provide standard components to application programmers. Two of the nicest and widespread examples of this are JDBC and the datasource. JDBC, being an industry standard, is a powerful abstraction delivered by software vendors to enable communication to their database product. The datasource is another abstraction, delivered by application server administrators, to enable communication to the database that their company uses. The latter hides features like connection pooling, statement caching and database specific properties. In the early days of J2EE, though, you were likely to find applications that did not use these features. Instead the application programmers had decided to build them from scratch. A lot of Xebians have in the past removed these homegrown “frameworks” and replaced custom constructs with datasources and the like. These days are over by now….or, so it seems.</p>
<p>It is no longer the homegrown datasources that should worry us. Application reinvents platform, again. Why? Because developers don´t know the platform their applications run on. The reason: middleware products have become vastly complicated, their range expanded into remote galaxies, their depth unknown as the depths of the ocean. Am I exaggerating?<br />
Architects can no longer focus on the mere coding part of an application. The days of just servlets and EJB´s are over. We are confronted with ESB´s, BPM, J2EE, CMS´s and growing integration needs with all kinds of back-ends. An immature application would be one that reinvents an ESB. Or consider the company in which the middleware department has bought a  BPM platform (like Oracle SOA suite, or Websphere process server) but at the same time is implementing web services choreography using plain java, because no architectural guidelines (that dictate the use of BPM) have yet been presented to them. The term “immature” is relative to the “maturity” of the middleware stack at hand. </p>
<li>Immature security will pose security risks.</li>
<li>Immature applications have more bugs</li>
<li>An immature application costs more than necessary and will undo the cost reduction promised by middleware vendors. Immature applications have a higher TCO because of the ongoing administrative burden after going live.</li>
<p>I´m not saying that you are obliged to use the middleware vendor solution for any given problem. Take web services. There are plenty mature open source stacks that will enable you to build them and not use the (outdated) vendor solution. It’s up to the architect to make such decisions. (What is the fundamental difference between a library and middleware? Both should make your coding life easier).</p>
<p>All enterprisy applications need a minimum level of quality regarding  deployability and maintainability:</p>
<li>Adequate logging</li>
<li>A simple and standardized way of providing environment specifics (properties)</li>
<li>Repeatable (automated) build process</li>
<li>Release and deployment notes (guidelines for the deployer)</li>
<li>Performance tests included</li>
<li>No delivery of single jar files or jsp’s (never)</li>
<li>security guidelines</li>
<li>policy on use of open source libraries (which and which not, and whether and when to upgrade them&#8230;)</li>
<p>Developers should know and use these rules. Administrators should know and enforce them.<br />
All companies that want to use their middleware effectively need someone who can act as a stakeholder for the administrative department. He, she, or they must actively spread the middleware knowledge among development teams, architects, designers and administrators. Analysis must result in the identification of generic services that can and will be reused. The architecture and the working software should be implemented accordingly.  If necessary, a set of criteria must be issued that serves as a barrier against immaturity. Envision a tool that inspects developers deliverables (EAR files) and generates a report that clearly states if an application passes or not (AFAIK there is no such thing). </p>
<li>The use of middleware affects the risk and the number of story points of individual user stories. So the middleware architect should be in the planning meetings. At least until the developers know the drill.</li>
<li>A middleware competence center is a way of bundling knowledge and practices. It comprises a team of professionals from different backgrounds, architects, developers, deployers, administrators, dba´s etcetera. They serve to contain and spread the middleware knowledge.</li>
<li>Lean thinking and kanban is a way of organizing and optimizing the middleware center team. There is a small number of interesting <a href="http://blog.nistu.de/Kanban_in_Operations___The_Idea.html">blogs</a> (thanks <a href="http://twitter.com/nistude">@nistude</a>) on this subject. I´ll blog on my own experiences in the near future. </li>
<div name="googleone_share_1" style="position:relative;z-index:5;float: right; margin-left: 10px;"><g:plusone size="small" count="1" href="http://blog.xebia.com/2010/08/20/middleware-management-pitfalls-8-application-immaturity/"></g:plusone></div><p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fblog.xebia.com%2F2010%2F08%2F20%2Fmiddleware-management-pitfalls-8-application-immaturity%2F&amp;title=Middleware%20Management%20pitfalls%208.%20Application%20immaturity" id="wpa2a_2"><img src="http://blog.xebia.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://blog.xebia.com/2010/08/20/middleware-management-pitfalls-8-application-immaturity/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Middleware Management pitfalls 9. Differences between test and production</title>
		<link>http://blog.xebia.com/2010/06/04/middleware-management-pitfalls-9-differences-between-test-and-production/</link>
		<comments>http://blog.xebia.com/2010/06/04/middleware-management-pitfalls-9-differences-between-test-and-production/#comments</comments>
		<pubDate>Fri, 04 Jun 2010 15:09:15 +0000</pubDate>
		<dc:creator>Sander Hautvast</dc:creator>
				<category><![CDATA[Middleware]]></category>
		<category><![CDATA[Project Management]]></category>
		<category><![CDATA[Testing]]></category>
		<category><![CDATA[DTAP]]></category>
		<category><![CDATA[omgevingsverschillen]]></category>
		<category><![CDATA[OTAP]]></category>

	<!-- AutoMeta Start -->
	<category></category>
	<!-- AutoMeta End -->
	
		<guid isPermaLink="false">http://blog.xebia.com/?p=4821</guid>
		<description><![CDATA[In this episode of the middleware pitfalls top-10 we want to discuss the merits of a clean and standardized set of (test) environments. Some refer to such a set as DTAP, an acronym for Development, Test, Acceptance-test (or pre-production) and Production. From here on the text contains capitals to indicate an environment. Basically the situation [...]]]></description>
			<content:encoded><![CDATA[<p>In this episode of the middleware pitfalls <a href=”http://blog.xebia.com/2010/05/12/middleware-management-pitfalls-10-the-dependency-problem/”>top-10</a> we want to discuss the merits of a clean and standardized set of (test) environments. Some refer to such a set as DTAP, an acronym for Development, Test, Acceptance-test (or pre-production) and Production. From here on the text contains capitals to indicate an environment.  Basically the situation is like testing itself: you will never get it 100% right, but it will help you a lot if you invest in a sound, maintainable DTAP. </p>
<p><span id="more-4821"></span><br />
The following example is loosely based on the situation at one of our recent customers. They have a pretty impressive set of applications and services that together implement mission-critical functions for various types of end-users. The backend consists of pre-web technology that is accessed via web services. The backend application is roughly ten years old, has had its fair share of problems in the past but is now quite stable. The team has developed a release schedule they feel is vital for ensuring stability. Every three months after rigorous testing in the Development environment, the new release is put in Test. From there on, the application is eventually rolled out in Production. It has been like this for years.</p>
<p>The web teams have a Development environment as well (not being their desktops), but it is populated with odd developer data, which makes it unusable for testers. So the testers  maintain their test-data in the Test databases. They all work in Scrum teams (unlike the backend team), so testing here is a continuous activity. You can by now guess what the problem is. The Scrum testers will have to wait three months to get their features tested, because they very much depend on the backend system. </p>
<p>To add to this, there´s also a set of user stories that need interaction with external companies. The network guys have decided that their firewalls will only be really opened in the Acceptance environment. So, only after all functional testing has been done in Test, and in a stage of the project where the ultimate deadline approaches (you know the deal, marketing has already started a radio campaign, stating that on that day the website will be totally “new and improved“), only then you are able to test the b2b functions. Of course all project planning has turned out a little too optimistic, but so far, everything is going pretty smoothly.</p>
<p>Less than a week before going live someone in the web team discovers that his application in Acceptance is actually connected to the security component in Test. Acceptance and Production is 100% equal (as it should) but Test differs in unclear ways. So the Acceptance component has never been tested. Now suddenly, there´s no guarantee that Production will work! One day later: more horror: security in Test and Acceptance is totally different. In Acceptance, it does not work!</p>
<p>You can imagine the stresslevels at this time. Luckily the story ends well, although it cost them a lot of hard work.</p>
<p><strong>The problems exist at different levels. </strong><br />
•	Organizational: different teams have different views and practices concerning the test environments. In the example this resulted in testing too late. </p>
<p>•	Procedural: Changes to the environments are not evaluated and recorded (or only in production). You will have spaghetti!</p>
<p>•	Conscious decisions: The firewall policy in the example. Not bad in itself, but results in late testing.</p>
<p>•	Errors: unexpected or wrong connections between components in different test environments. </p>
<p>•	Documentation debt: the lack of adequate up-to-date technical documentation (diagrams). </p>
<p>•	Negligence: changes to one environment are not replicated in other environments.</p>
<p>•	Mindset: “this error will probably not show up in acceptance and production”. This belief originating in existing DTAP differences will open the door for mister Murphy, who is sure to enter the room.</p>
<p>•	Scaling differences: the Development environment has no clustering. This could implicate errors later on, due to applications not being able to be clustered.</p>
<p>The longer companies allow DTAP problems to exist, the harder they will be to correct. That is no rocket science. Probably everyone in IT knows it, including the responsible managers. It might be a little bit difficult to explain to the financial guy, the product owner or the customer. It´s like code refactoring. You will have to explain the need for internal housekeeping in order to get the necessary budget. </p>
<p><em>So what to do?</em> Again this is no rocket science. The main point of this blog is that you need the awareness that things are wrong and that this will result in delayed projects, having more bugs than necessary, rising stress levels, frustration or anger between developers, testers, and administrators. </p>
<p><strong>Some words of advice:</strong><br />
•	Turn the right (amount of) knobs. All changes must be approved and coordinated by a change manager. Replicate the changes. Document them. Test the test environment after every change</p>
<p>•	Keep it simple. Do not introduce too many differences, because of lower costs. It will increase administrative burden. So create that cluster in Development, but scale to a lower number of cluster members.</p>
<p>•	Get your teams aligned. They must share the way in which they treat a test environment, including release cycles.</p>
<p>•	Be defensive. Be pessimistic. Pessimistic people are often right. An administrators’ error often has far bigger impact than a programmers’. Test everything.</p>
<div name="googleone_share_1" style="position:relative;z-index:5;float: right; margin-left: 10px;"><g:plusone size="small" count="1" href="http://blog.xebia.com/2010/06/04/middleware-management-pitfalls-9-differences-between-test-and-production/"></g:plusone></div><p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fblog.xebia.com%2F2010%2F06%2F04%2Fmiddleware-management-pitfalls-9-differences-between-test-and-production%2F&amp;title=Middleware%20Management%20pitfalls%209.%20Differences%20between%20test%20and%20production" id="wpa2a_4"><img src="http://blog.xebia.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://blog.xebia.com/2010/06/04/middleware-management-pitfalls-9-differences-between-test-and-production/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Middleware Management pitfalls 10. The dependency problem</title>
		<link>http://blog.xebia.com/2010/05/12/middleware-management-pitfalls-10-the-dependency-problem/</link>
		<comments>http://blog.xebia.com/2010/05/12/middleware-management-pitfalls-10-the-dependency-problem/#comments</comments>
		<pubDate>Wed, 12 May 2010 07:59:49 +0000</pubDate>
		<dc:creator>Sander Hautvast</dc:creator>
		<br />
<b>Warning</b>:  Invalid argument supplied for foreach() in <b>/home/blog.xebia.com/www/wp-content/plugins/autometa/autometa.php</b> on line <b>303</b><br />
		<category><![CDATA[Middleware]]></category>

	<!-- AutoMeta Start -->
	<!-- AutoMeta End -->
	
		<guid isPermaLink="false">http://blog.xebia.com/?p=4663</guid>
		<description><![CDATA[This is the first blog in a series that describes the top 10 of Java EE middleware management problems. It´s title could also be “single point of failure”. This is not about software. Instead, it’s about the person in your middleware team that everybody relies on, and clings to when things get difficult or even [...]]]></description>
			<content:encoded><![CDATA[<p>This is the first blog in a series that describes the top 10 of Java EE middleware management problems.  It´s title could also be “single point of failure”. This is not about software. Instead, it’s about the person in your middleware team that everybody relies on, and clings to when things get difficult or even worse, get totally out of hand. </p>
<p><img src="http://blog.xebia.com/wp-content/uploads/2010/05/20100511151328687_00011.jpg" alt="single point of failure" title="single point of failure" width="217" height="388" align="left" class="alignnone size-full wp-image-4665" /><br />
<span id="more-4663"></span><br />
Imagine a typical middleware team in a fairly sized company. John is the manager of this team. The middleware team is continuously struggling to keep up with all the new products that are introduced by development teams and their solutions. The team members and Unix administrators Leo and Lloyd are maintaining the J2EE application servers, web servers and a queuing product to connect to the old company’s mainframe.  They are fairly successful in their jobs, at least the number of incidents has subsided, performance is reasonably good, they know how to deploy new software versions, and they do middleware upgrades in the evening hours.</p>
<p>The Unix gurus Leo and Lloyd both have a long history with the company and will probably stay with the company until their retirement. The new guy Dave (originally also a Unix administrator) has undertaken the effort of getting to know all this new fancy Java stuff. When Dave is not in the office, Leo and Lloyd are a bit helpless as far as the application server is concerned.</p>
<p>Dave recently improved the availability of the company’s website by introducing clustering, has written deployment scripts to improve on deployment speed and quality, and worked with developers to get better log statements from the application. He shows ambition. He works late hours, seemingly ignoring the continuing stream of incidents and the nagging customers at the helpdesk. Over and over John praises Dave, provides him with raises and bonuses, persuades him with some success to spread his knowledge and hires new people to assist him (they all left by the way). </p>
<p>John has become dependent on Dave for his day-to-day operations and middleware development surrounding the growing middleware management stack and this situation worries John. If Dave ever decides to leave, the company will be in big trouble. A new project wants to introduce BPM tooling and Dave is already reading the product documentation. Leo and Lloyd are not able to keep up with Dave, and by the way, BPM tooling is way out of their league. Hiring an expensive external consultant could ease the pain here, but only temporarily. Some knowledge of the BPM product should be secured in the organization. John has a hard time guaranteeing website stability and supporting innovation in new projects.<br />
Dave is willing, but cannot share his intimate knowledge of the application server, because there’s no one able to understand anything beyond the basics. Dave himself likes his job, but might have other goals and dreams as well, like an occasional holiday or raising a family, things that interfere with the weekend and midnight work. Moreover he has just found out that he is actually tired of the multitude of repetitive tasks he has to deal with every day. He’d rather be a developer, or even an architect. How did he end up here?<br />
John has a “dependency problem”, because he has become “addicted” to Dave who is the “hero” that keeps the middleware operation and middleware development going. This is a risk to the availability of the company’s website and the projects that need work done in test environments. The company may lose customers and projects might run late.<br />
There is a growing need for experts in the middleware field that have more skills than the average administrator, but do understand the administrator’s problems and worries. Often middleware experts are external consultants who assist in development projects and move on to new ones instead of sticking to work they find mindless. So what can John do to maintain a healthy team of middleware oriented professionals?<br />
Above all, John needs to find a person that Dave can team up with. John could try and motivate Leo or Lloyd (or both) to learn the skills needed to get to a certain level of expertise that Dave recognizes. The problem here is that Leo and Lloyd are excellent Unix administrators, Java and BPM are out-of-scope. Another problem might be the (lack of) ability of Leo and Lloyd to learn this new fancy Java stuff and the BPM middleware.</p>
<p>If John can prove to his manager that the middleware team is not properly scaled with regard to the amount of work (the team is undersized) then John could try and find one or more skilled middleware professionals and expand the team. John might be facing a big challenge here because skilled middleware professionals are pretty hard to come by these days, unless you are willing to pay.</p>
<p>Dave’s assignment will be to “share knowledge”. But if Dave does not want to cooperate then John needs to persuade him to change his behavior. He also needs to stimulate Dave to share his knowledge, by stating his expertise in the matter, and by emphasizing the negative effects of his behavior (like his own fatigue or the risk of downtime if he’s on holiday). If that does not help then John might want to dig deeper to find out Dave’s personal motives. Is it competitiveness, prestige, perfectionism or lack of social skills? This might become a psychological exercise. </p>
<p>The problem could also be in the technology itself. If John is not able to support the system with his team members, he could try to eliminate complexity, standardize as much as possible, take out error-prone procedures and automate boring repetitive tasks. Or switch to other technologies that are widely supported.</p>
<p>As it turns out, quite a number of us have been in hero-like situations ourselves. Looking back I ask myself: “What kept me there in the first place? Was it the sense of being needed that felt pleasant? It stopped me from growing as a person and as a professional. I’m happy I left in the end and guess what, they still exist…”</p>
<div name="googleone_share_1" style="position:relative;z-index:5;float: right; margin-left: 10px;"><g:plusone size="small" count="1" href="http://blog.xebia.com/2010/05/12/middleware-management-pitfalls-10-the-dependency-problem/"></g:plusone></div><p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fblog.xebia.com%2F2010%2F05%2F12%2Fmiddleware-management-pitfalls-10-the-dependency-problem%2F&amp;title=Middleware%20Management%20pitfalls%2010.%20The%20dependency%20problem" id="wpa2a_6"><img src="http://blog.xebia.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://blog.xebia.com/2010/05/12/middleware-management-pitfalls-10-the-dependency-problem/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Middleware is at the heart of IT</title>
		<link>http://blog.xebia.com/2010/04/28/middleware-is-at-the-heart-of-it/</link>
		<comments>http://blog.xebia.com/2010/04/28/middleware-is-at-the-heart-of-it/#comments</comments>
		<pubDate>Wed, 28 Apr 2010 09:02:19 +0000</pubDate>
		<dc:creator>Sander Hautvast</dc:creator>
		<br />
<b>Warning</b>:  Invalid argument supplied for foreach() in <b>/home/blog.xebia.com/www/wp-content/plugins/autometa/autometa.php</b> on line <b>303</b><br />
		<category><![CDATA[Architecture]]></category>
		<category><![CDATA[Java]]></category>

	<!-- AutoMeta Start -->
	<!-- AutoMeta End -->
	
		<guid isPermaLink="false">http://blog.xebia.com/?p=4501</guid>
		<description><![CDATA[What is ‘middleware’? French professor Sacha Krakowiak defines middleware as [a] software layer [which role] is to make application development easier, by providing common programming abstractions, by masking the heterogeneity and the distribution of the underlying hardware and operating systems, and by hiding low-level programming details This makes sense, considering the fact that writing an [...]]]></description>
			<content:encoded><![CDATA[<p>What is ‘middleware’? French professor <a href="http://sardes.inrialpes.fr/~krakowia/">Sacha Krakowiak</a> defines middleware</p>
<p><em>as [a] software layer [which role] is to make application development easier,<br />
by providing common programming abstractions,<br />
by masking the heterogeneity and the distribution of the underlying hardware and operating systems,<br />
and by hiding low-level programming details</em></p>
<p>This makes sense, considering the fact that writing an http server nowadays or a servlet-container is not considered sane anymore, given the multitude of commercial and open source products that have already proven themselves. Over the years a range of products and standards has emerged that to a growing extent hide the low-level intricacies and provide the application programmer with easy yet powerful abstractions. They range from webservers, databases and application servers to EBS´s and BPM platforms. They form the IT landscape that enable modern business. And it´s <em>their heterogeneity and distribution</em> that is at the heart of the emerging problems that we will address in a top-10 style series of blogs in the coming weeks.<br />
<span id="more-4501"></span><br />
<strong>Middleware adds a new level of complexity</strong></p>
<p>Application servers (for instance) solve a lot of problems regarding web-based applications. With it come higher level problems, regarding enterprise wide infrastructure and integration.  Middleware problems occur typically in a medium to large enterprises that have seen their primary business become more and more dependent on internet based applications. The problems have their origins and solutions in technology, as well as in organizational psychology. It’s about people, their knowledge, span of control and their being involved in other processes in the company.</p>
<p>The 10 issues have formed our frame of mind that we use to assess companies that ask us to audit their software development and operation processes. They all have had to find answers to problems that application servers have not solved satisfactorily like deployment or synchronizing test and production environments. They have come to realize the fact that middleware is (often) the battleground where developers and administrators meet.  And they have trouble finding people with the right technical skills and at the same time have the ability to mediate between these two groups.</p>
<p><strong>Middleware is here to stay</strong></p>
<p>Writing software is to a growing degree about combining existing components using code and configuration. Integrating the wide range of infrastructural components requires detailed knowledge of the platform and the ability to guide developers. This typically is an architect’s job . This architect should also be in contact with business consultants, to be able to wield the power of middleware to underpin the success of business initiatives in the long run. While projects deal with immediate needs, the middleware is a long-term investment, requiring revision over time. Failing to understand this is a recipe for trouble.</p>
<p><strong>Middleware requires management</strong></p>
<p>Middleware management is not solely about application development, or application lifecycle management, nor is it part of a helpdesk or just another form of systems management. It´s about all of that and more. It´s at the heart of an IT organization. This means that middleware people should be involved in decision making processes, which is often not the case. On the other hand, the middleware people should streamline their work, stay updated on technology and work along principles and best practices, or they will be an impediment for the projects they support.</p>
<p>Number 10 on the list is the “dependency problem”, meaning: systems availability should not depend on that one expert alone.</p>
<div name="googleone_share_1" style="position:relative;z-index:5;float: right; margin-left: 10px;"><g:plusone size="small" count="1" href="http://blog.xebia.com/2010/04/28/middleware-is-at-the-heart-of-it/"></g:plusone></div><p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fblog.xebia.com%2F2010%2F04%2F28%2Fmiddleware-is-at-the-heart-of-it%2F&amp;title=Middleware%20is%20at%20the%20heart%20of%20IT" id="wpa2a_8"><img src="http://blog.xebia.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://blog.xebia.com/2010/04/28/middleware-is-at-the-heart-of-it/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>J(2)ee, the basics and beyond</title>
		<link>http://blog.xebia.com/2009/06/30/j2ee-the-basics-and-beyond-starting-threads/</link>
		<comments>http://blog.xebia.com/2009/06/30/j2ee-the-basics-and-beyond-starting-threads/#comments</comments>
		<pubDate>Tue, 30 Jun 2009 19:33:41 +0000</pubDate>
		<dc:creator>Sander Hautvast</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Middleware]]></category>
		<category><![CDATA[Concurrency Control]]></category>
		<category><![CDATA[websphere]]></category>

	<!-- AutoMeta Start -->
	<category></category>
	<!-- AutoMeta End -->
	
		<guid isPermaLink="false">http://blog.xebia.com/?p=2305</guid>
		<description><![CDATA[In this series I want to address some topics that are old and well known, but still seem to puzzle developers and administrators in a j2ee environment. Think of anything in or around an application server. When talking of application servers I mostly refer to websphere. Sadly I have no real experience using any other. Yet I aim to keep a broad perspective, not to narrow the audience. The level should be beginner to intermediate.]]></description>
			<content:encoded><![CDATA[<p>In this series I want to address some topics that are old and well known, but still seem to puzzle developers and administrators in a j2ee environment. Think of anything in or around an application server. When talking of application servers I mostly refer to websphere. Sadly I have no real experience using any other. Yet I aim to keep a broad perspective, not to narrow the audience. The level should be beginner to intermediate.</p>
<p><strong>Part1 Starting your own threads.</strong></p>
<p>As long as I worked with application servers, people have always told me not to start my own threads, because the j2ee specification states that this is forbidden. These threads are also referred to as &#8216;naked&#8217; and &#8216;unmanaged&#8217;. The danger they pose is doing things that the application server knows nothing about. It could cause resource leaks, no debugging, failing to stop a server or security problems.</p>
<p>Yet there is a number of open source frameworks that do just this, and no one seems to object. Think of quartz, or Log4j (the watchdog that monitors changes in log4j settings). And even the jdk itself is guilty: use of java.util.Timer also causes so called unmanaged threads.</p>
<p><span id="more-2305"></span>And until now the application servers I know haven´t objected either. So applications were actually free to spawn whatever they want and get away with it.</p>
<p>There was also a reason not to change this situation. The way in which it worked made the application dependent on application server internals. In the case of websphere, the method is fully supported by IBM and didn´t change in websphere 6 for instance; yet developers are reluctant to build software that won´t run on other application servers. This certainly makes migration easier.  A disadvantage (of creating your won threads) is that you´re on your own when it comes to transaction management and concurrency control.</p>
<p>The way it worked was:</p>
<p>implement <em>com.ibm.websphere.asynchbeans.Work</em>, obtain a workmanager from jndi and submit the Work class to the manager.</p>
<p>For some time now there is commonj. This is a set of interfaces that have to be implemented by j2ee vendors.<br />
Now you can implement  <em>commonj.work.Work</em>, obtain a workmanager from jndi and submit the Work class</p>
<p>The main advantage of this is that commonj can be supported by other application servers. Weblogic 9.0+ does it, geronimo, and sadly no other, until now (afaik). So your application is now only a bit more portable. I think commonj could be made to work with jboss AS. You´d have to implement the workmanager (and other classes) yourself, as an Mbean.</p>
<p>The spring javadoc mentions the lack of official vendor support for commonj with some regret. And I have not been able to find any information about the origins and the future for commonj.<br />
Talking of Spring, they provide a couple of very useful classes that simplify even further the above procedure:</p>
<p>create a <em>org.springframework.scheduling.commonj.WorkManagerTaskExecutor</em> instance, providing a jndi name and submit any Runnable class. You only need commonj on your build path, which is in the spring dependencies.</p>
<p>If you happen to run in websphere 6.1 you´ll have a WorkManager by default using wm/default for the jndi lookup. At lookup a log entry will appear stating that you didn´t use a resource reference. Yet it will all work just fine.</p>
<p>Add the resource reference by putting the next lines in your web.xml</p>
<p><code><br />
&lt;resource-ref&gt;<br />
&nbsp;&nbsp;&nbsp;&lt;res-ref-name&gt;wm/WorkManager&lt;/res-ref-name&gt;<br />
&nbsp;&nbsp;&nbsp;&lt;res-type&gt;commonj.work.WorkManager&lt;/res-type&gt;<br />
&nbsp;&nbsp;&nbsp;&lt;res-auth&gt;Container&lt;/res-auth&gt;<br />
&nbsp;&nbsp;&nbsp;&lt;res-sharing-scope&gt;Shareable&lt;/res-sharing-scope&gt;<br />
&lt;/resource-ref&gt;<br />
</code></p>
<p>The deployer will have to map this to the actual WorkManager at deploy time.</p>
<p>Spring will add java:comp/env to your jndi name if you set the flag resourceRef to true.</p>
<p>Both commonj and spring also support scheduling of jobs. This could be a safer way than using quartz, especially if your jobs need database access. </p>
<p>Configuring the WorkManager is another thing. Your administrator will have to know how many threads you expect. In Websphere you can also specify if the JAAS subject of the scheduling thread will have to be passed on to the scheduled thread. If disabled, the scheduled thread will have no security context. It will not be able to call EJB´s or other services (unless they do their own login).</p>
<p>The growable property makes the threadpool  maximum obsolete and any number of threads can be started. This is all right as long as there are enough resources. It&#8217;s probably a good setting for finding out the number of threads in certain situations (like under load). Once you´ve established this number, apply it as the maximum for the threadpool and disable growable.</p>
<p><strong>Conclusion</strong></p>
<p>There is no reason to create naked threads. Aapache and two major vendors support commonj. Existing applications and frameworks that run in a j2ee container should be adjusted to at least try to obtain a commonj WorkManager, before resorting to creating threads itself. Spring accomodates for this nicely. Talk to your administrator to sort out the details of the threadpool.</p>
<p>Recomended reading</p>
<p><a href="http://www.devx.com/Java/Article/28815/1763">http://www.devx.com/Java/Article/28815/1763</a></p>
<p><a href="http://download.oracle.com/docs/cd/E12840_01/wls/docs103/config_wls/self_tuned.html">http://download.oracle.com/docs/cd/E12840_01/wls/docs103/config_wls/self_tuned.html</a></p>
<p><a href="http://www.devwebsphere.com/devwebsphere/2005/06/async_beans_pro.html">http://www.devwebsphere.com/devwebsphere/2005/06/async_beans_pro.html</a></p>
<div name="googleone_share_1" style="position:relative;z-index:5;float: right; margin-left: 10px;"><g:plusone size="small" count="1" href="http://blog.xebia.com/2009/06/30/j2ee-the-basics-and-beyond-starting-threads/"></g:plusone></div>]]></content:encoded>
			<wfw:commentRss>http://blog.xebia.com/2009/06/30/j2ee-the-basics-and-beyond-starting-threads/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Logging in Websphere Application Server using  Apache commons-logging and Log4j</title>
		<link>http://blog.xebia.com/2009/04/10/logging-in-websphere-application-server-using-apache-commons-logging-and-log4j/</link>
		<comments>http://blog.xebia.com/2009/04/10/logging-in-websphere-application-server-using-apache-commons-logging-and-log4j/#comments</comments>
		<pubDate>Fri, 10 Apr 2009 18:34:26 +0000</pubDate>
		<dc:creator>Sander Hautvast</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Middleware]]></category>
		<category><![CDATA[websphere]]></category>

	<!-- AutoMeta Start -->
	<category></category>
	<!-- AutoMeta End -->
	
		<guid isPermaLink="false">http://blog.xebia.com/?p=1068</guid>
		<description><![CDATA[Logging should be simple and straightforward. It is an essential part of everyday administrative operations and it provides vital information for debugging production incidents. Adequate logging saves time and money.  When hosting a number of applications, say 10+, you will want to separate application logs from each other  and from platform logs and traces. Logging [...]]]></description>
			<content:encoded><![CDATA[<p>Logging should be simple and straightforward. It is an essential part of everyday administrative operations and it provides vital information for debugging production incidents. Adequate logging saves time and money.  When hosting a number of applications, say 10+, you will want to separate application logs from each other  and from platform logs and traces. Logging frameworks like the jdk logger and log4j, cooperating with the j2ee container provide the means to do this, using configuration files. So far, so good.<br />
<span id="more-1068"></span><br />
At some point (from 5.0 on I believe) IBM decided to include jakarta/apache commons-logging (JCL) in their Websphere Application Server product. This is a well known open source product that provides an abstraction below which any logging implementation can in theory be used. The inclusion in WAS implicated that applications using the same framework might see the logging behavior changed.  This is because the logging classes will by default be loaded by a different classloader. This classloader will have to be able to find the log4j.jar as well as its configuration file.</p>
<p>There´s another problem: JCL  needs to be told that it has to use log4j. By default the JDK logger is used and every line ends up in SystemOut.log.  The <a href="http://publib.boulder.ibm.com/infocenter/wasinfo/v6r1/index.jsp?topic=/com.ibm.websphere.base.doc/info/aes/ae/ctrb_classload_jcl.html">IBM documentation</a> on this is clear: simply put a file called <i>META-INF/services/org.apache.commons.logging.LogFactory</i> on the classpath and you´re ready. The contents of this file turned out to be the puzzling part for me. I wrongly assumed that the file should be the same as the commons-logging.properties:</p>
<p><code>org.apache.commons.logging.LogFactory=org.apache.commons.logging.impl.Log4jFactory</code></p>
<p>I did what (I thought) the documentation  told me, redeployed my application and everything seemed fine. Until I changed classloading mode to PARENT_FIRST. Websphere applications can have this setting or APPLICATION_FIRST. In the latter mode jar files bundled with the application will be used first, before loading standard websphere libraries.</p>
<p>When you´re dealing  with an application you did not write and cannot change (say you´re the deployer),  PARENT_FIRST is your friend in the face of <i>evil</i> developers. I mean <i>evil</i>  as in: including  j2ee.jar in the earfile. It happens!! And not just this file, but anything you can find in a Maven repository today, containing lowlevel functionality (like xml processing, or j2ee api’s ). They should not be in the earfile!! Using PARENT_FIRST all correct versions of the platform classes will be loaded from the right location. Use this option and then nag the developers.<br />
Actually the logging behavior in my case was very inconsistent. Sometimes APPLICATION_FIRST  didn´t work either. And sometimes a server restart changed the logging. It was a frustrating experience, and in those moments, you´re happy to fall back on java decompiling using good old JAD.</p>
<p>The source for org.apache.commons.LogFactory.class made it clear that the above configuration line is  wrong, and that you will NEVER get a warning if you fail to do it right. The class loads the file and the complete line is then interpreted as the classname for the LogFactoryImpl. So it´s not a properties file, and the correct contents for <i>META-INF/services/ org.apache.commons.logging.LogFactory</i> are:</p>
<p><code>org.apache.commons.logging.impl.Log4jFactory</code></p>
<p>And that´s all there is to it. Thanks Apache, for swallowing the  ClassNotFoundException !</p>
<p>Actually after some searching I came across a less well known part of the official SUN jarfile specification which states that service interfaces can have certain implementation classes, which are specified in a file that has the name of the interface. It´s a really rudimentary IOC implementation, that must have been fashionable back in the days of jdk 1.3.</p>
<p>I really didn´t know all this. It turned out to be a learning experience after all.</p>
<div name="googleone_share_1" style="position:relative;z-index:5;float: right; margin-left: 10px;"><g:plusone size="small" count="1" href="http://blog.xebia.com/2009/04/10/logging-in-websphere-application-server-using-apache-commons-logging-and-log4j/"></g:plusone></div><p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fblog.xebia.com%2F2009%2F04%2F10%2Flogging-in-websphere-application-server-using-apache-commons-logging-and-log4j%2F&amp;title=Logging%20in%20Websphere%20Application%20Server%20using%20%20Apache%20commons-logging%20and%20Log4j" id="wpa2a_10"><img src="http://blog.xebia.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://blog.xebia.com/2009/04/10/logging-in-websphere-application-server-using-apache-commons-logging-and-log4j/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>HelloWorld with JConsole and the Websphere Service Integration Bus</title>
		<link>http://blog.xebia.com/2009/02/10/helloworld-with-jconsole-and-the-websphere-service-integration-bus/</link>
		<comments>http://blog.xebia.com/2009/02/10/helloworld-with-jconsole-and-the-websphere-service-integration-bus/#comments</comments>
		<pubDate>Tue, 10 Feb 2009 19:26:03 +0000</pubDate>
		<dc:creator>Sander Hautvast</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Middleware]]></category>
		<category><![CDATA[Performance]]></category>

	<!-- AutoMeta Start -->
	<category></category>
	<!-- AutoMeta End -->
	
		<guid isPermaLink="false">http://blog.xebia.com/?p=885</guid>
		<description><![CDATA[A colleague asked me whether jconsole could connect to a running IBM Webpshere 6.1 instance. This way you could gather performance data and work with Mbeans like with any other 1.5+ JVM. I had never tried this, but I quickly saw that jconsole is provided with the websphere jvm, so I said I would give [...]]]></description>
			<content:encoded><![CDATA[<p>A colleague asked me whether jconsole could connect to a running IBM Webpshere 6.1 instance. This way you could gather performance data and work with Mbeans like with any other 1.5+ JVM. I had never tried this, but I quickly saw that jconsole is provided with the websphere jvm, so I said I would give it a try.<br />
The forum posts all complained that it wasn´t possible, but I combining several entries I got together a working solution. This is typical of websphere, it´s a little harder, but in the end you can get there.<br />
<span id="more-885"></span></p>
<p>So what do you do? You´ll probably need a local websphere 6.1 installation, because it´s easier to use a websphere JVM to connect to a server. In this example I have done this.<br />
First go to WAS_HOME/profiles/dmgr01/properties/sas.client.props and set the following properties (assuming you have security enabled):<br />
<code><br />
com.ibm.CORBA.loginSource=properties<br />
com.ibm.CORBA.loginUserid=&lt;your websphere username&gt;<br />
com.ibm.CORBA.loginPassword=&lt;your password&gt;<br />
</code><br />
Then start WAS_HOME/java/bin/jconsole using the following options:<br />
<code><br />
-J-Djava.class.path=WAS_HOME/java/lib/tools.jar;WAS_HOME/runtimes/com.ibm.ws.admin.client_6.1.0.jar<br />
-J-Djava.naming.factory.initial=com.ibm.websphere.naming.WsnInitialContextFactory<br />
-J-Dcom.ibm.CORBA.ConfigURL=file:WAS_HOME/profiles/dmgr01/properties/sas.client.props<br />
-J-Dcom.ibm.SSL.ConfigURL=file:WAS_HOME/profiles/dmgr01/properties/ssl.client.props<br />
</code><br />
Fill in WAS_HOME your self and mind the semicolon on unix!<br />
dmgr01 is my deployment manager profile<br />
The -J gives you the opportunity to enter any standard JVM option, so jconsole -J-Xmx500M<br />
would be the way to set the heap to 500Mb.</p>
<p>Then the gui pops up. Go to the <em>advanced</em> tab and enter <code>service:jmx:iiop://[host]:[port]/jndi/JMXConnector</code> where port is the bootstrap port for the deployment manager. Connect without entering credentials (they´re already in the file)</p>
<p><em>NB. You´ll have to watch your command shell, because it may prompt you to add the SSL certificate signer to the trust store.</em></p>
<p>What you then get is a slightly different jconsole. It only shows you the tab containing the available mbeans instead of all monitoring like options a Sun jvm offers out of the box (like cpu heap and usage counters). Instead you have all the mbeans needed to manage the cell. Every function in be it in the web console or wsadmin can be found here. This is all really neat, but not actually helpful, because you already had administrative tools. Let´s think of something useful.</p>
<p><strong>Managing the SI Bus.</strong></p>
<p>Through Mbeans you can also do things not available in the console. Like manage messages in queues.<br />
So I set up a Service Integration Bus (using the webconsole), defined a queue and set up JMS resources: a queue reference to the bus queue and a queue connection factory. Bus member was my application server.</p>
<p><a href="http://blog.xebia.com/wp-content/uploads/2009/02/busqueues.jpg"><img class="aligncenter size-medium wp-image-888" title="busqueues" src="http://blog.xebia.com/wp-content/uploads/2009/02/busqueues.jpg" alt="the bus definition" width="440" height="181" /></a></p>
<p>Next I connected the console to the application server (being the bus member). Look up the bootstrap port (typically 2809) and replace it in the JMXConnector url. The bus is not a separate process in websphere. Instead the messaging engine becomes part of a server or cluster when it is added as a busmember.<br />
<a href="http://blog.xebia.com/wp-content/uploads/2009/02/lijn80.jpg"><img class="aligncenter size-medium wp-image-890" title="lijn80" src="http://blog.xebia.com/wp-content/uploads/2009/02/lijn80.jpg" alt="" width="350" height="200" /></a></p>
<p>In the server1JMSBasicfunction Mbean there´s an enqueue operation that I used to put the message “hi world” on the queue. Another Mbean called server1BasicAdministration contains a browse operation. Et voila.</p>
<p><a href="http://blog.xebia.com/wp-content/uploads/2009/02/hiworld.jpg"><img class="alignnone size-medium wp-image-891" title="hiworld" src="http://blog.xebia.com/wp-content/uploads/2009/02/hiworld.jpg" alt="hi world" width="400" height="133" /></a></p>
<p>All this would be a a quick way to set up tests for Message Driven Beans for example. You could write also unit tests that call the Mbean to do the same.</p>
<div name="googleone_share_1" style="position:relative;z-index:5;float: right; margin-left: 10px;"><g:plusone size="small" count="1" href="http://blog.xebia.com/2009/02/10/helloworld-with-jconsole-and-the-websphere-service-integration-bus/"></g:plusone></div><p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fblog.xebia.com%2F2009%2F02%2F10%2Fhelloworld-with-jconsole-and-the-websphere-service-integration-bus%2F&amp;title=HelloWorld%20with%20JConsole%20and%20the%20Websphere%20Service%20Integration%20Bus" id="wpa2a_12"><img src="http://blog.xebia.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://blog.xebia.com/2009/02/10/helloworld-with-jconsole-and-the-websphere-service-integration-bus/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
	</channel>
</rss>
<!-- This Quick Cache file was built for (  blog.xebia.com/author/shautvast/feed/ ) in 0.68206 seconds, on Feb 9th, 2012 at 4:37 pm UTC. -->
<!-- This Quick Cache file will automatically expire ( and be re-built automatically ) on Feb 9th, 2012 at 5:37 pm UTC -->
