Hi,

I just want to add that Hibernate4Gwt uses GWT generator to create
entity proxy, so an explicit GWT.create() call is needed.
But in this case, it looks like return values in are not always
replaced with gwt.rpc files by the generated proxy.

Does anybody knows why ?

Regards
Bruno

On 2 oct, 09:03, mig <[EMAIL PROTECTED]> wrote:
> Hello all,
>      I posted this in the H4GWT forum and have been redirected here,
> as this may be a problem of the GWT compiler. I just paste here parts
> of the original message:
> ---
> "I have a RPC module with all service&async interfaces and entity
> classes. There is also another module, that represents a partial
> functionality of the main application - manager module. Together with
> the main module, that contains the application's entry point, the
> simplyfied inheritence looks like "main inherits manager inherits
> rpc". Within the manager module, there is a class responsible for
> doing some GWT stuff - like explicit initialization of JPA entity
> classes - method explicitJPAInitialization. This method calls
> GWT.create() upon those classes, which are located in the RPC module.
> Now, in the entry point (main module) I call new
> ManagerInit().explicitJPAInitialization(). The code gets compiled and
> works well in the hosted mode, but I get problem when trying to run
> the app in a browser (firefox). After some digging, I found out, that
> rpc.xml files don't get generated right - they're missing the
> Entity_h4gwt15 classes. Missing _h4gwt15 entries cause
> SerializationExceptions later on when using the app via a browser.
> What's more interessting, that not all files have this problem. For
> some services, there are few _h4gwt15 entries, one service contains
> all of them. I noticed, that during the compilation, these files get
> generated allways in the same order. One, that get generated earlier
> don't contain _h4gwt15 entries, that later generated ones contain
> some, and the last service contains all entries.
> In hosted mode, these gwt.rpc files don't get generated all at one
> time. Rather they are added "on demand" later on during working with
> the application. The correctness of the generated files has to do with
> the GWT.create(Entity.class) calls. As soon as I took the content of
> the ManagerInit.explicitJPAInitialization() method and inserted it
> directly to a method in the entry point, all troubles went away.
> As I said, this may not be a problem of H4GWT. It may be the problem
> of the compiler, that isn't able to properly inspect the content of
> the ManagerInit.explicitJPAInitialization() method (same GWT.create()
> calls)."
> ---
> "the call to ManagerInit.explicitJPAInitialisation() isn't limited by
> any condition, nor is there a condition within the method.
> The code (not working version) looks like
>
> (main module)
> public class Site extends DefaultWebSite {
>     ...
>     public void explicitJPAInitialization() {
>         // GWT.create(Person.class);
>         // GWT.create(User.class);
>         // ...
>         // ...
>         new ManagerInit().explicitJPAInitialization();
>     }
>
> }
>
> (manager module)
> public class ManagerInit implements ISubModule {
>     ...
>     public void explicitJPAInitialization() {
>         GWT.create(Person.class);
>         GWT.create(User.class);
>         ...
>         ...
>     }
>
> }
>
> the working version has the comments switched to new
> ManagerInit().explicitJPAInitialization(); while the GWT.create()
> lines are uncommented. The DefaultWebSite extends an AbstractWebSite
> which implements the EntryPoint interface. Anyway, I doubt that this
> could have something to do with this."
> ---
> Can anyone explain me, how the GWT compiler works in this scenario ?
> Thanks.
> Regards Michal
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to