Year in review

The year 2015 is almost here so it’s time to take a short review what I wrote this year and plan for the next. In 2014 I managed to wrote almost monthly and got together total of 14 articles covering topics of software development, WebLogic issues, Sailfish OS, user experience and gadgets. Last year I planned to write one post per month and in average I got there. Have to be satisfied with it although I could write more.

Looking back

During the past couple of years I have taken part of Fujitsu’s campaigns and testing their laptops and tablets and last year I took part of Master your Business project and tested Lifebook U904 Ultrabook. It’s slim and quite robust laptop with brilliant touch screen although it could benefit from better design regarding cooling. In Autumn I was invited to visit Fujitsu Forum in Munich to hear more about Fujitsu’s services and get insights about what’s new in information technology. The article from the event is still on my draft list. It was nice trip and great to see other bloggers and the project team. In other gadget related topics I also solved my problem with connecting Jabra HALO2 headset with Windows 7. I just had to update Bluetooth drivers in my Dell.

As a software developer I decided to challenge myself last year with developing applications for mobile phones and started with Sailfish OS which runs in Jolla. With Qt, QML and JavaScript it was fun and relatively easy to make useful apps like Sailimgur for browsing imgur and Haikala for reading news. I also made Colordots game which I ported from Ubuntu Touch. I planned to write more about how to develop apps for Sailfish OS but got around just to cover Sailfish OS user interface design practices and in more technical detail how to debug power consumption issues.

At work I do different kinds of software development related tasks and it’s good to write about the issues I find and how to solve those, like how to use X11 forwarding in Windows when I needed to install Oracle Database to Linux server. I also wrote about Oracle WebLogic related issues like how to recover managed server in incompatible state and what’s wrong with LDAP provider getting stuck.

Developing Java EE applications includes many tools and one of them is Maven which work quite fine for us. E.g. you can use WebLogic Maven plug-in to deploy your application and make your own plugins to generate HTML documentation from Markdown. And if you want to distribute your project’ artifacts to the world you can put it to the Maven Central with OSSRH.

I have been following Atlassian’s Sven Peter in Twitter about how to better do software development so it was great to finally get to hear the talk live when Atlassian’s Get Git Right landed to Helsinki. It was nice event although it had also the marketing aspect about Atlassian’s tools. Nice tools but sometimes the cost is too much. Now I just hope we move from Subversion to Git someday.

I also wrote short article about using Java Mission Control to monitor and profile your Java application. Too bad it’s really useful only with newer JDKs so legacy apps have to use other means like JavaMelody or NewRelic. I also took a short look at stagemonitor but didn’t yet write about it. Looked quite nice for monitoring but not as easy to setup as JavaMelody. Also Spring Boot had nice statistics out of the box but more about that next year.

Planning for 2015

As you may have noticed I’m not a very active writer and technical topics take time to get out from draft to a full article. In the past three years I have managed to write on average one article per month and it seems to be a good target to pursue. Why change something that works quite fine?

For the coming year, looking at blog’s draft folder there’s posts about Sailfish OS and Windows Phone development, software monitoring, setting up continuous integration, utilizing PaaS and starting with Spring Boot. I should just stop starting and start finishing my personal projects so I could add the finishing touches to drafts.

So, stay tuned and subscribe to the RSS feed or follow me on Twitter. Check also my other blog in Finnish.

Getting Git Right in Helsinki

Software development is fun if you have tools which work great and support what you’re doing. So it was finally great to get hear Sven Peters talking about better software development in teams as Atlassian’s Getting Git Right landed to Helsinki (24.11.2014). Event about Git and of course about Atlassian’s tools.

Getting Git right by svenpet and durdn

Getting Git Right’s main theme was about happy developers, productive teams and how Git and Atlassian’s tools help to achieve that. Sven Peters and Nicola Paolucci presented how to be a happier developer with Git, and how to ship software faster and smarter. It’s good to remember that developing software is after all a social challenge, not a technical one. And Git helps you with it. The presentation slides are available at SlideShare and you can also watch it on Youtube (different event).

Git: You can rewrite history. Timemachine without paradoxes

Nicola Paolucci gave a nice and 5 minute talk about Git and it’s internals. Lot’s of technical details. The main points were “Fast and compact”, “Freedom and safety”, “Explore and understand”, “Control and assemble”. With Git you can rewrite the history safely to e.g. clean commits. Paolucci showed also some tools to help working with Git on the command line like hooks they use and using “better” prompt like liquid-prompt. For GUI you can use Atlassian’s SourceTree.

Git datamodel


Interesting part of the event was talk about what is efficient and the best Git workflow? The answer is “we don’t know”. It depends as there are different cultures, different products and different teams. There’s no right way but there are some good workflows which might work for you.

One is to use branch per issue, e.g. hot-fix/jira-30-user-avatars, feature/jira-27-user-sign. The simplest workflow is to use feature branches with develop branch. Then the master is very stable. If you have multiple product versions then release branches are good and bug fixes are done to separate branch and merged to other branches.

They also presented how Atlassian’s Stash can help you to work with Git and branches. Like merging changes to branches can be done automatically with hooks or by using Stash. Stash looked nice for controlling and managing your repository with visual interface.

Code reviews: do they feel like this?

Git also helps you to improve code quality with e.g. code reviews. Code reviews shouldn’t be painful as it’s about team ownership, shared knowledge and aim for better code but often there’s developer guilt. It can be made easier by making code reviews part of your daily work by doing it in small patches like pull requests.

Development is also about communication and for that Atlassian presented HipChat. It looked quite nice tool for following what’s happening in a project with aggregating team chat and information from different tools. Following commits and continuous information brings you clear view what’s happening. There are also alternatives to HipChat like Slack or just basic IRC.

But why should you use Git? Benefits like more time to code, better collaboration, dev productivity and it’s the future doesn’t convince everyone. Like pointy haired bosses. So it’s good to remember that Git is also about economics. Delivering software faster, having less bugs and thus having happy customers. Shipping software faster and smarter.

Why Git? from Peters’ slides:

Why Git?

It’s also about economics

In Questions and Answers session there was talk about Atlassian’s strategy with Bitbucket and Stash. They said that both are going strong as they have different use cases. Stash has more enterprise features and you can have the repository on your own premises. Bitbucket is about hosting the repository in Atlassian’s platform and for small and medium team. What I have used Bitbucket it’s nice service but not as user friendly as GitHub. Another interesting question was about storing binary files in Git. There’s no optimal solution yet but just some workarounds like git-annex and git-media which allows managing files with git, without checking the file contents into git. In practice you shouldn’t store binary files in Git and you should separate product to code and assets.


Atlassians Getting Git Right was nice event and gave good overview about Git and how to use it in software development team. It would have been nice to hear something about the alternatives to Atlassian’s tools (BitBucket, Stash, SourceTree and HipChat) which helps you to do better software development. I can’t deny that Atlassian’s tools work nicely together but sometimes the price is just too high.

Now it’s time to start using Git also on work projects and as all participants got “Just do Git” T-shirt it’s easier :) Thanks to Atlassian and Ambientia for arranging this event.

Authentication with LDAP provider in WebLogic gets stuck

Lately we upgraded our Java EE applications to new platform and began seeing stuck threads and slow starting times. The platform was upgraded from OC4J to WebLogic 12c and also the underlying LDAP service was changed to Oracle Access Manager. Looking at the server logs the one possible reason for stuck threads was quite clear: LDAP requests.

Fortunately the stuck threads problem with LDAP was a known problem with Oracle Weblogic Server 10.3.2 and later and covered in Oracle Support doc 1436044.1. The LDAP provider fails to authenticate for some users and the server logs show Stuck Threads in LDAP requests:

<10.9.2014 11.43.46 EEST> <Error> <WebLogicServer> <BEA-000337> <[STUCK] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)' has been busy for "607" seconds working on the request "Workmanager: default, Version: 0, Scheduled=true, Started=true, Started time: 607304 ms
", which is more than the configured time (StuckThreadMaxTime) of "600" seconds in "server-failure-trigger". Stack trace:
        java.lang.Object.wait(Native Method)
        netscape.ldap.LDAPMessageQueue.waitForMessage(Unknown Source)
        netscape.ldap.LDAPMessageQueue.waitFirstMessage(Unknown Source)
        netscape.ldap.LDAPConnection.sendRequest(Unknown Source) Source)$ Method)
        sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        java.lang.reflect.Method.invoke($000($$ Method)

The cause for this is that authentication requests are hanging whenever the LDAP server is slow. By default, connections and searches to the LDAP server do not time out, so if the LDAP server is slow, authentication requests may take a very long time to retry. This can be seen as many threads stuck doing LDAP searches.

The solution is to set a timeout on LDAP requests for example as below (described in Oracle Support doc 1436044.1):

  1. Log in to the WLS Administration Console.
  2. Navigate to Security Realms -> myrealm -> Providers -> “your_ldap_authenticator.”
  3. Select the following values:
    • Connect Timeout 30
    • Results Time Limit 5000
    • Uncheck “Keep Alive Enabled”
  4. Save and apply changes. Restart the required servers if prompted.

NOTE: The optimal values may differ from environment to environment. But we can try the values specified here as starting places, and they will help in most cases like this. Our original values for the LDAP authenticator settings were: Connect Timeout: 0; Results Time Limit: 0; Keep Alive Enabled unchecked.

This is still a partial solution as you should investigate why the LDAP is slow. For now this solves our problem but has some side effects with user authentication.

Planning for Fujitsu Forum 2014: Human Centric Innovation

In late November it’s again time for business- and IT decision-makers, experts, project managers, IT architects, consultants and bloggers to travel to Munich, Germany to visit Fujitsu’s largest IT-event in Europe: Fujitsu Forum 2014. This year the event is held 19th and 20th November at the ICM in Munich and there will probably be over 10,000 attendees around the world getting insights and looking for strategic and operative ways to modernize and develop their own IT or the IT landscapes of their customers. Last year I was one of the bloggers invited by Fujitsu to visit Fujitsu Forum 2013 and it was an insightful experience.

The motto of the Fujitsu Forum 2014 is “Human Centric Innovation which expresses focus on a safe and prosperous future through innovations in information and communication technology. The event description tells us that these ICT innovations strongly support enterprises, public organizations and individuals in creating wealth and value. In overall Fujitsu Forum is a good place to find innovations that reduce costs and risks as well as increase agility and improve efficiency. Big and important words but what does it mean in practice? The event overview with summary about keynotes and breakout sessions gives you some idea about the different topics covered so let’s take a short look at the events I would select to attend.

There are a lot of simultaneous events so to make it easier to organize the events of your choice there’s an excellent schedule builder. The presentations in in the list of Keynotes and Breakout sessions are divided in three conference tracks: “Human Empowerment”, “Connected Infrastructure”, “Creative Intelligence”. The topics cover themes like how to design the future, workplace of 2020, tablet meets notebook, digital transformation, wearable technologies, Internet of Things and connected vehicles. Overall I selected 14 sessions to my agenda but pruned it to three keynotes and five breakout sessions as you don’t have time for every interesting topic.

From Fujitsu Forum 2013: Keynote
From Fujitsu Forum 2013: Breakout session

Keynote: Human Centric Innovation & how to design the future by Tango Matsumoto and Brian Johnson (Intel), 19 November, 11:00, Auditorium

“How value can be generated for your business and for our society by the new Human Centric Innovation approach. Matsumoto will explain how Fujitsu contributes to business growth and the resolution of social challenges which will set the scene for all the subsequent presentations.”

“What kind of future do you want to live in? What are you excited about and what concerns you? What is your request of the future? Brian Johnson answers these questions and more with The Tomorrow Project, a fascinating initiative to investigate not only the future of computing but also the broader implications on our lives and planet.”

Workplace Anywhere – Increasing enterprise productivity by David Rosewell, Simon Gray and Thomas Zell, 19 November, 13:00, Room 13b

“Organizations are mobilizing the enterprise to deliver both increased productivity and cost savings. They seek to empower and enable their people to get the job done and look to embrace more flexible working practices to maximize productivity. We will guide you through the options and a vision for the 2020 workplace to identify your ideal workplace strategy.”

Keynote: Fujitsu and its customers by Jürgen Walter, 19 November, 14:00, Auditorium

“Human Centric Innovation is for a world where technology complements all of our lives. A place where information continually delivers knowledge and innovation thrives. How does Fujitsu implement this vision and how do customers benefit from it? Jürgen Walter will address these questions, depicting some remarkable customer examples.”

Fujitsu Laboratories Group’s R&D vision and key initiatives by Hideyuki Saso, 19 November, 15:00, Room 13b

“Fujitsu Laboratories’ R&D vision, highlighting key activities, under a mission to conduct R&D from a mid to long-term perspective, to generate new business models and discover new markets to drive Fujitsu’s business. We backcast future markets, products and services, engaging in trend-conscious R&D of: platform/applied/verification technologies, ubiquitous computing domain human interfaces and devices, data-leveraging domain knowledge platforms and cybersecurity, ICT platform domain computing and networking, software-supporting product development and manufacturing, and electronic devices. By interlinking such technologies, we aim to drive global business.”

Keynote: Digital Transformation & Fujitsu in Society by Joseph Reger and Duncan Tait, 20 November, 10:00, Auditorium

“As the Internet and other information and communication technologies penetrate all areas and aspects of life, business and infrastructure, a hyper-connected world is created. Digital and analog businesses, processes and, indeed, worlds converge on the basis of ICT technologies. Innovation accelerates, new value propositions and new businesses are created, existing businesses fundamentally transformed. What this development means, what technologies it requires and will create and how to not just cope with it but how to make good use of it, is the subject of the presentation.”

“Fujitsu uses the power of technology to contribute to the development of sustainable societies around the world. Working with both businesses and governments, in fields as diverse as energy, transportation, food, health, the environment, and education, Fujitsu’s ICT can drive social innovation and generate solutions. Duncan will present highlights from this area of Fujitsu’s activities and show that the company’s vision of a Human Centric Intelligent Society is already becoming a reality.”

The human-centric workplace: Joy and efficiency got married by Christian Bock, Markus Seifart and Jeffrey Shomper, 20 November, 12:00, Room 13b,

“A successful workplace IT strategy is all about people. Generation Y and BYOD drive a new understanding of workplace IT, one that puts the user at the center and embraces individuality. Progressive companies realize that this new thinking boosts both productivity and employee satisfaction. Fujitsu shares best practices that empower users to achieve their full potential.”

Wearable technologies for human empowerment by Naoyuki Sawazaki, 20 November, 13:00, Room 12

“Although various types of wearable devices such as eyeglasses, watches and other gadgets for health and fitness are gaining more attention in consumer markets, the true potential of wearable technologies lies in enterprise or business use. Because they enable users to get ICT support in a hands-free manner, they offer a clear advantage especially for workers in factory or building maintenance and other onsite operations to make their work more efficient, with fewer errors and oversights, even when they are not experts. In this session, current trends of wearable technologies are briefly reviewed, and then, research activities in Fujitsu Laboratories including the newly developed glove-style wearable device are introduced.”

Exploiting IoT & Hyperconnectivity – A Life & Death Example by Joseph Reger and Antonio Jara, 20 November, 15:00, Room 13b

“The Internet of Things promises to create huge new opportunities in business and society. In this session we demonstrate the use of Fujitsu RunMyProcess to connect wearables, mobiles, cloud software and physical sensors in order to show how time saved through hyperconnectivity could literally mean the difference between life and death for a critically injured cyclist.”

And of course there’s a comprehensive exhibition of products and solutions which reveals e.g. how data center and client landscapes can be improved through innovation initiatives. Though this year I’m not sure what to expect and look forward to regarding Fujitsu’s Ultrabooks and tablets. Anyways the exhibition offered by Fujitsu and its partners has always been interesting. Last year we got i.a. hands-on with U904 and T904 Ultrabooks and tested the 360 degree video conferences and collaboration setup.

From Fujitsu Forum 2013: Intelligent desk
From Fujitsu Forum 2013: 360 degree video conferences

We all love technical topics and talks but there’s time also for refreshments and entertainment. On Wednesday evening there’s an opportunity to enjoy Oktoberfest themed evening event. It’s a nice entertainment and networking opportunity with drinks and special Bavarian dishes. Last year there was crispy roast chicken (Hendl), spiced strips of pork belly (Hüttenspeck), bread and dripping (Schmalzbrot), chive bread, savory cheese spread with pretzels (Obatzda und Brezn). Hmmm, and now I’m again hungry :)

Fujitsu Forum with keynotes, breakout sessions and exhibition looks interesting and also this year I’m one of the Fujitsu Digital Influencer program’s bloggers invited to visit Fujitsu Forum 2014. It will be exciting to see the latest technology trends and other bloggers and Master your Business campaign team. In other news I’m again taking part in Fujitsu’s Master Your Business campaign which starts on November 6th. The campaign will be fun as I just got the device I’m testing and it’s pretty sweet.

Until then, read about my insights from last year’s Fujitsu Forum 2013 where I was invited by Fujitsu and follow me on Twitter (@walokra) for technology insights and maybe we will see on 18th and 20th November at the ICM in Munich.

Distribute project’s artifacts in Maven Central with OSSRH

You have developed some crafty Java library or Maven plugin and now you want to distribute it to other users through Maven Central repository? Using Sonatype Open Source Software Repository Hosting Service is a nice way for open source projects to achieve that and there’s two options to get your artifacts in it: 1. Release with Sonatype’s process or 2. Use Bintray’s process. In short, both options end up with the same results, your project’s artifacts are in Maven Central repository, but using Sonatype’s process and Maven release plugin makes it easy to release new version after you have set it up.

Using Sonatype’s service for pushing artifacts to Maven Central

Sonatype Open Source Software Repository Hosting Service (OSSRH) provides Maven repository hosting service for open source projects. You can deploy snapshots, stage releases, and promote your releases so they will be synced to Maven Central.

The process with Sonatype has a bit more steps than Bintray but if you follow the user guide, quite easy. And now as they have made some changes to their release process it’s easier more or less the same than using Bintray. All you need to do is to sign up a Sonatype JIRA account, create a JIRA ticket and make some POM/settings configuration and then use Maven release plugin to perform release. The procedure is described in Sonatype OSS Maven Repository Usage Guide but here is a short recap.

Performing release deployment with the Maven release plugin

Using Maven to perform release deployment to OSSRH is described in Sonatype’s guide which tells you how to do it manually or through the Maven release plugin which I find convenient.

First start with Initial Setup and create your JIRA account and new project ticket. The new project ticket triggers creation of your repositories. While your repositories are taken care of you should review the requirements for components in Central.

The artifacts need to be GPG signed so if you yet haven’t got a GPG key follow this guide to create one. Then you need to have your GPG key in a keyserver so start by sending your GPG key to keyserver:

gpg --keyserver --send-keys <your KEYID>

If you have more than one GPG key in your keychain then it’s useful to set a default key to be used for signing. Edit your ~/.gnupg/gpg.conf and uncomment the “default-key KEYID” line and add your KEYID.

Your Maven project settings

Configure your Maven settings.xml to have Sonatype OSSRH credentials (in .m2/settings.xml).


Edit your’project’s pom.xml for Maven release

Add the distributionManagement section to point to OSSRH.


The configuration for the Maven release plugin should include disabling the release profile that is part of the Maven Super POM, since we are using our own profile, and specify the deploy goal together with the activation of our release profile


Add the nexus-staging plugin to define where’s Nexus and if we release it right after closing.


Add the release profile for signing with GPG & Javadoc and Sources Attachments


You can see the full pom.xml e.g from my markdown-page-generator-plugin’s pom.xml.

Publishing Snapshots

Snapshot deployment are performed when your version ends in -SNAPSHOT. You do not need to fulfil the requirements when performing snapshot deployments and can simply run

$ mvn clean deploy

Successfully deployed SNAPSHOT versions will be found in Snapshot repository. If you need to delete your artifacts, you can log in to Sonatype’s Nexus using the same credentials you use to access to the Sonatype JIRA.

Performing a Release Deployment

The Maven Release Plugin can be used to automate the changes to the Maven POM files, sanity checks, the SCM operations required, the actual deployment execution and you can perform a release deployment to OSSRH with the following steps.

Prepare the release by answering the prompts for versions and tags

$ mvn release:clean release:prepare

If prepare fails use

$ mvn release:rollback
$ mvn release:clean

The prepare will create a new tag in SCM, even in GitHub, automatically checking in on your behalf. For it to work you need to have working public key in GitHub for git-push.

Perform the release. The perform process will ask for your gpg.passphrase if you don’t give it with passphrase argument.

$ mvn release:perform

For some reason I can’t provide the GPG passphrase when Maven GPG plugin asks it and I have to use the -Dgpg.passphrase argument.

$ mvn -Darguments="-Dgpg.passphrase="your GPG key passphrase" release:perform

This execution will deploy to OSSRH and release to the Central Repository in one go, thanks to the usage of the Nexus Staging Maven Plugin with autoReleaseAfterClose set to true.

Now your artifacts are in the Releases repository. The updates to The Central Repository search can take up to two hours. Once your artifacts are released you will not be allowed to update or delete them.

The first time you promote a release, you need to comment on the OSSRH JIRA ticket you created so OSSRH can know you are ready to be synced.

Manually Releasing the Deployment to the Central Repository

If you don’t want to release artifacts automatically you can also do it manually. Set the autoReleaseAfterClose set to false so you can inspect and potentially release the deployed artifacts manually. Then to release your artifacts is done through Nexus as described in the guide.

Using Bintray for pushing artifacts to Maven Central

Bintray offers developers the fastest way to publish and consume OSS software releases. Whether you are distributing software packages or downloading ones”. In short it provides i.a. an alternative way to release artifacts to Maven Central and to Sonatype Open Source Software Repository.

I found out about Bintray after I had already used the Sonatype’s way to release artifacts so I haven’t tested this myself. Bintray’s process is more or less similar than Sonatype’s but if I hadn’t read the blog post about how to do it I wouldn’t have know where to start. In short the process is the following.

  1. Register to Bintray and set up auto-signing: Generate yourself a keypair, if you don’t have one. Add it to your profile, and setup your default Maven repo (or a new one) for signing with your GPG key: Bintray can then sign your jars automatically.
  2. Add your Sonatype account under “accounts”. If you don’t have one, follow this procedure
  3. Create and link your package: Import from a GitHub repo or create a new package for your Maven project.
  4. You can link your package to JCenter by clicking “Add to JCenter”.
  5. Set up Maven up to deploy to Bintray by copy-pasting the pom.xml snippets from “Set me up!” guide.

Then for each release:

  1. Deploy: Deploy files by running your build tool.
  2. Publish: Review the build artifacts and publish the version files if satisfied.
  3. Sync: On the version page go to the Maven Central tab, enter your Sonatype password and click “Sync” and you’re done!
  4. Your package is now in and will be synced to Maven Central (usually takes time). In case of a sync problem, Bintray will automatically take care of any needed cleanup.


For distributing your open source projects’ artifacts through Maven Central repository and OSSRH you have two options: 1. Release with Sonatype’s process or 2. Use Bintray’s process. Both options end up with the same results: your project’s artifacts are in Maven Central repository. In my opinion if you’re using Maven then it doesn’t really matter which option you choose.

Before Sonatype simplified their process for making releases to OSSRH the Bintray’s process was the only almost pain-free gateway to Maven Central. But with the new Sonatype way the two alternative ways are more or less the same and I could say that Sonatype’s new process feels a bit easier when using the Maven release plugin. In practice there’s not much differences, e.g. both supports SNAPSHOTs, Sonatype in OSSRH and Bintray in Bintray is more flexible especially if not using Maven so if you’re using other tools like Gradle then it’s the easier way to go.

Monitor and profile application with Java Mission Control

Monitoring Java applications is can be done with different tools and with JDK you get one good tool for it: Java Mission Control. Java Mission Control and Java Flight Recorder together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Starting with Oracle JDK 7 Update 40 (7u40) Java Mission Control (JMC) bundled with the HotSpot JVM. Let’s take a short look what those tools are.

“Java Flight Recorder is a profiling and event collection framework built into the Oracle JDK. It allows Java administrators and developers to gather detailed low level information about how the Java Virtual Machine (JVM) and the Java application are behaving. Java Mission Control is an advanced set of tools that enables efficient and detailed analysis of the extensive of data collected by Java Flight Recorder. The tool chain enables developers and administrators to collect and analyze data from Java applications running locally or deployed in production environments.”Oracle Java Mission Control.

Java Mission Control and Java Flight Recorder are commercial features, which are available as part of the Oracle Java SE Advanced product. They are freely available for download for development and evaluation purposes, as per the terms in the Oracle Binary Code License Agreement, but require an Oracle Java SE Advanced license for production use.

Using Java Mission Control

Oracle Java Mission Control is a tool suite for managing, monitoring, profiling, and troubleshooting your Java applications and it consists of the JMX Console and the Java Flight Recorder. To get a good overview how you can use Java Mission Control check Java Mission Control demo video. The JMC Client is built to run on Eclipse and it’s based on the features of the old JRockit Mission Control.

The JMX Console enables you to monitor and manage your Java application and the JVM at runtime but the main and most important feature is the Flight Recorder. Java Flight Recorder (JFR) records the behavior of the JVM at runtime and you can analyze the recording offline using the Java Flight Recorder tool. They say that the overall profiling overhead for your applications stays at less than 2%, usually much less.

Starting with Oracle JDK 7 Update 40 (7u40) it’s bundled with the HotSpot JVM and although you can connect it to older JDK’s like application running on JDK 6 the newer ones show more information and have more features. So no real fun with legacy applications. The Flight Recorder needs at least JDK 7 Update 40.

Start JMC from the Windows command prompt:
"c:\Program Files\Java\jdk1.8.0_20\bin\jmc.exe"

Java Mission Control can be connected to local or remote Java Application. Start your application with following Virtual Machine flags which enables the JMX remote without authentication and Mission Control: 

If you’re using WebLogic then the JMX Remote settings are following: 

JMC does not include or run with a security manager, so a user must ensure to run the JMC client in a secure environment.

After connecting JMC with your Java application it opens a familiar Eclipse based user interface. JMX Console has couple of tabs on the bottom which shows overview, MBeans, Memory and Thread information.

JMC: JMX Console Overview

JMC: JMX Console MBeans
JMC: JMX Console Memory

JMC: JMX Console Threads

The more useful tool is the Java Flight Recorder (JFR) for profiling your application. In Java Mission Control JVM Browser right click on the Java Virtual Machine you wish to start a Flight Recording.

Leave all the default settings and select the “Profiling – on server” template for your Event Settings. Just hit finish at this point. You can also click Next to go to the higher level event settings which are groupings of named settings in the template. You can select how often you want JFR to sample methods by changing the Method Sampling setting.

The recording will be downloaded automatically and displayed in Mission Control. Click the tab group for Code to start visualizing your Method Profiling Sample events. Switch to the method profiling tab to find a top list of the hottest methods in your application.

Too bad I don’t have nice recording to show but here’s couple of screenshots. Better overview of how to use Flight Recording can be seen from the Java Mission Control demo video.

JMC: Flight Recording

JMC: Flight Recording

Sailfish OS User Interface design practices

The operating system running on Jolla has different and refreshing approach to user experience than the mainstream mobile operating systems. Sailfish OS is quite new project which also shows in applications’ user interfaces as common practices are not quite established. There are some guidelines and component usage examples how the applications should be built but they don’t cover every aspect especially with complex applications. Here are some examples how different apps solve common design issues in Sailfish OS.

Sailfish OS user interface design practices

Sailfish OS UI design practices

Sailfish OS guides you to make your app to work in certain ways and component gallery in development environment shows some practices but at the end how the app’s flow and user experience really works is up to the developer. There really isn’t comprehensive guide how elements and menu structures should work like there’s for Windows Phone and iOS. And thus Sailfish OS applications’ look and feel are sometimes quite different.

Here are some examples how different user interface aspects are designed in couple of Jolla’s own and third party developers’ apps. The presented examples and comments are just to point out different ways to build the user interface in Sailfish OS applications and doesn’t take a stance on which way is better or how it should be done.

Menu for different sections

There are couple of practices to present a menu for app’s different pages. The default is to use the pull down and push up menus but with more complex apps it’s not enough as the recommendation is to have only couple of items in that menu.

Tweetian (Twitter) uses bottom tab panel and you can flick left or right or press to change the page. In HalfTrail (map + GPS app) different sections are also as icons in bottom tab panel but activate only when pressed. In Haikala ( news) settings page’s can be flicked or pressed with textual buttons.

Tab panel for pages
Action buttons on bottom panel
Bottom tab panel

Haikala uses side panel for actions to switch category. IRC uses the side panel for actions to select different IRC channels. Previously also Sailimgur (imgur) used left side panel for navigating to different pages.

Side panel for pages
Side panel for info & actions
Side panel for info & actions

Cargo Dock (file manager) is based on having two different sides and you can copy files between them. Both sides are identical but separate pages. Jolla Store shows links to apps in grid view and also arrows for selecting certain category of apps.

Two sides to work with
Arrows for sections
Grid view for selecting items

Settings menu

Settings are usually shown in separate page like in Jolla’s Settings and Hunger Meter (battery usage). Terminal app on the other hand uses hamburger menu which opens side panel.

Settings page
Settings in own page
Hamburger-menu settings

Showing controls and actions

Jolla’s Media app uses docked panel to show controls. The panel is shown only when a song is playing. You can also have docked panel with pull up menu for showing more controls icons. Tweetian has different actions in pull up and pull down menus.

Controls in docked panel
Docked panel with pull up menu
Actions in Pull up menu

Other common way is to show controls in bottom or top panel with tool icons. This can be seen in HalfTrail with action buttons in bottom toolbar. In Paint there’s a top toolbar with icons. Neither provide legend for icons although Paint has help in About page. MitaKuuluu (WhatsApp) also uses bottom toolbar for chat related actions. In Sailimgur you can choose to have to toolbar at the bottom or at the top. The bottom toolbar has better reachability if used with one hand.

Action buttons on bottom panel
Tools in top panel
Actions in bottom toolbar
Toolbar at the bottom
Top toolbar

Jolla Settings app uses switches to toggle different features. Terminal app on the contrary takes quite different approach to showing actions and settings. Terminal uses so called Hamburger menu which works quite nicely although isn’t “Sailfish OS” style.

Actions as switches
Hamburger-menu settings

Sailimgur shows actions for the photo when long pressed in a context menu. Actions related to a comment are shown as bottom context menu or icon buttons. Quickddit (Reddit) shows actions as icon buttons.

Actions in context menu
Actions in context menu
Actions as icon buttons

Back navigation

For the back navigation there isn’t a physical button and you either flick left, click page stack icon or use some button and action in pull down menu.

In Jolla’s Gallery app you scroll through photos in slideshow view and you get actions for back navigation only when pressing the photo and opening the Docked panel where you can flick back to the gallery overview. Alternative way for back navigation from photo slideshow is just press the photo as seen in e.g. Jolla Store.

Jolla Opas (Reittiopas) uses simple icon button in toolbar for navigating the route on the map and navigating back. And of course you can have the back navigation in pull down menu like in Sailimgur when navigating back from Web view.

Back navigation in docked panel
Back navigation with button
Closing view in pull down menu

Navigating between items

Navigating between items in a list is normally done by flicking left or right. But sometimes that’s not usable or it’s better to provide also alternative way.

Sailimgur has previous and next buttons at the bottom, Tidings (RSS feeds) provides them in pull down and pull up menus and Browser has them in bottom tool bar as icons.

Next & Previous as buttons
Next in pull down menu
Prev/next in toolbar


Providing search is usually done as a separate page but it can be put on pull down menu or as normal element in page.

Warehouse (OpenRepos) application has search link in pull down menu which navigates you to separate search page which also shows the results. Sailimgur has the search element in pull down menu and it closes after user presses enter to show the results in main view. Jolla Opas is a route planning app so the search elements are in main page. The search results are shown (if found more than one destination) as blue circle with results number and can be selected in separate dialog page.

Search in own page
Search in menu
Search as main function
Inline search in main view

Showing gallery of images

Showing list of images is pretty simple but there are differences how applications do it. Gallery application uses one big grid of cropped thumbnails, Warehouse shows full thumbnail and selection list in side and Jolla Store shows limited list of cropped thumbnails which opens in own view.

Only thumbnails, press to open own view
Grid view of images
Large image, side preview list

Notifications about new features

Mobile applications update quite often but users don’t usually check the changelog what’s changed or if there’s new features. So it’s nice to provide a simple changelog in first start like Flashlight, Paketti (post packages) and Haikala.

New features notification
Showing changelog
Changelog dialog

Weblogic 12c and Managed Server in incompatible state

Oracle WebLogic application server (WLS) is quite a behemoth and usually works much better than e.g. OC4J which we previously had to use. But sometimes things don’t go as they should and it gets stuck. Some time ago my managed Server was in “FORCE_SHUTTING_DOWN” state and when trying to restart it I got an error message.

“The server myServer is in an incompatible state.

Warning All of the servers selected are currently in a state which is incompatible with this operation or are not associated with a running Node Manager or you are not authorized to perform the action requested. No action will be performed.”

Seems that this is a “common” problem with WebLogic Server and happens at least with 12c version which was also my case. The solution is to delete the “managed_server.state” file under your domain in “servers/managed_server/data/nodemanager/” where managed_server is your managed server’s name.

So, stop everything, delete managed_server.state from your managed server folder and start everything (go to console to start your managed sever as it is SHUTDOWN).

Using the WebLogic 12c Maven Plug-In for Deployment

Using the WebLogic 12c 12.1.2 Maven plug-In for deployment is much easier and quicker than going through the WebLogic Server’s AdminServer and Oracle Documentation provides good examples how to do it. The weblogic-maven-plugin provides enhanced functionality to install, start and stop servers, create domains, execute WLST scripts, and compile and deploy applications.

The weblogic-maven-plugin plug-in is provided as a pre-built JAR file and accompanying pom file. In short, installing and configuring the WebLogic 12c Maven sync plug-in contains following steps:

Open command prompt and run commands:

cd D:\oracle\wls12120\oracle_common\plugins\maven\com\oracle\maven\oracle-maven-sync\12.1.2
mvn install:install-file -DpomFile=oracle-maven-sync.12.1.2.pom -Dfile=oracle-maven-sync.12.1.2.jar
mvn -Doracle-maven-sync.oracleHome=D:\oracle\wls12120

You can validate whether you have successfully installed the plug-in using the Maven help:describe goal.

mvn help:describe -DartifactId=weblogic-maven-plugin -Dversion=12.1.2-0-0

And you’re ready to deploy with Maven. A lot more easier than generating the WebLogic 11g R2 Maven Plug-in where you had to i.a. build the jar by yourself.

The Maven plug-in can be used e.g. from application’s POM file and be bound to some phase of the Maven life cycle. For example it can be bound to “install” phase and every time you run the “mvn install” command, the deployment plug-in is also called. In my opinion better way to use the plug-in is to add it as a profile so you can call it just when you want with command like “mvn clean install -Pdeploy-wls“.

Maven Project pom.xml File


The user credentials in the POM file are provided as clear-text but for more security you can use secure configuration authentication mechanism which stores the user name and password in encrypted form in an external file, and then uses it to supply the user credentials with which to connect to the WebLogic Server domain, along with the key that was used to encrypt the file.

Maven plugin to generate HTML from Markdown now in Maven Central

Generating documents is always not the most pleasant job but it can be made easier by using easier markup language like Markdown. For that purpose I made last year a simple Markdown to HTML Page Generator Maven Plugin and now it’s also available in Maven Central.

“Markdown to HTML Page Generator” is a simple Maven Plugin which reads the input directory for Markdown files with .md suffix and outputs HTML files to target directory. There are couple of configuration options to set the input/output directories and if you want to add header and footer files to make it structurally valid HTML. The plugin uses pegdown Markdown processor.

Maven plugin artifacts can be found in Sonatypes’ OSS Maven repository:

Read more about the plugin and how to use it from markdown-page-generator-plugin’s GitHub page.