[
http://jira.jboss.com/jira/browse/JBCACHE-1028?page=all ]
Mircea Markus resolved JBCACHE-1028.
------------------------------------
Resolution: Done
Couldn't reproduce the issue.
There is an unit test in place relying on the EmbeddedXADataSource for obtaining the
database connection; it works fine.
Possible explanation of the problem:
- even when using derby in embedded mode, the database is created and stored on the file
system. "Embedded " refers to the fact that the engine runs in the same JVM, but
managed data is still persisted. So if the application runs for the first time, the
database will be created, and so is the jboss cache table. All subsequent times when the
application runs the 'tableExist()' correctly returns true - that's because
the in-process engine works with the same database files. The place where those DB files
are created is specified by derby.system.home sys property. If missing then default is the
running dir.
getTables() length > 1 on Derby even when cache table DNE
---------------------------------------------------------
Key: JBCACHE-1028
URL:
http://jira.jboss.com/jira/browse/JBCACHE-1028
Project: JBoss Cache
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: Cache loaders
Affects Versions: 2.0.0.BETA2
Environment: Derby 10.2, Managed transactions
Reporter: Bill Middleton
Assigned To: Mircea Markus
Fix For: 2.0.0.CR2
The EmbeddedXADataSource which is provided by Apache derby 10.2 always returns a
resultset which has length > 1 when calling getTables(), even if the table in question
does not exist. This causes the return value from AdjListJDBCCacheLoader.tableExists() to
always be true, and the jbosscache table is never created.
I'm not sure, but perhaps there's a better way to conclude that a table does not
exist in the result set other than than its length.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira