Replaying recorded requests...

#1

Hi, I get the following when ODB starts in embedded mode: Replaying recorded requests... then I get something like 500 lines of recordset information. Here is the relevant part of the config file:

<database>
    <size initial="256kb" resize="256kb" page="2kb" />
    <recovery enabled="true" sync="false" path="." max="128mb" />
    <recording enabled="false" sync="false" path="." mode="write" />
    <processing cache="64mb" max-threads="10" />
    <query-cache results="32mb" programs="500" />
</database>

Questions: 1) Why am I seeing this if I've set recording enabled to false? 2) Is this because I'm somehow not closing a transaction properly, or a PersistenceManager, or a PersistenceManagerFactory? Dave

#2

Couple of additional points:

1. the database directory has many files like this:

mr.odb_nonclosed, mr_1.odb_nonclosed up to mr_10.odb_nonclosed

2. there is a directory mr.odr, with many files ending in .odr

 

So, questions:

a) how can I have recording sets when that is turned off in the config file?

b) should I be worried about so many 'nonclosed' files?

 

Thanks

#3

According to your configuration file - recording is disabled.

  • Maybe you have old recording files that have been generated before you disabled it?
  • Another possibility is that your configuration file is not read - you can check it by putting invalid content in the configuration - if no exception is thrown then your configuration file is not used.

In addition, please verify that you close the database with PersistenceManagerFactory's close (PersistenceManager's close doesn't close the database file).

ObjectDB Support
ObjectDB - Fast Object Database for Java (JPA/JDO)
#4

> Another possibility is that your configuration file is not read - you can check it by putting invalid content in the configuration - if no exception is thrown then your configuration file is not used.

Yep, the conf file is definitely not being read -  I mangled the <objectdb> tag and get the same behavior, with no exceptions so that's one problem. I have been using /WEB-INF/objectdb.conf  - is this the wrong location?

> In addition, please verify that you close the database with PersistenceManagerFactory's close (PersistenceManager's close doesn't close the database file).

I have been closing the PersistenceManagerFactory in the contextDestroyed method of the ContextEventListener class.

Is this wrong? ie: it gets calls when the webapp shuts down. Is that wrong?

#5

Regarding the conf file, I put a copy in the root directory of my web project and now it is being read.

So, I think for now I can live with it in 2 locations:

  • project root for development, and
  • WEB-INF/objectdb.conf for deployment.

The question about closing the PMF remains:

Is it OK to close this only in the contextDestroyed method of a servletContextListener?

 

#6

Chapter 6 of the manual explains where the objectdb.conf configuration file should be located:

  • Usually it should be located in the directory that contains the objectdb.jar file.
  • But if objectdb.jar is located in a lib, bin or build directory then it should be located in the parent directory.

In order to use the same objectdb.conf file for both development and deployment (duplication is not recommended) make sure that you also use the same objectdb.jar in development and deployment, i.e. that in development you use the WEB-INF/lib/objectdb.jar and not another copy.

I think that closing the PMF in contextDestroyed of a servletContextListener should be fine.

ObjectDB Support
ObjectDB - Fast Object Database for Java (JPA/JDO)
#7

I agree that duplication is bad, however, I've got an odd project layout that I have to work with.


Post Reply

To post a reply and/or subscribe to update notifications - please login