Results 1 to 2 of 2

Thread: Passing Configuration Object to DB4O File Container

  1. #1

    Default Passing Configuration Object to DB4O File Container

    Hi,

    I am trying to configure a file-based DB4O container like:


    <bean id="fileContainer" class="org.springextensions.db4o.ObjectContainerFa ctoryBean">
    <property name="databaseFile" value="file:d:/temp/actionPlanDB.db4o" />
    </bean>

    This works fine, but I want to pass it a configuration object. If I do the following, I get an exception:


    <bean id="fileContainer" class="org.springextensions.db4o.ObjectContainerFa ctoryBean">
    <property name="databaseFile" value="file:d:/temp/actionPlanDB.db4o" />
    <property name="embeddedConfiguration" ref="configurationObject"/>
    </bean>

    <bean id="configurationObject" class="org.springextensions.db4o.ConfigurationFact oryBean">
    <property name="messageLevel" value="2" />
    <property name="activationDepth" value="3" />
    <!-- possible values are NEW, CLONED and GLOBAL -->
    <property name="configurationCreationMode" value="NEW" />
    </bean>


    This fails regardless if I use clientConfiguration or embeddedConfiguration as the property in the container.

    In the instructions it hints that this is possible, but I can't figure it out. Can you please provide an example or additional information on how to configure a file-based DB4O DB in Spring? What if I want to configure cascading or indexes on a specific class? Can that be done through Spring or is it just best to do all of this in Java?

    Thanks,
    Tom

  2. #2
    Join Date
    Aug 2010
    Posts
    14

    Default

    you are using the deprecated configuration system, you may want to try the new one:
    https://src.springframework.org/svn/...-3.0-db4o-8.0/ (work in progress, be careful!)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •