Patches item #489503, was opened at 2001-12-05 11:18
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=376687&aid=489503&group_id=22866

Category: JBossServer
Group: v2.5 Rabbit Hole (unstable)
Status: Open
Resolution: None
Priority: 5
Submitted By: Ignacio Coloma (alu1344)
Assigned to: Nobody/Anonymous (nobody)
Summary: AutoNumberEJB with CMP2 support

Initial Comment:
This is the EJB file needed to deploy the 
AutoNumberEJB on a CMP2 app. The old (and still 
needed) AutoNumberEJB needed a jaws file if you want 
to map its fields, because to use jbosscmp the bean 
should have its accesor methods declared as abstract.

Copy this one on the org.jboss.util package and deploy 
it as you would with the older one (do not delete the 
older one, it's still neded for CMP1 apps). The 
interfaces and the AutoNumberFactory classes will work 
with the new version. My example deploy snippet:

ejb-jar:
========
        <entity>
            <ejb-name>JBossUtilAutoNumber</ejb-name>
            <home>org.jboss.util.AutoNumberHome</home>
            <remote>org.jboss.util.AutoNumber</remote>
            <ejb-
class>org.jboss.util.AutoNumberEJB2</ejb-class>
            <persistence-type>Container</persistence-
type>
            <reentrant>True</reentrant>
            <abstract-schema-name>KEY_VALUES</abstract-
schema-name>
            <cmp-field><field-name>name</field-
name></cmp-field>
            <cmp-field><field-name>value</field-
name></cmp-field>
            <prim-key-class>java.lang.String</prim-key-
class>
            <primkey-field>name</primkey-field>
        </entity>

jbosscmp-jdbc:
==============
        <entity>
            <ejb-name>JBossUtilAutoNumber</ejb-name>
            <table-name>KEY_VALUES</table-name>
            <cmp-field>
                <field-name>name</field-name>
                <column-name>NAME</column-name>
            </cmp-field>
            <cmp-field>
                <field-name>value</field-name>
                <column-name>VALUE</column-name>
            </cmp-field>
        </entity>

Example of use (the same as the older version):
==============================================
AutoNumberFactory.getNextInteger("MyEJBName");


----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=376687&aid=489503&group_id=22866

_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to