db4o Developer Community

db4o open source object database, native to Java and .NET
Welcome to db4o Developer Community Sign in | Join

Re: OSGi, GenericObject, ClassCast errors and the TRANSLOADER

  •  03-05-2008, 11:10 AM

    Re: OSGi, GenericObject, ClassCast errors and the TRANSLOADER

    I'm not sure which OSGi framework you are using. If you are running on Eclipse Equinox then you can make use of an Eclipse specific extension called "buddy classloading". However, this limits your ability to run your bundles on other OSGi frameworks.

    Basically, you would create a DB4O bundle and add the following to it's bundle manifest:

    Eclipse-BuddyPolicy: registered

    In all your bundles which depends on the DB4O bundle to save and load objects you would ad the following to the manifests:

    Eclipse-RegisterBuddy: com.db4o

    Note, "com.db4o" is the bundle symbolic name of the DB4O bundle you created.

    For more details about buddy classloading please checkout:

    • http://help.eclipse.org/help33/index.jsp?topic=/org.eclipse.platform.doc.isv/reference/misc/buddy_loading.html
    • http://wiki.eclipse.org/Context_Class_Loader_Enhancements#Buddy_Class_Loading


    --
    Gunnar Wagenknecht
    gunnar@wagenknecht.org
    http://wagenknecht.org/
    Filed under: , , ,
View Complete Thread