Factory Method Pattern Implementation of Spring: FactoryBean

Factory method pattern aims to encapsulate object creation process within a separate method in your system. That’s why it is called as so. Factory methods can be created as either static or instance methods within a class. In Spring Application Framework, although it is possible to make use of static or instance factory methods to […]

Moving libraries of web apps into shared folder

If you plan to move repeating libraries of your several web applications depend on, to a shared folder of your application server, I would definitely say NO! to this request. One of my clients asked me about to centralise such repeating libraries into a shared folder. Actually, I had written another blog post in which […]

First Impression Is Really Important

I have attended a 3 day workshop for Oracle Coherence Product. Altough I am a veteran Eclipse user, we used JDeveloper 11g Technology Preview 3 during our lab sessions. During those lab sessions, I noticed an ugly thing related with JDeveloper. JDeveloper provides some IDE mechanism to generate equals and hashCode methods for your classes. […]

Clean Up Your ThreadLocals

Forgetting to clean up ThreadLocal variables might really hurt you. Let’s see how. I have several integration tests with Spring WebFlow and JSF and in one of them I have an setUp method like that: @Before public void setUp() {      RequestContextHolder.setRequestContext(new MockRequestContext()); } I just create a MockRequestContext and put it into RequestContextHolder so […]

How to Detect JDBC Connection Leakages with C3P0

First of all I must say that, the whole credit for discovering this feature goes to my collegue İlker Çelik. In a big codebase with lots of 3rd party libraries and frameworks interacting with JDBC connections it might be difficult to trap JDBC connection leakages, that is open connections left in application. C3P0 connection pool […]

Some Notes About Various Certificate Operations Using OpenSSL

Our system support group delivered a signed certificate to be used in Apache SSL configuration. Its extension was *.pfx, which meant its contents were in PKCS12 format, and was containing both certificate and its private key in it. I needed to convert it into PEM format and to separate certificate from its private key. The […]

Dealing with HTTP Response Redirects within Oracle Web Cache Deployed Environments

I don’t think there exists an application which doesn’t make use of HttpServletResponse’s sendRedirect method. Even your application doesn’t directly depend on it, I am sure you have one or more frameworks which heavily make use of it. In one of our projects we installed Oracle Web Cache to compress HTTP responses generated by our […]

Jar Library Is Here, So Why Am I Still Getting java.lang.NoSuchMethodError?

Then it means that either you have more than one version of that jar library, or there are another jar library which contains a class with that problematic method with exactly same signature. The first case usually happens when you copy your jars into your lib folders with their keeping version suffixes. Stripping of version […]