|
|
Choosing A Webhost: |
Re: Problem closing statement after xa_end: msg#00249apache.db.derby.devel
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Kathey Marsden wrote: > In Derby the default schema is a schema with the user name. > But until you create a table that schema doesn't actually exist. > > In XA, a BrokeredStatement will try to create a new local connection if > the statement is used outside of an xa connection, even if it is just > to close the statement. This causes a lock timeout trying to get the > default schema if the xa transaction created the first table in the > default (user) schema. > > For example, the following code causes a lock timeout on stmt.close(). > ... > > > conn = xaConnection.getConnection(); > Statement stmt = conn.createStatement(); > xaResource.start(xid,XAResource.TMNOFLAGS); > // creating the first table creates the default > // schema which corresponds to the user > stmt.executeUpdate("create table mytab (i int)"); > xaResource.end(xid,XAResource.TMSUCCESS); > xaResource.prepare(xid); > > //Statement.close() tries to get the realConnection and finds it null so > // tries to create a new one and times out looking for the default > //schema descriptor. stmt.execute() etc. have the same problem > stmt.close(); > > > Is this a bug or expected behaviour? I would say one possible optimization and one bug. optimization) A Statement.close() on a "disconnected" Statement object is not optimised to be a no-op on Statement.close(). I can look into this as I am looking at some consistency issues with closed statements for pooled and XA connections. bug) A connection request that has a default schema that is being created by another transaction will block until that transaction completes (or time out). Probably in this situation the connection request should be succeed as if the schema does not exist. Dan. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFBdy3EIv0S4qsbfuQRArqJAKCE1mV6RqmvKM6aQpPI8nND+FnSAQCgr0P8 pM0e4FFjFvipSAwsOEFpo7E= =TM4R -----END PGP SIGNATURE-----
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: Resend: [WEB] Derby Mentors, please 'svn update' to make web changes visible, Rodent of Unusual Size |
|---|---|
| Next by Date: | Re: Problem closing statement after xa_end, Kathey Marsden |
| Previous by Thread: | Problem closing statement after xa_end, Kathey Marsden |
| Next by Thread: | Re: Problem closing statement after xa_end, Kathey Marsden |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
Free MagazinesCisco NewsReceive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business. subscribe Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field. subscribe The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business. subscribe Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company. subscribe Total Telecom Total Telecom is "The Economist of the communications industry". subscribe |