HSQLDBãã¡ã¤ã«ã¢ã¼ãã
主ã«ãµã³ãã«ç¨DBã¨ãã¦HSQLDBãfileã¢ã¼ãã§ä½¿ãæã
æ¥ç¶URLã®æ«å°¾ã«;shutdown=trueã¨ä»ããã¨ã
Connectionãcloseãã度ã«ããã¼ã«ã«ãã¡ã¤ã«ã®ããã¯ã解é¤ããã®ã§
è¬ã®ã¨ã©ã¼ã«æ©ã¾ãããã«æ¸ãã§ããã
<component name="xaDataSource" class="org.seasar.extension.dbcp.impl.XADataSourceImpl"> <property name="driverClassName"> "org.hsqldb.jdbcDriver" </property> <property name="URL"> "jdbc:hsqldb:file:" + @org.seasar.framework.util.ResourceUtil@getBuildDir("data").getCanonicalPath() + "/data/demo;shutdown=true" </property> <property name="user">"sa"</property> <property name="password">""</property> </component>
ãããªã¹ã¿ãã¯ãã¬ã¼ã¹ãåºãæã¯ã
ä¸ã®è¨å®ã使ãã¨è¯ãæãã§è§£æ¶ããæ§ã«ãªãã¾ãã
java.sql.SQLException: The database is already in use by another process: org.hsqldb.persist.NIOLockFile@15991d5[file =D:\development\java\runtime-EclipseApplication\aaaa\target\test-classes\data\demo.lck, exists=true, locked=false, valid=false, fl =null]: java.lang.Exception: ããã»ã¹ã¯ãã¡ã¤ã«ã«ã¢ã¯ã»ã¹ã§ãã¾ãããå¥ã®ããã»ã¹ããã¡ã¤ã«ã®ä¸é¨ãããã¯ãã¦ãã¾ãã : D:\development\java\runtime-EclipseApplication\aaaa\target\test-classes\data\demo.lck at org.hsqldb.jdbc.Util.sqlException(Unknown Source) at org.hsqldb.jdbc.jdbcConnection.<init>(Unknown Source) at org.hsqldb.jdbcDriver.getConnection(Unknown Source)