ProjectMoon / ringmud

RingMUD Java Mud Server and Engine
http://ringmud.thermetics.net/
GNU Lesser General Public License v3.0
21 stars 5 forks source link

NRAPI Persistence Ideas #1

Open ProjectMoon opened 14 years ago

ProjectMoon commented 14 years ago

Might need to approach it from a more generic perspective in order for scalable updates. Something like this to update an object:

Transaction tx = Persistence.beginTransaction("doc.xml", obj.getID());
tx.update(obj);
tx.save();
tx.close();

Or perhaps it could look like this to update a whole document that has a bunch of objects: Transaction tx = Persistence.beginTransaction("doc.xml"); tx.update(obj1); tx.update(obj2); tx.update(obj3); tx.delete(obj4); tx.save(); tx.close();

Needs to be very fleshed out, but we shall see how it goes!

ProjectMoon commented 14 years ago

Overall still a good idea (at least transaction support), but this still needs to be fleshed out a lot. The example above will not work anymore, to be sure..