Creating templates for Application configurations

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.
here's how:

 

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
KeyAlias =
KeyPassword = \*\*\*\*\*
KeyStore =
KeyStorePassword = \*\*\*\*\*
Password = \*\*\*\*\*
Port = 22
SecuredType = None
TrustStore =
TrustStorePassword = \*\*\*\*\*
UseUserDefinedDirListStyle = false
User = anonymous
UserDefinedDirListStyle =
UserDefinedDirListStyleConfig =
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.


Comments:

Post a Comment:
  • HTML Syntax: NOT allowed
About

This blog will be about software that i work with; Java, OpenESB, GlassFish and perhaps a bit about photography.

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today