- All Implemented Interfaces:
- ConfigurationUpgrade, org.glassfish.hk2.api.PostConstruct
@Service(name="defaultconfigupgrade")
public class DefaultConfigUpgrade
extends Object
implements ConfigurationUpgrade, org.glassfish.hk2.api.PostConstruct
Upgrade service to add the default-config if it doesn't exist. 3.0.1 and v2.x developer profile do not have default-config. The data to populate the
default-config is taken from glassfish4\glassfish\lib\templates\domain.xml. This class uses the StAX parser and depends on the exact order of the elements in
the template, and the original contents of the template when glassfish was installed. The DefaultConfigUpgrade may not work if the template has been changed
from its original.
TODO: Replace using a simpler, more maintainable approach such as HK2 DOM objects, or having a default for the Config object that creates default-config
- Author:
- Jennifer Chou