We will show how to configure Hyperon Engine using Spring annotated configuration (http://docs.spring.io).
First add Hyperon Runtime dependency to your pom.xml file:
Remember to substitute 1.5.19 above with current version available on Download page. Hyperon Runtime Library will be downloaded by Maven from Maven Central Repo so there is no need to do it manually.
Next add other required libraries for the purpose of this example:
Above libraries set up Spring and allows us to connect to H2 database via pooled data source.
Add required beans to your java class annotated with @Configuration:
Add @PropertySource("classpath:app.properties") to your configuration class so that external properties are resolved.
Create a file called: app.properties with content as follows:
Be sure to properly point hyperon.database.url to your bundle database subdirectory and put the result file in your resource files directory in location specified at @PropertySource above.
If you enable logging, you can see such output after getHyperonEngineFactory().create():