~~NOTRANS~~
~~Title: Object Injection~~
Occasionally, it's important to add external objects in your running application without additional coding. We have an injection mechanism which is pretty simple. It's possible to inject custom Java objects or objects which implements the interface **IInjectObject**. The difference is that simple objects don't use an init method:
public interface IInjectObject
{
public String getDefaultName();
public void init(ISession pSession);
}
To inject the object, simply put the configuration in config.xml:
The injection is
...
It's also possible to inject by ServiceLoader. Simply create a file with the name **com.sibvisions.rad.server.IInjectObject** in **META-INF/services**, in your classpath. The file should contain one line per object:
com.package.app.MyInjectObject
Be sure that MyInjectObject **implements IInjectObject.**