Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

enable Container managed persistence with wsadmin

404 views
Skip to first unread message

benut...@web.de

unread,
Feb 6, 2006, 10:07:58 AM2/6/06
to
Hi,
do anybody know how i can enable "Container managed persistence" for a data source with wsadmin?

There is a box in the admin console under
Resources --> JDBC-Provider --> MyProvider --> DataSources --> MyDataSource

Thanks.

Paul Ilechko

unread,
Mar 20, 2008, 1:59:55 PM3/20/08
to
b_rajani...@yahoo.com wrote:
> Hi,<br />
> Does anyone know how to enable CMP using wsadmin.sh (JACL or JYTHON).<br />
> <br />
> Thanks,<br />
> Raj.

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

b_rajani...@yahoo.com

unread,
Mar 20, 2008, 1:48:12 PM3/20/08
to

b_rajani...@yahoo.com

unread,
Mar 20, 2008, 4:27:58 PM3/20/08
to
I should have been more specific.<br />
I'm talking about the check box for Container managed persistence which is in the admin console. (WAS 6.0.2.17)<br />
<br />
JDBC providers &gt; myJDBCProivider &gt; Data sources &gt; myDS<br />
<br />
checkbox Use this Data Source in container managed persistence (CMP).<br />
<br />
I'am able to create DS, custom properties, connection pools etc but I want to enable this check box through wsadmin.sh

RaviThoutam

unread,
Mar 20, 2008, 5:16:02 PM3/20/08
to
On Mar 20, 1:27 pm, <b_rajanikanth...@yahoo.com> wrote:
> I should have been more specific.<br />
> I'm talking about the check box for Container managed persistence which is in the admin console. (WAS 6.0.2.17)<br />
> <br />
> JDBC providers > myJDBCProivider > Data sources > myDS<br />

> <br />
> checkbox Use this Data Source in container managed persistence (CMP).<br />
> <br />
> I'am able to create DS, custom properties, connection pools etc but I want to 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.

0 new messages