Why I like Spring bean aliasing

Vlad Mihalcea

Spring framework is widely used as a dependency injection container, and that’s for good reasons. First of all, it facilitates integration testing and it gives us the power of customizing bean creation and initialization (e.g. @Autowired for List types).

But there is also a very useful feature, that might get overlooked and therefore let’s discuss about bean aliasing.

Bean aliasing allows us to override already configured beans and to substitute them with a different object definition. This is most useful when the bean definitions are inherited from an external resource, which is out of our control.

In the following example I will show you how bean aliasing works. Let’s start with the following bean definition, coming from the src/main/resources/spring/applicationContext-tx.xml configuration file.

This context file contains many transaction/JPA related features we would like to use in our Integration Tests.

The dataSource bean definition expects a XA Datasource, but since…

Voir l’article original 158 mots de plus


Lessons learned from 13 failed software products

One of the best article i have recently read: we can learn so much from failures that it’s worth to try.

Successful Software

« No physician is really good before he has killed one or two patients. » – Proverb

Software entrepreneur culture is full of stories of the products that succeeded. But what about the products that failed? We rarely hear much about them. This can lead to a very skewed perspective on what works and what doesn’t (survivor bias). But I believe that failure can teach us as much as success. So I asked other software entrepreneurs to share their stories of failure in the hope that we might save others from making the same mistakes. To my surprise I got 12 excellent responses, which I include below along with one of my own. It is a small sample and biased by self selection, but I think it contains a lot of useful insights. It is an unashamedly a long post, as I didn’t want to lose any of these…

Voir l’article original 5 635 mots de plus

13 ways to fail at commercial software

Successful Software

  1. Don’t bother with market research, because you just know lots of people are itching to buy your new product.
  2. Only release the product once it is perfect. However long that takes.
  3. Go into a market with very strong competition and compete with them head-on, because you only need a measly 1% of this market to get rich.
  4. Go into a market with no competition. How hard can creating a new market and educating all the potential customers be?
  5. Only think about marketing once the code is nearly complete.
  6. Write software for people who can’t or won’t buy software (e.g. 10 year olds, prisoners, Linux fanatics, people in developing countries, developers).
  7. Don’t worry about marketing, because good software sells itself.
  8. Concentrate on the technology and impressing other developers.
  9. Don’t listen to what your customers say, because you know best.
  10. Don’t worry about usability. It took you thousands of hours to write…

Voir l’article original 42 mots de plus

10 questions to ask before you write a single line of code

Successful Software

I would guess that the majority of the software that I have written in my career has never been used. Or, at least, not used enough to justify the long hours I and my colleagues lavished on it. I am sure that I am far from unique in this. I flatter myself that the software was intuitive, well documented and robust, but we never managed to convince enough people that the software solved a real problem for them. Creating high quality software is hard, but it just isn’t enough. The software also has to be marketed effectively.

Effective marketing means:

  • identifying a problem that people will pay you adequately to solve
  • letting these people know about your solution
  • convincing them that your solution solves their problem, at least enough to try it
  • doing all the above cost effectively

This is no easy task in a complex and constantly changing world…

Voir l’article original 1 587 mots de plus

15 criteria for evaluating software product ideas

Successful Software

Choosing the right product to develop is crucial. Great execution is also very important. But if you develop a product that no-one wants or no-one is prepared to pay for, then you are going to fail, no matter how well you execute it. You can often tweak a product or its marketing to make it more successful based on market feedback (‘pivot’) .  But the less pivoting you have to do, the better. Below I list some of the criteria I think are important for evaluating the potential of new commercial software products.

1. Are you solving a real problem?

Has your customer got a ‘bleeding neck’? Is your software solving a problem compelling enough that someone is going to download it, install it, evaluate it, buy it and then learn to use it, with the accompanying risks of credit card fraud and malware? It is hard to change people’s…

Voir l’article original 1 095 mots de plus

Docker Virtual Networking with Socketplane.io

Ryan's Thoughts

Screen Shot 2015-01-16 at 11.03.27 AM

Screen Shot 2015-01-16 at 11.04.21 AMScreen Shot 2015-01-16 at 11.03.50 AM

Screen Shot 2015-01-16 at 11.06.36 AM

ImgCred: http://openvswitch.org/, http://socketplane.io/, https://consul.io/, https://docker.com/

Containers have no doubt been a hyped technology in 2014 and now moving into 2015. Containers have been around for a while now (See my other post on a high-level overview of the timeline) and will be a major technology to think about for the developer as well as within the datacenter moving forward.

Today I want to take the time to go over Socketplane.io’s first preview of the technology they have been working on and since announcing their company in mid-october. Socketplane.io is « driving DevOps Defined Networking by enabling distributed security, application services and orchestration for Docker and Linux containers. » and is backed by some great tech talent, Brent Salisbury, Dave Tucker, Madhu Venugopal, John M. Willis who all bring leading edge network and ops skills into one great effort which is socketplane.io. I have had the pleasure to meet up with Brent and Madhu at ONS last…

Voir l’article original 1 371 mots de plus

Linux Containers: Parallels, LXC, OpenVZ, Docker and More

Ryan's Thoughts

The State of Containers

Why should we care?



What’s a container?

            A container (Linux Container) at its core is an allocation, portioning, and assignment of host (compute) resources such as CPU Shares, Network I/O, Bandwidth, Block I/O, and Memory (RAM) so that kernel level constructs may jail-off, isolate or “contain” these protected resources so that specific running services (processes) and namespaces may solely utilize them without interfering with the rest of the system. These processes could be lightweight Linux hosts based on a Linux image, multiple web severs and applications, a single subsystem like a database backend, to a single process such as ‘echo “Hello”’ with little to no overhead.

            Commonly known as “operating system-level virtualization” or “OS Virtual Environments” containers differ from hypervisor level virtualization. The main difference is that the container model eliminates the hypervisor layer, redundant OS kernels, binaries, and libraries needed to typically…

Voir l’article original 2 870 mots de plus