You are on page 1of 27

Java CAPS Application Configuration

Heiko Lemke
Sun Software Practice, Germany

Horizons EMEA
1315 O c t o b e r 2 0 0 8

*** DISCLAIMER ***


THE FOLLOWING SLIDES ARE FORWARD LOOKING AND ARE CURRENT PLANS OF SUN MICROSYSTEMS AND SHARED UNDER STRICT CONFIDENCE AS ALWAYS, AS THESE ARE FUTURE PLANS, DATES, AND FEATURE SETS ARE SUBJECT TO CHANGE

Agenda

Challenges with previous Releases Configuration Overview Environment Object Application Configuration Object Preparing the Runtime Environment Using LDAP
3

Challenges
with previous Releases

Sun Confidential

Typical Enterprise Application Development Environment...(simplified)

Configuration Challenges
with Rel. 5.x

Change in application configuration, regardless of how minor, requiring re-generation of the entire application
> Environment migration: DEV -> TEST -> PROD > System maintenance

Externalizing configuration parameters to LDAP mostly not sufficient as LDAP connectivity information is still stored within the application

Configuration Challenges
with Rel. 5.x (Cont'd)

System administrator requiring access and familiarity with CAPS development environment (Enterprise Designer) to manage system security and connectivity.
> Access to Enterprise Designer required > Learning curve for casual user

Configuration Overview

Sun Confidential

Configuration Properties
Properties are defined / stored in various locations
> Embedded in Application (EAR, SA) > Externalized from Application

Embedded
> Connectivity Map, Environment > JCA Activation, WSDL

Externalized
> LDAP, Application Server, BC > Can override embedded configurations by using

Environment Objects, Application Configuration Objects, and Application Variables


9

Introducing Configuration Defaults


Application configuration properties can be set in the runtime environment
> Design-time application config values are default > Values set in runtime environment will be used, if set > application deployable is not modified > Supported for different application deployable types

(EAR, RAR, SA)


EAR

env1/oraext1 d.uDe43 Repository d.uDe43 Environment 1 Environment 2

env1/oraext1 d.uDe43 Sun Application Server


env obj

EAR

env1/oraext1 a&&vvb
10

Configuration Objects
Connectivity data stored in Sun Application Server Shared between applications Environment Object
> For Service Assemblies and EARs > Overrides connectivity information upon deployment > Can be manipulated as properties files or Admin Console

Application Configuration Object


> For Service Assemblies > Looks up connectivity information upon deployment > Can be manipulated in NB properties or Admin Console
11

Environment Object

Sun Confidential

How To Use Environment Object


Create .properties files from EAR
> asadmin extract-caps-application-

configuration

Create Environment Object


> asadmin import-caps-configuration

13

Application Configuration Object

Sun Confidential

HTTP BC
Define Application Configuration Objects and Application Variables

15

HTTP Endpoint
Specify the ACO in the ConfigExtension of the HTTP endpoint

16

Preparing the Runtime Environment

Sun Confidential

Deploying Applications
Steps for first time application deployment
> Run ASADMIN CLI on deployable to extract

configuration parameters into properties files > Edit the properties files > Import the properties files into the App Server > Deploy the application deployable

Steps for re-deployment


> Just deploy, if references to external systems have not

changed

18

Extracting Application Configuration Parameters


App Server ASADMIN CLI is used to extract configuration parameters from application EAR:
asadmin query-caps-config [--configdir caps-config] ear-file Example: asadmin query-caps-config --configdir c:\temp\configdir dpTestFileInBatchOut.ear

A separate configuration file will be created for every external systems being used by the application deployable.
19

External System Configuration File


Batch Local File External System properties:
# Target Directory Name # Target Directory Name: The directory on the file system from which files are # retrieved or sent. It may specify the exact name or a pattern. For outbound # transfer the directory is created if it does not exist. Target_Directory_Name=c:\\temp # Target File Name # Target File Name: The name of the file to be retrieved or sent. It may specify # the exact name or a pattern. For outbound transfer the file is created if it # does not exist. Target_File_Name=out_batch.txt ...

Configuration file can be edited before importing.


20

Importing Configuration Parameters


ASADMIN CLI is also used for importing configuration files:
asadmin import-caps-config [--host localhost] [--jmxport 8686] [--user admin] [--password admin_password] config-dir Example: asadmin import-caps-config --password adminadmin c:\temp\configdir

Any modified password values (in plain text) will be re-encrypted Configuration files can be used to quickly replicate application config settings in multiple app servers
21

Application properties can now be configured from the Admin Console.

22

Updating Application Configuration


Steps for updating application configuration (visual)
> Use the App Server Admin Console > Restart the application

Steps for updating application configuration (command line)


> Edit the properties files > Import the properties files > Restart the application

23

Using LDAP

Sun Confidential

LDAP Cfg Support in Java CAPS 6


For backward compatibility Changes
> LDAP server address is specified in Application Server > Developer and administrator need not have both visibility

to the same LDAP server

One LDAP per Application Server instance

25

Configuring LDAP Connectivity


Configuration of LDAP connectivity moved to Admin Console
> No longer stored

in the application > One LDAP per App Server instance


26

Thank You
Heiko Lemke
heiko.lemke@sun.com

27

You might also like