Using HSQL in-memory database as JPA datasource

后端 未结 1 1394
心在旅途
心在旅途 2021-01-01 13:31

I have an in-memory data source:

java.sql.Connection c = DriverManager.getConnection(\"jdbc:hsqldb:mem:testdb\", \"sa\", \"\");            
emf = Persistence         


        
1条回答
  •  一生所求
    2021-01-01 14:04

    /*What to enter here?*/

    Well, nothing. In a Java SE environment, you'll have to use the built-in connection pool from your JPA provider and the setup looks like this:

    
      
        org.hibernate.ejb.HibernatePersistence
        com.acme.Foo
        ...
        
          
          
          
          
          
          
        
      
    
    

    0 讨论(0)
提交回复
热议问题