Db4o: same class, different java projects

I have two different Java applications A and B. They must use the same database to manage users (if the user has an account in application A, he also has an account in application B and vice versa).

Both applications A and B have exactly the same user class. But when I create a user in application A, I cannot get the same user in application B and vice versa.

I read in the forum :

db4o is capable of doing this. In different applications, you can use the same database and access data of other persons, "if you provide references" projects. I mean, if you put your entity in a class library and add it as links to projects, they will not be a problem

How could I achieve this?

Thanks in advance for your help.

+5
source share
1 answer

db4o stores the full name of the classes, so if you want to access one database from two (or more) different applications (with different package structures for model classes), you have basically 2 options:

  • Separate your model classes as a separate project used by applications.
  • Set aliases

Hope this helps.

Adriano

+2
source

All Articles