[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openejb-user
Subject:    Re: Inspect database when using embedded OpenEJB
From:       David Blevins <david.blevins () visi ! com>
Date:       2008-11-06 20:42:44
Message-ID: 426DA241-2BD6-40CC-A7DF-79CD0A2D4424 () visi ! com
[Download RAW message or body]


On Oct 29, 2008, at 3:58 AM, Bernhard Humm wrote:

> thanks a lot for your response. I have installed the new release.  
> However, I
> still can't find database values on disk. All JUnit test cases that  
> create
> and retrieve entity beans run fine (OpenEJB is really a great  
> product :-)).
> In my NetBeans project there is a path with HSQL database files:
> C:\temp\NetBeans\LibraryX\tmp\testing\data\hsqldb\hsqldb.*
> However, after running the test cases, the files don't seem to be  
> touched
> (old file date). I can connet to this database from the NetBeans  
> database
> viewer:
> Database URL:
> jdbc:hsqldb:file:/temp/NetBeans/LibraryX/tmp/testing/data/hsqldb/ 
> hsqldb
> Driver	: org.hsqldb.jdbcDriver
> Schema:	PUBLIC
> Product:	HSQL Database Engine
> User:	sa
> Password: ""
> Database product name: 	HSQL Database Engine
> Database product version:	1.8.0
>
> However, there are no current values.
> To my surpise, the database contained tables and values from earlier  
> tests.
> But the values were not updated by current tests. After deleting the  
> tables,
> they were not re-created.

If there were values from older tests that's a good sign.  Figuring  
out why new updates aren't showing up may be a process of  
elimination.  I suspect that the issue may be what I mentioned  
previously that I'm not sure more than one VM (i.e. more than on  
"hsql") can be using the HSQL database files at the same time.   So if  
the Netbeans database viewer is running while the test is running,  
that might be the issue.

One simple test would be to write a test case that uses the  
java.sql.DriverManager and JDBC directly to add and update a table  
(any made up table), then see if you can see it in the NetBeans  
database viewer.

-David

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic