Normally, this should work and is compliant wth the EJB spec.
(But if not, keep your version as well, it will be a software mystery ;-)
| /**
| * The Employee Entity Bean handles the information of an employee.
| * @author Karsten Jahn (OrangeOak)
| * @version 1.0
| *
| * @ejb.bean
| * name = "Employee"
| * display-name = "EB_DataBase - Employee: Employee"
| * description = "The Employee Entity Bean saves every Employee."
| * view-type = "local"
| * type = "CMP"
| * cmp-version = "2.x"
| * local-jndi-name = "ejb/medsched/employee/Employee"
| * reentrant = "false"
| *
| * @ejb.pk class = "java.lang.Object"
| *
| * @jboss.persistence
| * create-table = "true"
| * remove-table = "false"
| * datasource = "java:/mySQLDS"
| * datasource-mapping = "mySQL"
| * table-name = "employee"
| *
| * @jboss.unknown-pk
| * class = "java.lang.Integer"
| * auto-increment = "true"
| * column-name = "employeeid"
| * field-name="employeeID"
| * sql-type = "INTEGER"
| * jdbc-type = "INTEGER"
| *
| * @jboss.entity-command name = "mysql-get-generated-keys"
| */
| public abstract class EmployeeBean implements EntityBean {
|
| [...]
|
| /**
| * @throws CreateException
| * @ejb.create-method
| */
| public java.lang.Object ejbCreate(StaffMember employee) throws CreateException
{
| setLastname(employee.lastname);
| setFirstname(employee.firstname);
| setTelephone(employee.telephone);
| return null;
| }
| public void ejbPostCreate(StaffMember employee) {
| }
| }
|
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3830269#3830269
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3830269
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user