Hi. I create row in DB through cmp and try to get it's id like this :
Object ref = context.lookup("ContractLocal");
ContractLocalHome contractLocal = (ContractLocalHome) ref;
ret = contractLocal.create(contract).getId();

but I get :

2007-06-25 14:44:02,384 ERROR [org.jboss.ejb.plugins.LogInterceptor]
EJBException in method: public abstract java.lang.Integer
com.egar.chronim.server.ejb.SessionFacade.createContract(
com.egar.chronim.model.Contract) throws java.rmi.RemoteException:
javax.ejb.NoSuchObjectLocalException: Entity not found: primaryKey=0

but row creates in DB. So I can't get Id through my local interface because
EJB has id as 0. It does not increment like it does in DB.
How can I get the real ID of new created row?



--
Best regards,
Bashmaкov Anton
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
xdoclet-user mailing list
xdoclet-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xdoclet-user

Reply via email to