db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Knut Anders Hatlen <Knut.Hat...@Sun.COM>
Subject Re: Derby in-memory back end - where to go next?
Date Fri, 11 Sep 2009 10:06:37 GMT
GregB <gregburrow@gmail.com> writes:

> Kristian,
>
> Quick question on the in-memory DB.  How do you specify the database should
> be in-memory for an instance of a EmbeddedConnectionPoolDataSource?
>
> Example url - jdbc:derby:memory:testdb;create=true
>
> Connection pool -
> EmbeddedConnectionPoolDataSource ds = new
> EmbeddedConnectionPoolDataSource();
> ds.setDatabaseName("testdb");
> ds.setCreateDatabase("create");
> // Now what to specify in-memory?

I haven't tested it, but I think ds.setDatabaseName("memory:testdb")
should do the trick.

-- 
Knut Anders

Mime
View raw message