JavaCAPS6+Application+Configuration

Post on 24-Oct-2014

14 views 0 download

Tags:

transcript

Java CAPS Application Configuration

Heiko LemkeSun Software Practice, Germany

Horizons EMEA13–15 O c t o b e r 2 0 0 8

2

• 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

*** DISCLAIMER ***

3

Agenda

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

Sun Confidential

Challenges with previous Releases

5

Typical Enterprise Application Development Environment...(simplified)

6

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

7

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

Sun Confidential

Configuration Overview

9

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

10

Repository Sun Application Server

d.uDe43

Environment 1

d.uDe43

EARenv1/oraext1

d.uDe43

EARenv1/oraext1

a&&vvb

env objenv1/oraext1

Environment 2

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)

11

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

Sun Confidential

Environment Object

13

How To Use Environment Object• Create .properties files from EAR

> asadmin extract-caps-application-configuration

• Create Environment Object> asadmin import-caps-configuration

Sun Confidential

Application Configuration Object

15

HTTP BC• Define Application

Configuration Objects and Application Variables

16

HTTP Endpoint• Specify the ACO in the ConfigExtension of the

HTTP endpoint

Sun Confidential

Preparing theRuntime

Environment

18

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

19

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.

20

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.

21

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

22

• Application properties can now be configured from the Admin Console.

23

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

Sun Confidential

Using LDAP

25

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

26

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

in the application> One LDAP per

App Server instance

ConfiguringLDAP Connectivity

Thank You

Heiko Lemkeheiko.lemke@sun.com

27