Monday, July 12, 2010

custom component on server start

wc-server.xml need to be updated with the new component:

<Components>
<component compclassname="com.ext.common.configuration.EXTStoreConfigUtilityEnvironment"
enable="true" name="update each environment specific configuration values."/>
</Components>


This is extensively useful for taxware or environment specific components update on each environment. You can load environment specific information on server start. This is loaded into the memory on server start.

Create a new class implementing the ComponentConfiguration:

package com.ext.common.configuration.EXTStoreConfigUtilityEnvironment
public class EXTStoreConfigUtilityEnvironment
implements ComponentConfiguration {

public void destroy() {
//Do Nothing
}

public void enable(boolean enable) throws Exception {
//Do nothing
}
* Main method to perform the action of running all the queries
*/
public void init(Element arg0) throws Exception {

}
}

No comments:

Post a Comment