I am seeing this log message when using the create-domain command with GlassFish 3.1.1
No domain initializers found, bypassing customization step
What can be accomplished with domain initializers? Is there any documentation?
Examples of create-domain usages with logging output is shown here,
http://docs.oracle.com/cd/E18930_01/html/821-2433/create-domain-1.html
The reference manual reports:
If domain customizers are found in JAR files in the as-install/modules directory when the create-domain subcommand is run, the customizers are processed. A domain customizer is a class that implements the DomainInitializer interface.
I did found no documentation about customization but based on the source I can figure out that domain initializers are used to customize domain.xml during domain creation.
package org.glassfish.api.admin.config;
import org.jvnet.hk2.annotations.Contract;
import org.glassfish.api.admin.config.Container;
/**
* Marker interface to mark inhabitants that require some minimal initial
* configuration to be inserted into a newly create domain's domain.xml
*
* @author Nandini Ektare
*/
@Contract
public interface DomainInitializer {
/**
* The actual initial config that needs to be inserted into
* the fresh domain.xml
*
* See {@link Attribute#value()} for how the default value is inferred.
*
*/
public <T extends Container> T getInitialConfig(DomainContext initialCtx);
}
You can find source here.
the getInitialConfig
method returns a Container
instance. Container
interface extends org.jvnet.hk2.config.ConfigBeanProxy
interface that appears to be a proxy to Dom
class:
/**
* Marker interface that signifies that the interface
* is meant to be used as a strongly-typed proxy to
* {@link Dom}.
*
* <p>
* To obtain the Dom object, use {@link Dom#unwrap(ConfigBeanProxy)}.
* This design allows the interfaces to be implemented by other code
* outside DOM more easily.
*
* @author Kohsuke Kawaguchi
* @see Dom#unwrap(ConfigBeanProxy)
* @see DuckTyped
* @see Element
* @see Attribute
*/
public interface ConfigBeanProxy {
I figure out that hk2 is the key to understand how domain customization works.
I hope someone else can give you some more useful info.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With