I am experiencing what I think is a bug in Jonas. When I try to remove an
entity bean, the
bean is removed from the database, but Jonas still thinks the bean exists.
Below is
what I found on the mailing lists about this same problem. Has anyone
experienced this?
Has anyone solved this problem?
Here is same sample code that demonstrates this problem.
When this code is executed, the message "Found the comments just deleted!"
is printed. In
other parts of the code (not shown) Jonas tries to load deleted beans and
throws an
Exception:
java.rmi.RemoteException: Failed to load bean from database.
This is a small example to show what I'm experiencing on other parts of my
code.
--------------------------------------------
// Check Comments to delete.
// Check for a temporary Comments Bean.
try {
CommentsEBPK commentsEBPK =
new CommentsEBPK("TP", this.planMonthNo,
this.PPN);
CommentsEB commentsEB = (CommentsEB)
this.commentsEBHome.findByPrimaryKey(commentsEBPK);
try {
this.commentsEB = null;
this.commentsEBHome.remove(commentsEBPK);
System.out.println("Removed temp comments");
try {
System.out.println("Trying to find
the comments just removed");
commentsEB = (CommentsEB)
this.commentsEBHome.findByPrimaryKey(commentsEBPK);
System.out.println("Found the
comments just deleted!");
} catch (ObjectNotFoundException onfe) {
System.out.println("comments not
found");
} catch (Exception e) {
System.out.println("Other exception
caught");
}
} catch (Exception e) {
throw new Exception ("\nException while
trying to remove " +
"CommentsEB in ParametersSBean::" +
"saveFinal: " + e);
}
} catch (ObjectNotFoundException onfe) {
// Do nothing. No bean found, so no bean removed.
// comments.
} catch (Exception e) {
throw new CreateException ("\nException while
looking up temp" +
"comments in the " +
"Comments Table in " +
"ParametersSBBean::saveFinal: " +
e);
}
Here is what I previously found in the mailing lists.
Re: bug in remove
To: Robert Krueger <[EMAIL PROTECTED]>
Subject: Re: bug in remove
From: Helene JOANIN <[EMAIL PROTECTED]>
Date: Fri, 17 Sep 1999 15:46:21 +0200
Cc: "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]>, HELENE JOANIN <[EMAIL PROTECTED]>
Organization: Bull/BullSoftware
References: <[EMAIL PROTECTED]>
Sender: [EMAIL PROTECTED]
Robert Krueger wrote:
>
> Hi,
>
> following problem:
>
> one client has a reference to a CMP entity bean and
calls remove on it.
> the data is removed from the database (i checked).
later another client
> calls a findbyprimarykey with the primary key of the
removed object and
> finds the instance. it seems that the instance is
still in memory.
>
> anyone else seen that?
>
> robert
Hello Robert,
We have re-done some tests to try to reproduce this bug,
and we didn't found any problem.
Could you, please, give us more details ?
Are you doing transactions, ...?
Regards.
H�l�ne.
--
-=- H�l�ne JOANIN
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
mailto:[EMAIL PROTECTED] Org: Bull S.A.
Phone: (33) 04.76.29.73.53 Fax: (33)
04.76.29.76.00
Download our EJB Server at
http://www.bullsoft.com/ejb
_______________________________________________________________
Please advise as to handle this situation.
Thank you.
--
Duggan Dieterly Phone: (970) 898-7906
Software Design Engr. Fax: (970) 898-6376
Hewlett-Packard Co.
----
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".