Re: enable Container managed persistence with wsadmin - Websphere

This is a discussion on Re: enable Container managed persistence with wsadmin - Websphere ; Hi, Does anyone know how to enable CMP using wsadmin.sh (JACL or JYTHON). Thanks, Raj....

+ Reply to Thread
Results 1 to 4 of 4

Thread: Re: enable Container managed persistence with wsadmin

  1. Re: enable Container managed persistence with wsadmin

    Hi,

    Does anyone know how to enable CMP using wsadmin.sh (JACL or JYTHON).



    Thanks,

    Raj.

  2. Re: enable Container managed persistence with wsadmin

    b_rajanikanthrao@yahoo.com wrote:
    > Hi,

    > Does anyone know how to enable CMP using wsadmin.sh (JACL or JYTHON).

    >

    > Thanks,

    > Raj.


    CMP is defined at the bean level. You configure it for each EJB through
    deployment descriptors or annotations.

  3. Re: enable Container managed persistence with wsadmin

    I should have been more specific.

    I'm talking about the check box for Container managed persistence which is in the admin console. (WAS 6.0.2.17)



    JDBC providers > myJDBCProivider > Data sources > myDS



    checkbox Use this Data Source in container managed persistence (CMP).



    I'am able to create DS, custom properties, connection pools etc but I want to enable this check box through wsadmin.sh

  4. Re: enable Container managed persistence with wsadmin

    On Mar 20, 1:27*pm, wrote:
    > I should have been more specific.

    > I'm talking about the check box for Container managed persistence which isin the admin console. (WAS 6.0.2.17)

    >

    > JDBC providers > myJDBCProivider > Data sources > myDS

    >

    > checkbox Use this Data Source in container managed persistence (CMP).

    >

    > I'am able to create DS, custom properties, connection pools etc but I wantto enable this check box through wsadmin.sh


    See below script. This is a series of actions which enables the CMP
    checkbox, there is no simple boolean parameter we can change.

    adapterPath = jdbcScope + 'J2CResourceAdapter:WebSphere
    Relational Resource Adapter/'
    adapter = AdminConfig.getid(adapterPath)
    cfName = dsName + '_CF'
    cfPath = adapterPath + 'CMPConnectorFactory:' +
    cfName
    cf = AdminConfig.getid(cfPath)
    if (cf != ""):
    AdminConfig.remove(cf)
    #end if
    nameAttr = ['name', cfName]
    authMechanism = ['authMechanismPreference',
    'BASIC_PASSWORD']
    dsAttr = ['cmpDatasource', dsId]
    jndiNameAttr = ['jndiName', 'eis/' + dsJNDIName +
    '_CMP']
    authDataAliasAttr = ['authDataAlias',
    dsContainerManagedAuthAlias]
    cfAttrs = [nameAttr, authMechanism, dsAttr,
    jndiNameAttr, authDataAliasAttr]
    cf =
    AdminConfig.create('CMPConnectorFactory', adapter, cfAttrs)

    where
    jdbcScope is the scope string
    jdbcId is the id of the datasouce
    dsName is the name of the datasource
    dsJNDIName is the jndi name of the datasource
    dsContainerManagedAuthAlias is the auth alias name

    -Ravi Thoutam.

+ Reply to Thread