Announcement Announcement Module
Collapse
No announcement yet.
Passing Configuration Object to DB4O File Container Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    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!)

    Comment

    Working...
    X