[JBoss-user] [EJB/JBoss] - Re: AutoGenerating PK Oracle
Yes, it's off topic, but I see no one saw fit to answer. XDoclet does search the hierarchy for XDoclet tags, which is useful if you still have source. Since we often don't, the best solution we have found for this is to repeat the method in the subclass, simply delegating to the superclass method. This gives us a hook upon which to put XDoclet tags. Yes, a hack, to some extent, but would you rather write the interfaces? View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3839577#3839577 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3839577 --- This SF.Net email sponsored by Black Hat Briefings Training. Attend Black Hat Briefings Training, Las Vegas July 24-29 - digital self defense, top technical experts, no vendor pitches, unmatched networking opportunities. Visit www.blackhat.com ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [EJB/JBoss] - Re: AutoGenerating PK Oracle
This is a bit offtopic, jdacev, but how does XDoclet handle cases where your beans are subclassed from classes in a reusable library? Particularly, what about when the methods aren't even overriden? This means your project's classes don't actually have the methods, and thus don't have the comments for XDoclet tags. I'm just curious, because this is the case with all my CMP beans as well as some session beans. View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3837651#3837651 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3837651 --- This SF.Net email is sponsored by the new InstallShield X. From Windows to Linux, servers to mobile, InstallShield X is the one installation-authoring solution that does it all. Learn more and evaluate today! http://www.installshield.com/Dev2Dev/0504 ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [EJB/JBoss] - Re: AutoGenerating PK Oracle
This configuration is wrong because it declares an existing (known) CMP field as unknown. View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3837499#3837499 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3837499 --- This SF.Net email is sponsored by the new InstallShield X. From Windows to Linux, servers to mobile, InstallShield X is the one installation-authoring solution that does it all. Learn more and evaluate today! http://www.installshield.com/Dev2Dev/0504 ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [EJB/JBoss] - Re: AutoGenerating PK Oracle
AutoGenerating PK Oracle --1, the EJB Test: import javax.ejb.EntityBean; /** * @ejb.bean name=Test * jndi-name=TestBean * type=CMP * primkey-field=id * schema=testSchema * cmp-version=2.x * * @ejb.persistence * table-name=SVD_TEST * * @ejb.finder *query=SELECT OBJECT(a) FROM testSchema as a *signature=java.util.Collection findAll() * * @jboss.entity-command name=oracle-sequence class=org.jboss.ejb.plugins.cmp.jdbc.keygen.JDBCOracleCreateCommand * @jboss.entity-command-attribute name=sequence value=SEQ_SVD_TEST * **/ public abstract class TestBean implements EntityBean { /** * The ejbCreate method. * * @ejb.create-method */ public java.lang.Integer ejbCreate(Integer id, String nombre) throws javax.ejb.CreateException { setId(id); setNombre(nombre); return null; } /** * The container invokes this method immediately after it calls ejbCreate. * */ public void ejbPostCreate(Integer id, String nombre) throws javax.ejb.CreateException {} /** * Returns the id * @return the id * * @ejb.persistent-field * @ejb.persistence *column-name=ID * sql-type=NUMBER * @ejb.pk-field * @ejb.interface-method */ public abstract java.lang.Integer getId(); /** * Sets the id * * @param java.lang.Integer the new id value * * @ejb.interface-method */ public abstract void setId(java.lang.Integer id); /** * Returns the nombre * @return the nombre * * @ejb.persistent-field * @ejb.persistence *column-name=NOMBRE * sql-type=VARCHAR2 * * @ejb.interface-method */ public abstract java.lang.String getNombre(); /** * Sets the nombre * * @param java.lang.String the new nombre value * * @ejb.interface-method */ public abstract void setNombre(java.lang.String nombre); } --2, the jbosscmp-jdbc.xml ejb-nameTest/ejb-name table-nameSVD_TEST/table-name cmp-field field-namenombre/field-name column-nameNOMBRE/column-name /cmp-field unknown-pk unknown-pk-classjava.lang.Integer/unknown-pk-class field-nameid/field-name column-nameID/column-name jdbc-typeINTEGER/jdbc-type sql-typeNUMBER/sql-type auto-increment/ /unknown-pk entity-command name=oracle-sequence class=org.jboss.ejb.plugins.cmp.jdbc.keygen.JDBCOracleCreateCommand SEQ_SVD_TEST /entity-command --3, in the section: entity-commands, file: \jboss-3.2.3\server\all\conf\standardjbosscmp-jdbc.xml entity-commands entity-command name=oracle-sequence class=org.jboss.ejb.plugins.cmp.jdbc.keygen.JDBCOracleCreateCommand SEQ_SVD_TEST /entity-command /entity-commands --4, in Oracle, create the sequence: SEQ_SVD_TEST CREATE SEQUENCE SEQ_SVD_TEST START WITH 1 INCREMENT BY 1 MINVALUE 1 MAXVALUE 1E17 NOCACHE CYCLE ORDER; --5, Ready. Creo que esto es todo. Yo tengo implementado esto utilizando Oracle9i, JBOSS 3.2.3 y The Ecplipse project como IDE y funciona perfecto. See you. View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3837450#3837450 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3837450 --- This SF.Net email is sponsored by the new InstallShield X. From Windows to Linux, servers to mobile, InstallShield X is the one installation-authoring solution that does it all. Learn more and evaluate today! http://www.installshield.com/Dev2Dev/0504 ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user