Hi Ajay,

I will fix those bugs listed at (2) on Monday when I am back in the office. I can't do this from home, as I have no SQLServer installed here to test the stuff :(

Please go on with your port anticipating those fixes.

Cheers,

Oliver

Oliver Zeigermann wrote:

Hi Ajay!

Ajay K. Mallik wrote:

Hi Oliver, I have created the oracle schema and I think I got it right, but I am experiencing some issues using StandardRDBMSAdapter-the domain initialization fails and cannot load the servlet. I think the problem lies in some of the sql statements, so I wrote an oracle adapter with the following modifications. In this regard, I have a few outstanding questions:

1.delete statments: I have to modify some of the delete statements as they don't work:
eg,
existing:
"delete LINKS from LINKS l, URI u where l.URI_ID = u.URI_ID and u.URI_STRING = ?"
modified to:
"delete from LINKS lwhere l.URI_ID in(select u.URI_ID from URI u where u.URI_STRING = ?"


Am I doing it right?


Yes.

2. The binding and the statement in the following method does not seem right:
method: public void removeLock(Connection connection, Uri uri, NodeLock lock)


first query:
statement = connection.prepareStatement( "delete LOCKS from LOCKS, URI u where LOCK_ID = u.URI_ID and u.URI_STRING=?");
statement.setString(1, lock.getLockId());


second query:
statement = connection.prepareStatement( "delete URI from URI, LOCKS l where URI_ID = l.LOCK_ID and URI_STRING=?");
statement.setString(1, lock.getLockId());


As an initial disclaimer: All this is in beta state, so I am almost sure there still are errors in it ;)

comments:
first query:Should we bind u.URI_STRING to lock_id?


Right, this seems to be weird. Same thingin renewLock. This *must* be a bug...

I would have expected something like

                        "delete from LOCKS where LOCK_ID = ?");
                statement.setString(1, lock.getLockId());


This would make more sense...

second query: should we delete the uri when we are removing the lock? Not sure.Please confirm.


This is non-sense and must be an error. However there is one thing a notice:

try {
statement =
connection.prepareStatement(
"delete URI from URI, LOCKS l where URI_ID = l.LOCK_ID and URI_STRING=?");
statement.setString(1, lock.getLockId());
} finally {
close(statement);
}


The statement is never executed, that's why there has been no problem...

The only thing that makes me wonder is why all those tests have succeeded?!


3. Adding properties:
In properties table, none of the fields can be null. When I was initializing domain.xml, I found that some of the fields values like property_type were "", and oracle would complain with some message like 'cannot insert null into properties table'. I saw that domain.xml file has <property> tag does not have all the attributes mandatory. for example, in domain.xml, we have
<property namespace="http://jakarta.apache.org/slide/"; name="password"/>


comments: should I make the fields in Properties table nullable?


I think this is an issue with Oracle. As far as I remember, there is no "real" null in Oracle, but only a certain string interpreted as null. Thus making the fields nullable is the right solution!

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]



Reply via email to