cayenne-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrus Adamchik <>
Subject Re: Cayenne under OSGi
Date Sun, 24 Nov 2013 16:15:44 GMT
So this is done. Cristiano, appreciate if you could try it in your environment. An example
of how to use Cayenne with OSGi is available on GitHub [1]. Here is how you bootstrap it in
your own module:

  Module osgiModule = OsgiModuleBuilder.forProject(Activator.class).withDriver(Driver.class).module();
  return new ServerRuntime("cayenne-osgi-example.xml", osgiModule);

As you see, no need to enumerate your classes. Also I suspect instead of binding the driver,
in a real OSGi environment Cayenne stack will need to refer to some OSGi service that encapsulates
the DataSource. We can provide integrations for that too. And don’t forget to stop it when
you your bundle is stopped, as you don’t want to keep Cayenne threads and other resources
hanging around, eventually killing your container:



View raw message