Dear All
I have the following code in a Session bean, which deletes an Entity bean
based on its Primary Key:
int oid = 1386;
StubHome sthome = (StubHome)initialContext.lookup("StubHome");
try{
PrimaryKey pk = new PrimaryKey(oid);
sthome.remove(pk);
}catch(Exception e){
throw new RemoteException(e.toString()+ ":"+
Integer.toString(oid));
}
The program throws an javax.ejb.RemoveException:ObjectNotFound:1386.
However if the code is changed to the following (with the same data in the
database), the database record is found and deleted as intended.
int oid = 1386;
StubHome sthome = (StubHome)initialContext.lookup("StubHome");
try{
PrimaryKey pk = new PrimaryKey(oid);
Stub stub = sthome.findByPrimaryKey(pk);
stub.remove();
}catch(Exception e){
throw new RemoteException(e.toString()+ ":"+
Integer.toString(oid));
}
I am using Jonas 1.6 on NT.
As far as I'm aware, sthome.remove(pk) worked fine with Jonas 1.5.
This looks the same problem as
http://192.44.60.125/messages/JonasUsers/0568.html
Any suggestions?
Regards
Robert Hargreaves.
----
To unsubscribe, send email to [EMAIL PROTECTED] and
include in the body of the message "unsubscribe jonas-users".
For general help, send email to [EMAIL PROTECTED] and
include in the body of the message "help".