Hi,
I created the test.odb file, read the contents and now trying the delete the odb file using objectd2.x.
I see the folder there are two files created test.odb and test.odb$.
Using the following code to delte the odb files
PersistenceManager pm = (PersistenceManager) getPM(); if (pm.currentTransaction().isActive()) { pm.currentTransaction().rollback(); } if (!pm.isClosed()) { pm.evictAll(); pm.close(); }
After executing the above code, when i am trying to delete the file using the followng code
File[] files = parentDir.listFiles(); for (File temp : files ) { boolean deleted = file.delete(); // getting false value for deleted boolean }
When i am calling pm.close(), should not the test.odb$ file automatically be deleted. Can you please let me know if i need to do any thing more. The same was working with objectdb 1.x jar. I upgraded to object db 2.X and now i am unable to delete the odb files.
Note: i am using the default objectdb.conf file.
Thanks & regards,
Binit Bhaskar