Subject Re: [firebird-support] multi connection Meta data update
Author Helen Borrie
At 03:28 AM 30/08/2004 -0700, you wrote:
>Hi Helen ,
>
>Thanks for your response.
> Please do find my queries related to the same topic
>inline with your response.
>
>
>We just created two active connection. In one
>connection we created Table "Employer" and then table
>"Labour" with FK to Employer. But it has thrown
>exception as follows ,
>org.firebirdsql.jdbc.FBSQLException: Resource
>Exception. unsuccessful metadata update
>object EMPLOYER4 is in use
>Reason: unsuccessful metadata update
>object EMPLOYER4 is in use

So Employer4 is connected to Employer in some way?

[..snip a whole bunch of Java messages about EMPLOYER4..]


> Remember in other connection we don't fave fetched
>any data.

No, I don't "remember" what the heck you are talking about.

>So there cannot be any object cache in other
>transaction as you said.

I didn't mention anything about "object cache". If you are talking about
the database cache (which is a page cache, not an object cache), it isn't a
problem if there are committed rows from the table there. But trying to
update the metadata of a table whilst there is uncommitted work of any sort
pending on that table, or on its dependents, will fail with "object in use".

>But still there is meta data
>update error when there is multiple connection.

If it seems anomalous to you, ask a suitable question on the firebird-java
list. Perhaps the java driver does something that keeps a hold on objects
and dependents.

> Herewith I have attached testing program which I
>have used for testing this issue. Is meta data cannot
>be updated at all , when there is multiple connection

Can - but should not be. How could you know whether the objects were being
used?

>, what is reason behind this?.
> > No. Keep metadata updates separated from user work
> > and all will be sweet.
>
> I don't get what do you mean by this. Do you mean
>that there cannot be meta data update when there is
>multiple connection. Or it can be achieved? If so how
>we can achieve that?

Tell all the users to commit their work and go to lunch.

./heLen