Adding an EBA asset that includes composite bundles by using the addCompUnit command

You can use the addCompUnit command to add a composition unit that contains a previously-imported enterprise bundle archive (EBA) asset plus configuration information. If the EBA asset includes composite bundles, the command syntax is slightly different.

Before you begin

For a full description of how you specify this configuration information, see Adding an EBA asset to a composition unit by using wsadmin commands. When you work through that task, each step where the syntax is different for composite bundles is linked to an equivalent step in this task.

About this task

An OSGi composition unit includes an EBA asset and some or all of the following configuration information:
  • Mappings from the composition unit to a target application server, web server, or cluster.
  • Configuration of the session manager, context roots or virtual hosts of the application.
  • Mappings from enterprise beans to JNDI names.
  • Bindings to any associated web applications or blueprint resource references.
  • Mappings from security roles to particular users or groups.
For several of the elements, the values you specify include bundle identifiers. If your EBA asset includes or references composite bundles, the command syntax is slightly different. The differences for composite bundles are described in the following steps.

Procedure

Example

In the following example, the jython syntax from the previous steps is combined with the additional steps described in Adding an EBA asset to a composition unit by using wsadmin commands so that, by running the addCompUnit command once only, a composition unit is created and added to a business-level application. In the example, an EBA file com.ibm.ws.eba.helloWorldService.eba contains a composite bundle with symbolic name com.ibm.ws.eba.helloWorldCBA, at version 1.0.0. This composite bundle contains two WABs:
  • com.ibm.ws.eba.helloWorldService.web, at version 1.0.0
  • com.ibm.ws.eba.helloWorldService.withContextRoot, at version 0.9.0
The composite bundle also contains a bundle with symbolic name com.ibm.ws.eba.helloWorldService.properties.bundle, at version 1.0.0.
AdminTask.addCompUnit('[
  -blaID WebSphere:blaname=helloWorldService 
  -cuSourceID WebSphere:assetname=com.ibm.ws.eba.helloWorldService.eba
  -CUOptions [
    [WebSphere:blaname=helloWorldService.eba 
    WebSphere:assetname=com.ibm.ws.eba.helloWorldService.eba 
    com.ibm.ws.eba.helloWorldService_0001.eba "" 1 false DEFAULT]] 
  -MapTargets [[ebaDeploymentUnit WebSphere:cluster=cluster1]] 
  -ActivationPlanOptions [[default ""]]  
  -ContextRootStep [
    [com.ibm.ws.eba.helloWorldCBA_1.0.0/com.ibm.ws.eba.helloWorldService.web 1.0.0
    "/hello/web"] 
    [com.ibm.ws.eba.helloWorldCBA_1.0.0/com.ibm.ws.eba.helloWorldService.withContextRoot 0.9.0
    "/hello/service"]]
  -EJBMappingsStep [
    [com.ibm.ws.eba.financeCBA_1.0.0/com.ibm.ws.eba.currencyService 1.0.0 ExchangeRate_ejb
      com.ibm.ws.eba.ejb.ExchangeRate Local ejb/ExchangeRate] 
    [com.ibm.ws.eba.financeCBA_1.0.0/com.ibm.ws.eba.accountService 0.9.0 CustomerDetails_ejb
      com.ibm.ws.eba.ejb.CustomerDetails Remote ejb/CustomerDetails]]
  -EJBRefStep [
    [com.ibm.ws.eba.financeCBA_1.0.0/com.ibm.ws.eba.currencyService 1.0.0
      META-INF/ejb-jar.xml/CurrencyExchange ExchangeRate com.ibm.ws.eba.ejb.ExchangeRate
      ejb:ExchangeRate]
    [com.ibm.ws.eba.financeCBA_1.0.0/com.ibm.ws.eba.accountService 0.9.0
      WEB-INF/web.xml CustomerDetails com.ibm.ws.eba.ejb.CustomerDetails ejb:CustomerDetails]]
  -EJBResourceRefs [
    [com.ibm.ws.eba.financeCBA_1.0.0/com.ibm.ws.eba.currencyService 1.0.0
     ExchangeRate dataSource1 javax.sql.DataSource ref/ds1 ClientContainer
     "WebSphere:name=mprop1,value=val1,description=desc1"
     "exprop1=expropval1+exprop2=expropval2"] 
    [com.ibm.ws.eba.financeCBA_1.0.0/com.ibm.ws.eba.accountService 0.9.0
     CustomerDetails dataSource2 javax.sql.DataSource ref/ds2 WSLogin "" ""]]
  -EJBMsgDestRefs [
    [com.ibm.ws.eba.financeCBA_1.0.0/com.ibm.ws.eba.currencyService 1.0.0
     ExchangeRate jms/myQ javax.jms.Queue jms/workQ] 
    [com.ibm.ws.eba.financeCBA_1.0.0/com.ibm.ws.eba.accountService 0.9.0
     CustomerDetails jms/myT javax.jms.Topic jms/notificationTopic]]
  -VirtualHostMappingStep [
    [com.ibm.ws.eba.helloWorldCBA_1.0.0/com.ibm.ws.eba.helloWorldService.web 
    1.0.0 "HelloWorld service" default_host]
    [com.ibm.ws.eba.helloWorldCBA_1.0.0/com.ibm.ws.eba.helloWorldService.withContextRoot 
    0.9.0 "HelloWorld second service" test_host]]
  -MapRolesToUsersStep [
    [ROLE1 No Yes "" ""] 
    [ROLE2 No No WABTestUser1 ""] 
    [ROLE3 No No "" WABTestGroup1] 
    [ROLE4 Yes No "" ""]]
  -MapRunAsRolesToUsersStep [
    [Role1 User1 password1]
    [AdminRole User3 password3]]
  -BlueprintResourceRefBindingStep[
    [com.ibm.ws.eba.helloWorldCBA_1.0.0/com.ibm.ws.eba.helloWorldService.properties.bundle 
    1.0.0 resourceRef javax.sql.DataSource jdbc/Account Container Shareable alias1]]
  -WebModuleMsgDestRefs [
    [com.ibm.ws.eba.helloWorldCBA_1.0.0/com.ibm.ws.eba.helloWorldService.web 
    1.0.0 
    jms/myQ javax.jms.Queue 
    jms/workQ] 
    [com.ibm.ws.eba.helloWorldCBA_1.0.0/com.ibm.ws.eba.helloWorldService.web 
    1.0.0 
    jms/myT javax.jms.Topic 
    jms/notificationTopic]]
  -WebModuleResourceRefs [
    [com.ibm.ws.eba.helloWorldCBA_1.0.0/com.ibm.ws.eba.helloWorldService.web 
    1.0.0 
    jdbc/jtaDs javax.sql.DataSource 
    jdbc/helloDs "" "" ""] 
    [com.ibm.ws.eba.helloWorldCBA_1.0.0/com.ibm.ws.eba.helloWorldService.web 
    1.0.0 
    jdbc/nonJtaDs javax.sql.DataSource 
    jdbc/helloDsNonJta "" "" "extprop1=extval1"]]
]')

Icon that indicates the type of topic Task topic

Terms and conditions for information centers | Feedback


Timestamp icon Last updated: Monday, 21 April 2014
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=phil&product=was-nd-iseries&topic=thread_ta_dev_acu_wsadmin_cba
File name: thread_ta_dev_acu_wsadmin_cba.html