hsqldb

Hibernate on hypersonic in production?

孤街浪徒 提交于 2019-12-11 02:01:44
问题 Developers of hypersonic promise increase of performance? But I'm afraid problems with administrating and other aspects of using hsqlDB. Are anybody using this in production? Is it good idea? 回答1: Many companies are using HSQL in production. Among those not on the list, a certain well-known (though not necessarily well liked) company that makes an antivirus product (whose name rhymes with "Horton") is using HSQL-based software for their update server management. I know because I wrote it :-)

Why is trigger not fired on every single row when using “insert select” or “merge”

戏子无情 提交于 2019-12-11 01:09:48
问题 I defined a BEFORE INSERT trigger for a table and it works as expected for single INSERT statements, but not for INSERT ... SELECT nor MERGE statements. These are my database objects (simplified): CREATE TABLE "COMPANY" ( "ID" NUMBER NOT NULL, "NAME" VARCHAR(100) ); CREATE TABLE "EMPLOYEE" ( "ID" NUMBER NOT NULL, "COMPANY_ID" NUMBER NOT NULL ); CREATE UNIQUE INDEX "EMPLOYEE_PK" ON "EMPLOYEE" ("ID"); CREATE SEQUENCE "EMPLOYEE_SEQUENCE"; CREATE TRIGGER "BI_EMPLOYEE" BEFORE INSERT ON "EMPLOYEE"

HSQLDB Trigger Statement ERROR when using SimpleJdbcTestUtils.executeSqlScript()

夙愿已清 提交于 2019-12-11 00:06:25
问题 I'm currently trying to load a sql script to create a HSQL database. This is done by using the following code: Resource resource = new ClassPathResource("/create-table.sql"); SimpleJdbcTestUtils.executeSqlScript(template, resource, Boolean.FALSE); The script contains the create statement of a trigger: CREATE TRIGGER t BEFORE UPDATE ON SUBJECTS REFERENCING NEW AS newrow OLD AS oldrow FOR EACH ROW BEGIN ATOMIC SET newrow.VERSION = oldrow.VERSION + 1; END; When running the tests using this code,

Clear the in memory database after every testcase

二次信任 提交于 2019-12-10 21:57:11
问题 I am using hsqldb for testing some of the data access layer in Java. I have certain test cases like 100 around. I create a in memory database and then insert some values in the table so that with my test case i can load it, but the problem is for every test case i need to clear the in memory database, only the values not the tables. Is it possible, one thing is i need to manually delete the rows from the table and is there some thing else I can use. Thanks 回答1: If you use DbUnit in unit-tests

HSQLDB / Spring unit tests not rolling back

橙三吉。 提交于 2019-12-10 18:04:30
问题 I am using Spring's embedded-database (default DB is HSQLDB) for running some unit tests. I have the following in my context: <bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManger"> <property name="dataSource" ref="dataSource"/> </bean> <jdbc:embedded-database id="dataSource"> <jdbc:script location="blah"/> </jdbc:embedded-database> The unit test is as such: @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration("classpath

configure hibernate with embedded tomcat 7 programmatically

ぃ、小莉子 提交于 2019-12-10 16:38:31
问题 I am trying to configure a embedded tomcat instance in my app without any configuration files. I have done some research and based upon this long tutorial and a shorter one i extracted this steps: Create a ServletContextListener @WebListener //some articles on the web mentioned, that this would add the //Listener automatically to the app context, but i cant believe that this works in my case public class HibernateListener implements ServletContextListener { public void contextInitialized

How can I resolve this SQLTransactionRollbackException with Hsqldb in Spring Batch?

旧巷老猫 提交于 2019-12-10 14:34:54
问题 I'm working on a Spring Batch application that needs to execute jobs periodically. Here's a fragment of my configuration file that sets up the in-memory (hsqldb) database used for transaction handling. @Bean public SimpleJobLauncher simpleJobLauncher() { SimpleJobLauncher jl = new SimpleJobLauncher(); try { jl.setJobRepository(jobRepository()); } catch (Exception e) { System.err.println("Failed to create job repository"); } return jl; } @Bean public JobRepositoryFactoryBean

hsqldb ignores first insert operation on table at server (server needs to be “warmed up”?)

安稳与你 提交于 2019-12-10 12:04:37
问题 We're having a very curious problem with hsqldb. We are running some tests which works perfectly well on MySQL, but we have recently switched to hsqldb for our unit tests. In doing so, we noticed that some of our tests started to fail. One of the tests inserts three records A, B and C, and attempts to retrieve the first two, A and B. However, only B is returned the first time we run the test on a freshly configured (empty) database. However, if we repeat the test on the same database, both A'

Using HSQLDB with the SQL Maven Plugin and jOOQ

帅比萌擦擦* 提交于 2019-12-10 11:58:28
问题 This is a similar question like Using embedded database with Flyway and jOOQ in Maven for continuous integration, although not exactly the same as we're using the sql-maven-plugin , not Flyway. The following Maven plugin configuration fails: sql-maven-plugin <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>sql-maven-plugin</artifactId> <version>1.5</version> <executions> <execution> <id>create-database</id> <phase>generate-sources</phase> <goals> <goal>execute</goal> </goals>