Java

all tags

Pages tagged with "Java":

JSR-269 Annotation Processing

13 Aug 2013 , tagged: Java, Annotation, JSR-269, Reading List

I’ve been contemplating compile time bytecode manipulation for the Object Mapper Framework for a while now. Compile time instrumentation of classes seems to be a better approach and does away a whole lot of class loading issues, especially in OSGI environments. In any case, I remembered Project Lombok and reading about JSR-269, which was introduced with Java 1.6. It’s an API that allows you to plug custom annotation processors into javac.

read more →

Making Eclipse's Method Stubs Better and other things

26 Jun 2013 , tagged: Eclipse, Java

Just downloaded Eclipse Kepler and I’m quite happy with it. It appears fast and stable so far, but that could be just that it’s a brand new install. Anyways, I re-added some of my usual code templates and while doing so, I discovered a few useful things. And because I keep doing this on every Eclipse installation, I decided to write this down here. On a related note, an Eclipse plugin to share your Eclipse templates would be pretty rad.

read more →

OSGI, Guice, and Peaberry: first steps

27 Feb 2013 , tagged: OSGI, Guice, Peaberry, Java

Introduction I’ve been trying to get Google Guice and Peaberry to work in my OSGI projects for a while. Google Guice is a great dependency injection framework, and Peaberry promises to bridge the gap between OSGI services and dependency injection. However, getting Peaberry to work was not trivial, mostly because there aren’t many docs and the quality of the docs is somewhat lacking. The best piece is still this pdf Peaberry - blending services and extensions, but it’s a lot of information in very little space.

read more →

Google Guice and Scope Mixing

11 Dec 2012 , tagged: Guice, Dependency Injection, Java

I’ve been working on a small Java application I wrote a few years ago for some bug fixes and in the process of making it better, I introduced Google Guice, my favourite dependency injection framework. On of the great features of Guice is that it supports different scopes for injection. Per default, Guice will return a new object for every request. But sometimes you want to objects to be created a bit less liberally, for example, you want a certain object to be created only once.

read more →

Reading List: JVM Internals, Rugged Software, and 12 Factor Apps

04 Dec 2012 , tagged: Reading List, Java, JVM, Software Engineering, Rugged Manifesto

Recently I’ve been reading a lot about software development and philosophies on how to write better software. I really enjoyed the Rugged Manifesto as it emphasizes how software is crucial in our world and the responsibilities that come with it. Another great guide is Twelve-Factor App, a list of 12 principles on how to effectively implement and operate applications. And last but not least, Understanding JVM Internals, a really well written cross cut through the JVM, including class file format, JVM structure and stack memory layouts.

read more →

commons-logging in OSGI Environments

14 Nov 2012 , tagged: OSGI, Java, commons-logging, commons-httpclient, Pax Logging

While working on a small toy project using Apache Felix and commons-httpclient, I kept running into the issue that there is no official OSGI bundle for Apache commons-logging out there. While most Apache commons projects either provide simple bundles or full blown OSGI implementations with Activators and Services, commons-logging is an interesting exception. If you scan the Commons OSGI status page, you will notice that there is no OSGI version for commons-logging available, and a separate section to explain why.

read more →

OSGI Bootstrapping

23 Oct 2012 , tagged: OSGI, Java

I’ve been working with OSGI based technology for a while now and it’s a great piece of technology. However, so far I’ve only worked with OSGI technology that runs in existing instances of the framework. A running framework is easy to deal with, but how do you get to this point? I spent some time today playing with that, and it took me a while to put it all together. So naturally, I’ll have to record my findings here.

read more →

OSGI Classloading Reading List

12 Oct 2012 , tagged: Java, OSGI, Reading List

I’ve been doing a lot of reading on how OSGI handles class loading. I’m starting to fully understand and leverage OSGI and I’m trying to keep my framework Object Mapper as compatible with OSGI as I can. In OSGI classloading is very restricted, similar to what happens in enterprisy Java application servers, and completely unlike traditional Java applications where everything shares a single classloader. In OSGI each bundle has its own classloader and what is visible accross the bundle boundaries is subject to strict export rules.

read more →