开发者

Using javasist GWT and DB4O

Is there any open source work done yet on javasist, DB4o and GWT, what I need is you create dynamic objects store them in database and th开发者_JAVA百科en view them on the client side, I am wondering also what is the best reflection ibrary for GWT ?

Thanks


From GWT 2.1, RequestFactory is better counterpart than GWT RPC when you use db4o together. You can define Dao object contains CustomeId object with field Long longPart, List signaturePart. And convert Db4oUUID to CustomeId. Then the RequestFactory + db4o works. I tested it.


I don't know if there's any open source work the GWT and db4o combination.

I just want to tell you a few pitfalls and challenges with that:

  • When you use GWT (or any other web-framework) you run into the issue that objects are reattached from the object container. Then db4o doesn't recognize the objects anymore and cannot simply update an object. Therefore you need to add an ID to objects and do a merge operation yourself. See also here.

  • When you dynamically create objects with Javassist and then store those you need to ensure that db4o also can find the class later on. Therefore you may need to configure the reflector to look for classes in your dynamic-class generation framework. See here.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜