ONJava.com -- The Independent Source for Enterprise Java
oreilly.comSafari Books Online.Conferences.

advertisement

AddThis Social Bookmark Button
Article:
  EJB 2 and J2EE Packaging
Subject:   Prb with <cmp-version> tag with J2EE 1.3 server
Date:   2003-01-27 01:01:09
From:   anonymous2

HI,


My bean has CMP persistence. In my ejb-jar.xml file looks like this:


<?xml version="1.0"?>


<!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 1.1//EN" "http://java.sun.com/j2ee/dtds/ejb-jar_1_1.dtd">


<ejb-jar>
<display-name>MusicCDEJB</display-name>
<enterprise-beans>
<entity>
<description>Models a MusicCD</description>
<ejb-name>MusicCDBean</ejb-name>
<home>musicstore.MusicCDHome</home>
<remote>musicstore.MusicCD</remote>
<ejb-class>musicstore.MusicCDBean</ejb-class>
<persistence-type>Container</persistence-type>
<prim-key-class>java.lang.String</prim-key-class>
<reentrant>True</reentrant>
<cmp-version>2.x</cmp-version>
<abstract-schema-name>MusicCD</abstract-schema-name>


<cmp-field><field-name>upc</field-name></cmp-field>
<cmp-field><field-name>title</field-name></cmp-field>
<cmp-field><field-name>artist</field-name></cmp-field>
<cmp-field><field-name>type</field-name></cmp-field>
<cmp-field><field-name>price</field-name></cmp-field>
</entity>
</enterprise-beans>


<assembly-descriptor>
<container-transaction>
<method>
<ejb-name>MusicCDBean</ejb-name>
<method-name>*</method-name>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
</assembly-descriptor>
</ejb-jar>


I created a jar file & added EJB Jar file to my ear file. In the ejb bean's Entity tab, the persistence is set to Container Managed Persistence 1.0 & not 2.0. Why so! Also abstract schema name is not set nor accessible. Can please tell me where am i going wrong. Any help is greatly appreciated.


Thanks


Trupti


1 to 1 of 1
1 to 1 of 1