views:

141

answers:

2

Hope a few people in here are familiar with JCAPS. Coming from pure j2ee world, it is difficult to digest the deployment model that JCPAS offers. While creating deployment profile, we need to map the resources (such as jdbc, webservice connector) to external systems. External systems are predefined with the target server ip, port, db name, credentials etc(in case of jdbc). So the problem is an EAR built for test environment can not be deployed to production environment.

In simpler applications we could store database/credentials etc on to property files and hence EAR built for UAT could be deployed to Production with out any change.

Is there a similar strategy available for JCAPS by which EARs built against an environment can be promoted to another seamlessly?

+1  A: 

In JCAPS the Deployment Profile (DP) is still a generic layer;

1) as developper you configure your (dev) properties in the Connectivity Map (CM) and the Environment External Application (EA) inbound and outbound properties;

2) then you extract the configuration into a file :asadmin extract-caps-application-configuration myear.ear

3) and upload this file to your testing/prod Glassfish: asadmin import-caps-configuration --host %HOST% --port %PORT% --user admin --passwordfile ...\passwordfile caps-config

4) in Glassfish\Common Task\CAPS\Env and CM Override you adjust the properties according to the environment! (and restart the ear)

5) enjoy JCAPS efficiency [optional]

all this process is summarized in Application Configuration - JCAPS 6 screencast

Kevin