Deadlock in objectdb code

#1

Running multi-threaded access to an embedded database using JDO, I'm getting a deadlock in objectdb code.  Thread dump attached.

#2

Thank you for this report. The thread dump indicates a possible deadlock during initialization of new persistent schema. Could you please confirm that your application may have registered new persistent types when it happened?

ObjectDB Support
#3

Yes, that could have happened - some of the persistent types may be being introduced at that point in the code.  

Is there a convenient way to introduce classes to objectdb at the start of a run, so they aren't first encountered later?  Also, is there a logging option to follow schema changes during a run?

#4

> Is there a convenient way to introduce classes to objectdb at the start of a run, so they aren't first encountered later?

You can introduce a class by:

    emf.getMetamodel().entity(MyClass.class);

You can also introduce all classes by:

    emf.getMetamodel().getManagedTypes();

but this will work only when ObjectDB can find managed classes automatically.

> Also, is there a logging option to follow schema changes during a run?

Basic type registration was added now in build 2.5.0_06.

To see registered types add to the configuration file:

<logger name="type.registry" level="info" />

or, use the "debug" level to get more information on the registered type.

ObjectDB Support
#5

Thank you for your fast and effective response to my issue - the new logging option should help solve things.

Reply