On Wed, Jun 24, 2009 at 7:20 PM, Mads Brøgger
Enevoldsen<[email protected]> wrote:
> Hi.
>
> I'm trying to use JDBM for persistence. It is working except that whenever
> you restart the application, the data is overwritten. It seems like a
> "create-drop" setting for it.
>
> The assembler code:
>        module.addServices(JdbmEntityStoreService.class,
> UuidIdentityGeneratorService.class).visibleIn(Visibility.application);
>
> The activation:
>        public void activate() throws Exception
>        {
>            UnitOfWork uow =
> uowf.newUnitOfWork(UsecaseBuilder.newUsecase("Service configuration"));
>            String jdbmPath = new File(config.dataDirectory(),
> "streamflow").getAbsolutePath();
>            uow.newEntity(JdbmConfiguration.class,
> "JdbmEntityStoreService").file().set(jdbmPath);
>            uow.complete();
>        }

What activation code is this? You typically don't create the
Configuration in your own code.

Instead you create a properties file with the same name as the Service
instance's identifiedBy() (defaults to Service class name). The
Configuration subsystem takes care of the rest.

Am I missing something here?

Cheers
-- 
Niclas Hedhman, Software Developer
http://www.qi4j.org - New Energy for Java

I  live here; http://tinyurl.com/2qq9er
I  work here; http://tinyurl.com/2ymelc
I relax here; http://tinyurl.com/2cgsug

_______________________________________________
qi4j-dev mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/qi4j-dev

Reply via email to