Posts

  • Prototype-scoped Bean Instance in Spring

    Spring Framework supports quite a few different types of bean scopes. Singleton and Prototype scoped beans are the most used ones. It is common for Spring framework-based applications to use singleton scoped beans, but sometimes, there may be a need to use a prototype scoped bean. In this post, I will show how to get an instance of a prototype-scoped bean in Spring Framework.

    Read more...

  • Connection Pooling in the Cloud

    Spring apps are usually deployed to Cloud Foundry with the Java Buildpack (if no explicit buildpack is mentioned, it would be used as the default buildpack for Java apps). The Java buildpack uses its Spring Auto-reconfiguration framework to automatically reconfigure an application to use configured cloud services. It also adds the “cloud” profile as an active Spring profile for the application. This framework has its copy of Spring cloud connectors, which, along with other things, initialises a Pooled datasource with a size of 4 and maxWaitTime of 30,000. This is done to be compatible with cloud providers’ limited free-tier services. This setting is usually sufficient for any test or demo projects. But for any serious application, it is best to customise this per application-needs.

    Read more...

  • My Talk at Web Direction's What Do You Know

    I have been trying to overcome my public speaking fears for a while. So when I saw a call for speakers for Web Directions’ What Do You Know? event, I thought I had to do this. At that time, I was fiddling with my Jekyll blog quite a lot. So I shot a proposal to Jhon Allsopp about this, and he agreed.

    Read more...

  • Stop, Revive, Survive!

    Well, 'Stop, Revive, Survive' is a famous slogan used by the road safety authorities in Australia. But my post title has nothing to do with that. Instead, I want to mention this to announce that I have revived my blog, which has been dormant for quite some time. Well, many things changed in my life since the last post. The most notable is that I am the proud father of an almost 5-year-old boy, Yusha and a 4-month-old girl, Amina.

    Read more...