Hi,

thanks again. Now the Bean works. Here is the summary (XDoclet):

Bean-Xdoclet-Descriptor
  | 
  | /**
  |  * @ejb.bean name="Kunde" display-name="Name for KundeBean"
  |  *           description="Description for KundeBean" jndi-name="ejb/Kunde"
  |  *           type="CMP" cmp-version="2.x" view-type="local"
  |  * 
  |  * @ejb.pk class = "java.lang.Object" generate = "false" ejb.value-object 
match =
  |  *         "*" name = "KUNDE"
  |  * 
  |  * @ejb.value-object match = "*" name = "Kunde"
  |  * 
  |  * @jboss.persistence table-name = "KUNDE" read-only = "false" create-table 
=
  |  *                    "false" remove-table = "false"
  |  * 
  |  * @jboss.entity-command name="postgresql-fetch-seq"
  |  *                       
class="org.jboss.ejb.plugins.cmp.jdbc.keygen.JDBCPostgreSQLCreateCommand"
  |  * 
  |  * @jboss.unknown-pk auto-increment = "true" column-name = "KUNDE_ID" 
jdbc-type =
  |  *                   "BIGINT" sql-type = "INT8" class = "java.lang.Object"
  |  * 
  |  */


Entity Bean Methods
  | 
  | /**
  |      * @ejb.create-method view-type = "local"
  |      * 
  |      * @throws CreateException
  |      */
  |     public java.lang.Object ejbCreate(String firmenname, String strasse,
  |                     String plz, String ort, String telefon, String fax,
  |                     String webSeiteURL, String email) throws 
CreateException {
  | // ....
  | return null;
  | }
  | 
  | // Important: NO Setter/Getter/Xdoclet stuff for the primary-field !!!!!
  | 

Using Session Bean creating the entity bean 
  | /**
  |      * @ejb.interface-method view-type = "both"
  |      */
  |     public java.lang.Object createKunde(String firmenname, String strasse,
  |                     String plz, String ort, String telefon, String fax,
  |                     String webSeiteURL, String email) throws 
ECannotCreateException {
  | 
  |             KundeLocal myKundeLocal = null;
  | 
  |             try {
  |                     Logger.log("KundeMgrBean.createKunde()");
  |                     myKundeLocal = this.myKundeLocalHome.create(firmenname, 
strasse,
  |                                     plz, ort, telefon, fax, webSeiteURL, 
email);
  | 
  |                     Logger.log("Neue Kundenid: " + 
myKundeLocal.getPrimaryKey());
  |                     return myKundeLocal.getPrimaryKey(); 
  | 
  |             } catch (CreateException e) {
  |                     throw new ECannotCreateException("Cannot create 'Kunde' 
"
  |                                     + firmenname, e);
  |             }
  |     }
  | 

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3869668#3869668

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3869668


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to