Every improvement of your development process that is performed on daily basis is worth considering and implementing. Even little things can save days in budgets if you multiply them by the count of team members and the number of operation occurrences in the year. How do you look up for classes or JSP/FreeMarker/whatever templates when you run at error in them during development or testing? In development mode you might have your logging output open in IntelliJ Idea and click through exception stacktraces if any happens to be printed there.
Apache HttpClient is a popular library that many other frameworks build upon. Naming one for all - you can find it in Spring Framework RestTemplate. It's quite suprising that its not easy to find compherensible walkthroughs how to make it trust server certificates that are not validable by certificate chains baked in standard Java installation. Spending a few hours searching and tweaking the code I've decided to document easy - step by step solution how to do this for emerging Let's Encrypt certificate authority (but it's applicable to any other CA too).
Rather cryptic headline describes a pain many of us have to go through when restoring MySQL database backup from different machine. If you have ever done this on database with DB views - you’d probably run at this problem too. Source of the problem is that MySQL dump exports CREATE VIEW DLL with DEFINER attribute and there is no way how to instruct it to exclude this attribute (as far as I know).
I had a conversation about IntelliJ Idea shortcut bindings conflicting with default shortcuts of Ubuntu/Unity OS. Well, it's a real problem, your muscle memory can be a tough beast. You can re-lean a shortcut or two but it's hard to change your habits completely after years of coding in IntelliJ Idea. And I want to concentrate on different things than to learn again shortcuts I am used to use. Because I am developer my IDE is more important for me than the OS and that means that shortcuts of the OS must go away or be changed.
Many of complex applications put on top of their complexity access control logic for securing data and to limit access to certain functions. No matter if you have fully configurable ACL settings based on rights or role based access you'd probably want to test this part of application too. In order to have proper test coverage you should make it easy for you and your colleagues to test this. I have no doubts that if you ever needed to test this you already have some kind of such test support, but this article describes what kind of it I've created for myself.
Spring security is really powerful library in its current version and I like it much. You can secure your application on method level several years now (this feature was introduced by Spring Security 2 in 4/2008) but we've upgraded from old Acegi Security only recently. When using method access control in larger scale I started to think about security rules encapsulation into standalone annotation definitions. It's something you can live without but in my opinion it could help readibility and maintainability of the code.
I guess everyone of you already know content loading mechanism used on the Twitter site. When you scroll down at the bottom of current page another content is loaded immediatelly without you clicking on any UI element. It's a very nice idea for AJAX powered listings and you'd probably take advantage of it on your own site too. I came to the same conclusion also but it seems there is no single jQuery plugin enveloping this kind of mechanism.
Spellchecking provided by IntelliJ Idea is very handy for those who are not confident in written English (such as me for example ;-) ). But for non-English speaking developers it's common to use (at least) two languages simultaneously - English for writing Javadoc, method and variable names and their native language (Czech, Polish ...) for strings in UI layer. Setuping Ideas' spellchecker to validate string in multiple languages is more than handy.
Testing transactional aspect of your application is not easy as we usually use Springs' transaction rollback on tear down testing approach. Though there are solutions to test aspect oriented logic it's not without a price. More than that - we very much got used relying on easy-to-use Spring @Transaction annotation so that we don't usually take an effort to do it. There is a few standard Spring rules for rollbacking transaction in relation to method resolution:
In the last post I described the basic principles I found behind the scenes of GroovyScript refresh. Now imagine that you want to create your own long living Groovy instances with auto-refresh behaviour when source code changes. You can use out-of-the-box Spring support - but there are some limitations I stated in the previous article. In this post I am going to present an alternative solution that addresses some of the painful issues I noticed.
The first thing one should undestand before he tries to integrate scripting support into his application / framework are class loading issues. One of the main reasons (next to the ability to easily switch from Java) why we have chosen Groovy as our primary scripting language is very good support for live refresh of Groovy classes when source file has changed. But what does Groovy exactly do when it "refreshes" its loaded classes to conform to a newly modified source file?
I had a discussion with Jira recently, whether we could be still looking forward to iBatis 3. It has been long time since iBatis 3 Whiteboard was seriously touched and I haven't found any other clue when or whether there is going to be iBatis 3. There is very small activity for 3.x version in Jira, though there were some commits into iBatis 3 core. As I am going to have a speech in University Hradec Králové on iBatis, I have decided to ask directly its authors about this issue.
I've run into interesting and very strange problem. I was writing transactional Spring test that opens transaction at the beginning of it, and rollbacks at the end. First part of my test performed bunch of INSERT and UPDATE SQL commands and after that I was checking persisted changes by loading data back from the database. Suddenly my tests started to fail. And I was searching for the reason ...
If you use Maven 2 and Teamcity integration server, you might want to perform releases on server. Although it's not so complicated, some things must fit one into another and you might spend a lot of time till you find out how to configure pom.xml and build configuration. For those of you, who need to setup it, this article could come quite handy. Let's assume that you have maven release process setuped up for your localhost.
English translation Tímto příspěvkem bych chtěl poděkovat pánům ze Sun Microsystems za uspořádání tohoto školení. Přestože mým oborem jsou výhradně server side aplikace, rád jsem si rozšířil obzory v oblasti desktopu. Z tohoto důvodu se z mé strany pravděpodobně nedočkají významné kontribuce, a proto se snažím jim námahu vrátit alespoň touto reklamou na jejich edukační program. Celkový dojem z dvoudenního školení je veskrze pozitivní - pokud bylo záměrem dostat do nás základní principy a procesy, které jsou pro další studium platformy třeba, myslím, že se dílo podařilo (alespoň v mém případě :-) ).
Though most of articles at this blog are written in my native language - Czech, this one will be different. I have chosen an English to address wider community of Stripes developers - I think there would'nt be enough readers in our beautiful small country. So, please, excuse possible errors and mistakes in the article, I will try my best :-) . Common introduction to AJAX in Stripes Stripes framework offers basic but sufficient support for AJAX that is covered with article at official web site.