I see, maybe we should just catch the IOException thrown by is.close() and silently ignore it?
Why the transaction is not rolled back completely, I do not know. Maybe the exception gets eaten up somewhere and does not come through.
Are you using the BindingStore? There might be an issue with it in
public void storeRevisionContent
(Uri uri, NodeRevisionDescriptor revisionDescriptor,
NodeRevisionContent revisionContent)
throws ServiceAccessException, RevisionNotFoundException {
if (uri instanceof ResourceId) {
super.storeRevisionContent(uri, revisionDescriptor, revisionContent);
}
else {
try {
ResourceId resourceId = obtainResourceId(uri);
resourceId.getStore().storeRevisionContent(resourceId, revisionDescriptor, revisionContent);
}
catch (ObjectNotFoundException e) {
// TODO: throw RevisionNotFoundException???
throw new ServiceAccessException(this, e);
}
}
}
Not delisting the store with failure...
Oliver
Ritu Kedia wrote:
Hi Oliver,
I figured the problem: Basically the "put" content was not going through fine. It failed in the
last step of store content. Therefore even though the Content was put in
Version_Content table, the Properties were never populated.
Slide Source: 2.0b1 source distribution
File: StandardRDBMSAdapter.java
method: storeContent
code snippet causing the problem: finally {
if (is != null) {
**is.close();**
}
}
cause of the above: statement.setBinaryStream(1, is, (int) contentLength);
closes the InputStream "is".
I am using MySQL Connector 3.0.10
This MySQL connector closes the InputStream on setBinaryStream: http://www.mysql.com/documentation/connector-j/ --> <Implementation Notes under Known Issues>
I have fixed the problem locally by commenting the "is.close()". Everything
goes fine after the fix. Should I enter a bug for this?
And this bug raises an important question about transaction management. The
"put" content should have been completely rollbacked.
Regards, Ritu
-----Original Message----- From: Oliver Zeigermann [mailto:[EMAIL PROTECTED] Sent: Thursday, February 26, 2004 9:47 PM To: Slide Users Mailing List Subject: Re: File Get is not working (J2EE Store -- JBoss with MySQL)
Ritu Kedia wrote:
Slide Dev Team>> Has "Get" been tested with MySQL store on any other App
server?
I have just done a create, put, get sequence and it worked just fine. No idea what your problem might be, sorry...
Oliver
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
.
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
