Creating templates for Application configurations
By Trond Strømme on Aug 13, 2009
I've been asked a number of times about how one can create a template for scripting the Application Configurations a Binding Component supports so I thought I'd whip up a little recipe on it.
The asadmin command create-jbi-application-configuration supports a property file, which makes it easy to externalize the environment specific configuration for a Binding Component for a given environment.
The content of the properties file varies from binding component to binding component.
Getting the names of the supported properties is easy.
1) Create a sample application configuration on a binding component using the web admin console.I created a simple configuration called testconfig for the sun-ftp-binding component. I created a simple configuration called testconfig for the sun-ftp-binding component.
2) Connect with asadmin to the appserver.
3) In asadmin: show-jbi-application-configuration --component sun-ftp-binding testconfig
This prints out a list of all properties for the testconfig Application Configuration for the FTPBC:
irListStyle = UNIX
EnableCCC = false
Host = localhost
KeyPassword = \*\*\*\*\*
KeyStorePassword = \*\*\*\*\*
Password = \*\*\*\*\*
Port = 22
SecuredType = None
TrustStorePassword = \*\*\*\*\*
UseUserDefinedDirListStyle = false
User = anonymous
configurationName = testconfig
4) Put all these properties in a property file, change the property values and make more files for each environment as needed.
5) To add files with properties to a binding component in asadmin use:
create-jbi-application-configuration --component sun-ftp-binding [path to property file]
This way all of the application configuration properties creation can be scripted. Use a bash, cmd, python or whatever script language you're comfortable with to configure a domain.