Menu

minbox Introduction

1 Introduction
minbox is a java micro-container, which can manage bean definition and supply bean instance for outside caller, then the developers needn't create object instance with 'new' keyword. The container is very easy to study, and fast development in java application.

2 Bean elements
Before creation, bean definition must be existed in container. Some descript object are used to define bean part definition and work as instruction to container, we call them as elements. Some elements are listed below

1:InstanceCreation
2:InstanceSingleton
3:InitializeMethodName
4:DestroyMethodName
5:InjectionProperty
6:InjectionInvocation
7:InvocationInterception
8:ParentReferenceId

An element factory can be used to create element object, for example code
BeanContainer container = new BeanContainerImpl ();
BeanElementFactory beanElementFactory =container.getBeanElementFactory ();
InitializeMethodName initMehtod=beanElementFactory.createInitializeMethod ("init");

3 Injection parameters
After bean instance created, container will inject parameters into them. There are four kinds’ Ioc parameters types; container will convert them to real value before injection.

1:Primitive type
2:Instance type
3:Refrence type
4:Container type

Also, container has a parameter factory to create Ioc parameter, for example code
BeanContainer container = new BeanContainerImpl ();
BeanParameterFactory beanParameterFactory =container.getBeanParameterFactory ();
Bean Parameter nameParmeter = beanParameterFactory.createStringParameter ("Chris");

4 How to call
Two ways for it.
1: Call directly container
2: Use xml context, the follow chapter will talk about it

More source Download
http://dl.vmall.com/c0u7lix55w

Posted by JavaTear 2013-04-15

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.