IBM Support

PK56887; 6.0.2.21: wsadmin is not able to add a cmpconnectionfactory

Download


Abstract

There is no flexibility for defining a cmpConnection factory binding for the container-managed persistence (CMP) V1.x beans present in an Enterprise Java Bean (EJB) V2.0 Module.

Download Description

PK56887 resolves the following problem:

ERROR DESCRIPTION:
If the ejb-jar.xml file for an EJB® has a module type of EJB 2.0, <!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
.
and the CMP type of the bean is
<cmp-version>1.x</cmp-version>
.
the precedence order in the EJBContainer in IBM® WebSphere® Application Server of bindings in the ibm-ejb-jar-bnd.xmi file for CMP
1.1 EJBs in a EJB 2.0 modlue is
1. cmpConnectionFactory in the EJBBindings.
2. defaultCMPConnectionFactory
3. datasource in the EJBBindings
4. defaultDataSource

For an EJB 2.0 module with a CMP V1.1 EJB, there is no way with a wsadmin command to get a cmpConnectionFactory added to the EJBBindings in the ibm-ejb-jar-bnd.xmi file. If you specify the tag, -DataSourceFor10CMPBeans on the wsadmin command to modify the ejb, such as in the command,

"$AdminApp edit my_demo {-DataSourceFor10CMPBeans
{{Catalog-ProductManagementData Attribute
Catalog-ProductManagementData.jar,META-INF/ejb-jar.xml
jdbc/myDataSource}}}"

you get a datasource in the EJBBindings, such as
<ejbBindings xmi:id="Attribute_Binding"
jndiName="ejb/com/ibm/catalog/objects/AttributeHome">
<enterpriseBean
xmi:type="com.ibm.etools.ejb:ContainerManagedEntity"
href="META-INF/ejb-jar.xml#Attribute"/>
<datasource xmi:id="ResourceRefBinding_1166755180048"
jndiName="jdbc/myDataSource">

but if there is a defaultCMPConnectionFactory in the ibm-ejb-jar-bnd.xmi file, then the jndi name specified in the defaultCMPConnectionFactory is used by the CMP V1.1 application versus using the specific datasource for the EJB.

IF you specify the tag,
-DataSourceFor10CMPBeans/-DataSourceFor20CMPBeans wsadmin rejects this because it has parameter checks that compares the CMP type to see if it is CMP V2.x. WASX7111E: Cannot find a match for supplied option: [Catalog-ProductManagementData, Attribute, Catalog-ProductManagementData.jar,META-INF/ejb-jar.xml, jdbc/myDataSource]; for task: DataSourceFor20CMPBeans

This is only a problem with the EJB V2.0 Module that contains a CMP V1.1 bean.

LOCAL FIX:
Either comment out the defaultCMPConnectionFactory
<!--defaultCMPConnectionFactory
xmi:id="CMPConnectionFactoryBinding_1192670152913"/-->
or
modify the ibm-ejb-jar-bnd.xmi file with an editor to create the cmpConnectionFactory.

PROBLEM SUMMARY

USERS AFFECTED:
Users of IBM WebSphere Application Server versions 6.0.2 and 6.1.

PROBLEM DESCRIPTION:
There is no flexibility for defining a cmpConnection factory binding for the container-managed persistence (CMP) V1.x beans present in an Enterprise Java Bean (EJB) V2.0 Module.

RECOMMENDATION:
None

If you have an Enterprise application containing an EJB module with Module V2.0 and a CMP bean of V1.x, while deploying the application without bindings we always create a datasource binding per CMP V1.x.

But there is no flexibility of defining a cmpConnection factory binding for the CMP V1.X beans present in an EJB 2.0 Module.

PROBLEM CONCLUSION:
Code changes have been made to ensure that cmpConnectionFactory bindings will be generated for the CMP V1.X beans under EJB V2.0 Module.

The wsadmin AdminApp option "-DataSourceFor20CMPBeans" will facilitate the above. In the Administrative Console we are providing the same feature by listing all the CMP V1.X beans in Module V2.0 in the Step "Map data sources for all V2.x CMP beans" and any mapping done to the EJBs in this panel will create cmpConnectionFactory bindings.

But if the same jndi name has been used for DataSource and cmpConnectionFactory for a particular EJB then the cmpConnectionFactory binding takes precedence over the datasource.

The fix for this APAR is currently targeted for inclusion in fixpacks 6.1.0.17. and 6.0.2.27

Please refer to the recommended updates page for delivery information:
http://www.ibm.com/support/docview.wss?rs=180&uid=swg27004980

Prerequisites

Please download the UpdateInstaller below to install this fix.

http://www-1.ibm.com/support/docview.wss?rs=180&uid=swg24012718

Installation Instructions

Please review the readme.txt for detailed installation instructions.

[{"INLabel":"Readme","INLang":"US English","INSize":"9653","INURL":"ftp://public.dhe.ibm.com/software/websphere/appserv/support/fixes/PK56887/readme.txt"}]

Download Package

Download package
What is Fix Central (FC)?
What is DD?
Download RELEASE DATE LANGUAGE SIZE(Bytes) Download Options
6.0.2.21-WS-WAS-IFPK5688712-07-2007US English26548FCFTPDD

On
[{"DNLabel":"6.0.2.21-WS-WAS-IFPK56887","DNDate":"12-07-2007","DNLang":"US English","DNSize":"26548","DNPlat":{"label":"AIX","code":"PF002"},"DNURL":null,"DNURL_FTP":null,"DDURL":null}]

Technical Support

Contact IBM Support using SR (http://www-306.ibm.com/software/support/probsub.html), visit the WebSphere Application Server Support Web site (http://www.ibm.com/software/webservers/appserv/was/support/), or contact 1-800-IBM-SERV(U.S. only).

[{"Product":{"code":"SSEQTP","label":"WebSphere Application Server"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"System Management\/Repository","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF012","label":"IBM i"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"6.0.2.21","Edition":"Base;Developer;Enterprise;Express;Network Deployment","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
15 June 2018

UID

swg24017786