Correct, not on the client side anyway. GWT does not emulate javax.persistence.*, importing that package on the client side would cause errors when compiling. However you COULD use EJB3, if you keep the mappings in a separate file. But´s that´s not very flexible.
I use EJB3 myself on the server side, and then use Dozer to convert the EJBs to POJOs before sending them to the client. Once the objects is sent back, you convert it back to an EJB, Works like a charm so far. On 2 Sep, 13:26, Tolga Özdemir <[email protected]> wrote: > oh..it does mean we cannot use ejb3 yet.. right? > > > > > > On Wed, Sep 2, 2009 at 2:13 PM, David Given <[email protected]> wrote: > > > tolga ozdemir wrote: > > [...] > > > Can you enlighten me wheather we could use javax.persistence.* in our > > > serialized DTO objects for the sake of RPC?? > > > > can I use @Table, @Id or other annotations? > > > The GWT runtime ignores annotations --- they're not kept at runtime on > > the client. So you can pass annotated objects perfectly happily over the > > link and they'll work fine. > > > I've had good experiences using Berkeley DB JE and GWT. It's possible to > > query an object on the server, have Berkeley DB instantiate it for me, > > and then just return it directly to the client for display. So I'd > > imagine you could use something similar with javax.persistence. > > > The only thing you probably need to be concerned with is that if you > > instantiate an object on the server, pass it to the client, then pass it > > back to the server, you're getting a different physical object than the > > one you originally instantiated so the persistence layer might get its > > cacheing confused. (Berkeley DB doesn't seem to be bothered by this.) > > > -- > > ┌─── dg@cowlark.com ─────http://www.cowlark.com───── > > │ > > │ "They laughed at Newton. They laughed at Einstein. Of course, they > > │ also laughed at Bozo the Clown." --- Carl Sagan > > -- > Tolga Özdemir > > Mobile 0 536 963 7890 > MSN [email protected] Dölj citerad text - > > - Visa citerad text - --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en -~----------~----~----~----~------~----~------~--~---
