concept hand in category spring

appears as: hd
Spring Dynamic Modules in Action

This is an excerpt from Manning's book Spring Dynamic Modules in Action.

All through the book, we’ll show you how to manage dependencies and versions with OSGi. This implies handling specific entries in the manifest file of your bundles, but you should be aware that you usually won’t maintain the manifest file by hand. Tools (such as Eclipse PDE, Bnd, and Bundlor) can help you easily and efficiently manage the manifest file, and they can easily be integrated with building tools like Ant or Maven.

This isn’t a desperate situation. You’re about to learn everything you need to know about transforming a non-OSGi JAR file into a 100 percent OSGi-compliant bundle, a process that we decided to qualify with the barbarism “OSGi-ification” for brevity. We’ll start with a little bit of theory, and then we’ll dive into the transformation. We’ll first try to do it by hand and then use tools like Bnd. We’ll do our experimenting on the Apache Commons DBCP library.

Dependency Injection: Design Patterns Using Spring and Guice

This is an excerpt from Manning's book Dependency Injection: Design Patterns Using Spring and Guice.

What we need is a more flexible solution: construction by hand (sometimes called manual dependency injection), where instead of a dependent creating its own dependencies, it has them provided externally.

Since you end up connecting the pipes yourself at the time of construction, this technique is referred to as construction by hand. In the previous example we used a setter method (a method that accepts a value and sets it as a dependency). You can also pass in the dependency via a constructor, as per the following example: