Is it possible to use a persistent class (i.e., a class derived from Entity) without a Session? I have servers that retrieve objects from databases. The servers XML serialize these objects, then send them in messages to clients, which deserialize them. The clients have no direct access to the database. It appears that the clients need a Session to instantiate a persistent object, which in turn requires a Domain, which requires access to the database. How can I get around this problem? |
Hi TimB. No, it's impossible. All Persistent objects are session bound object, including Entities. I thing you can convert DO entities to DTO objects and serialize these objects, and then deserialize them on client side. |
Is it possible to have a Session that isn't bound to a database? Or maybe it's a Domain that isn't bound to a database? If I have to maintain parallel DTO classes just so I can serialize objects, that makes DO a much less attractive option.
Sorry, but there is no way to create session or domain, which not bound to database.