216 words

Deadlock in objectdb code

#1
2013-05-22 17:15

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

sjzlondon
sjzlondon's picture
Joined on 2013-04-21
User Post #8
#2
2013-05-23 10:56

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
ObjectDB - Fast Object Database for Java (JPA/JDO)
support
support's picture
Joined on 2010-05-03
User Post #1,550
#3
2013-05-23 11:06

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?

sjzlondon
sjzlondon's picture
Joined on 2013-04-21
User Post #9
#4
2013-05-24 15:49

> 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
ObjectDB - Fast Object Database for Java (JPA/JDO)
support
support's picture
Joined on 2010-05-03
User Post #1,554
#5
2013-05-25 19:26

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

sjzlondon
sjzlondon's picture
Joined on 2013-04-21
User Post #10

Post Reply

Please read carefully the posting instructions - before posting to the ObjectDB website.

  • You may have to disable pop up blocking in order to use the toolbar (e.g. in Chrome).
  • Use ctrl + right click to open the browser context menu in the editing area (e.g. for using a browser spell checker).
  • To insert formatted lines (e.g. Java code, stack trace) - select a style in the toolbar and then insert the text in the new created block.
  • Avoid overflow of published source code examples by breaking long lines.
  • You may mark in paragraph code words (e.g. class names) with the code style (can be applied by ctrl + D).
  • Long stack traces (> 50 lines) and complex source examples (> 100 lines) should be posted as attachments.
Attachments:
Maximum file size: 32 MB
Cancel