Re: Add external java project to GWT project in Eclipse

2009-07-29 Thread martinhansen

Hello Brandon,

I used the "link source" function in eclipse. I added all the projects
this way. What exactly is your problem? Do you get any error message?
What did you do to add the projects?


On 29 Jul., 06:34, branflake2267  wrote:
> Hi Martin,
>
> On including more than one project source into your gwt project, can
> you tell me what you did to get two projects to work together in GWT.
> I have been trying over and over to combine two projects up for some
> time, and have not been able to do it.
>
> Thanks,
> Brandon
>
> On Jul 21, 3:16 am, martinhansen 
> wrote:
>
> > Hello Jason,
>
> > that did the trick! Thank you very much, it works fine now. Great!
>
> > On 20 Jul., 23:43, Jason Parekh  wrote:
>
> > > Hi Martin,
> > > For the "Linked folder location," ensure you have the trailing "src"
> > > included.
>
> > > jason
>
> > > On Mon, Jul 20, 2009 at 4:35 PM, martinhansen <
>
> > > martin.hanse...@googlemail.com> wrote:
>
> > > > Now I tried the "link source" function without Google App Engine. At
> > > > first, it seems to work, and the project is added to my main project.
> > > > The only problem is: The package declarations produce errors. Eclipse
> > > > shows an error message:
>
> > > > The declared package "com.company.data" does not match the expected
> > > > package "src.com.company.data"
>
> > > > What to do?
>
> > > > On 20 Jul., 22:29, martinhansen 
> > > > wrote:
> > > > > Hello Donald,
>
> > > > > I already tried the Google App Engine approach, but it didn't work for
> > > > > me. And GAE adds a lot of stuff I don't need to my project. I really
> > > > > don't want to mess around with it, since I managed to kill my GWT
> > > > > app's configuration several times and I had to create a new project.
>
> > > > > Meanwhile, I tried the "output folder" approach. I tried to change the
> > > > > default output folder of "DataProject", but I
> > > > > didn't manage successfully. Eclipse says: Path '/GwtApp/src' must
> > > > > denote location inside project 'DataProject'. Am I heading the wrong
> > > > > way there?
>
> > > > > On 20 Jul., 22:21, "Donald W. Long"  wrote:
>
> > > > > > I looked at the linked source method and you have to have the linked
> > > > > > source fully qualified.  Thats nice if you always have your source 
> > > > > > in
> > > > > > the same place.  You could try using the linked variables but then
> > > > > > thats also work.  Do not see this as a real option forprojectsthat
> > > > > > will be worked on by many developers at the same time.
>
> > > > > > If I am wrong please let me know.
>
> > > > > > Thanks
>
> > > > > > Donald W. Long (donald.w.l...@thelongsfamily.com)
>
> > > > > > On Jul 20, 1:34 pm, Jason Parekh  wrote:
>
> > > > > > > Hi Martin,
> > > > > > > You may try using the link source option, as suggested by the 
> > > > > > > thread
> > > > athttp://groups.google.com/group/google-appengine-java/browse_thread/th..
> > > > ..
> > > > > > >  If that doesn't work, you could set the output directory of your
> > > > > > > dependencies to be the GWT output folder.
>
> > > > > > > jason
>
> > > > > > > On Mon, Jul 20, 2009 at 12:14 PM, martinhansen <
>
> > > > > > > martin.hanse...@googlemail.com> wrote:
>
> > > > > > > > Hello Sean,
>
> > > > > > > > thank you very much. I've thought of that solution too, but it 
> > > > > > > > is
> > > > not
> > > > > > > > appropriate for my GWT project. I have to add 4 externalprojects
> > > > to
> > > > > > > > my GWT project, and all of these 4projectsare subject to change
> > > > > > > > every day. It would be too much work to export them to a jar 
> > > > > > > > file
> > > > > > > > every day. Is there some way to automatically add the external
> > > > project
> > > > > > > > sources to the GWT out

Re: Pre-Compress GWT compiler output for web server

2009-07-22 Thread martinhansen

I've found an interesting tool for Java EE applications and Tomcat
server:

:-) http://www.xucia.com/#Resource%20Accelerate :-)

ResourceAccelerate... it can cache the gzip output of tomcat and
thereby reduces the need to re-compress files for every request.
Great!

What do you think of it?

On 22 Jul., 13:06, martinhansen 
wrote:
> Hello,
>
> I am evaluating some approaches to reduce the amount of data being
> transmitted to the client browser. I am using the Apache Tomcat web
> server. I successfully managed to enable GZIP output for the Tomcat
> server by editing the server config file. It works fine. However, this
> way the data is compressed on-the-fly by the web server for every
> request which considerably increases server CPU load. Is this
> assumption correct?
>
> Is there a way to pre-compress the contents of my GWT app and have
> this pre-compressed content delivered by the web server?
--~--~-~--~~~---~--~~
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 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Pre-Compress GWT compiler output for web server

2009-07-22 Thread martinhansen

Hello,

I am evaluating some approaches to reduce the amount of data being
transmitted to the client browser. I am using the Apache Tomcat web
server. I successfully managed to enable GZIP output for the Tomcat
server by editing the server config file. It works fine. However, this
way the data is compressed on-the-fly by the web server for every
request which considerably increases server CPU load. Is this
assumption correct?

Is there a way to pre-compress the contents of my GWT app and have
this pre-compressed content delivered by the web server?
--~--~-~--~~~---~--~~
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 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Client source, what's included, what's not

2009-07-21 Thread martinhansen

hello,

it's all about the source directive in the gwt app XML file. GWT
compiles source code to JS when the source directive point to it. if
you specify no source directive, GWT will compile the 'client' package
to JS.

example:




these two packages and all their subpackages will be compiled to JS.



On 21 Jul., 14:47, Kwhit  wrote:
> How does the compiler/deployer know what source code is to be
> xcompiled into JS for and shipped to the browser and what not in
> Ecipse?
>
> More specifically I would like
>
>  src/com..myproj.client    to be included
>
> but...
>
>  srctest/com..myproj.client
>
> not.
>
> Is there a way of doing that?
> Not a big problem if not but it keeps my project structure clean if
> there is a way.
>
> Thanks
--~--~-~--~~~---~--~~
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 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Serializable objects

2009-07-21 Thread martinhansen

maybe you need to add a sorce path directive to your application xml
file which points to your package



On 21 Jul., 15:12, Kinjal Khandhar 
wrote:
>  Hello All,
>
> I am building an application that has an interface which implements
> java.io.serializable.I want to transfer the data back and forth between
> client and server.
>
> The problem is that interface is not in my current GWT package(client and
> server).Its in diff package.Hence it gives me compiler error saying check
> the inheritance chain.
>
> Is it that I need to have that interface in my gwt package or may be there
> is a need to define the path of that package somewhere.
>
> Please help me if anyone is aware of the problem.
>
> -Kinjal.
--~--~-~--~~~---~--~~
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 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Add external java project to GWT project in Eclipse

2009-07-21 Thread martinhansen

Hello Jason,

that did the trick! Thank you very much, it works fine now. Great!


On 20 Jul., 23:43, Jason Parekh  wrote:
> Hi Martin,
> For the "Linked folder location," ensure you have the trailing "src"
> included.
>
> jason
>
> On Mon, Jul 20, 2009 at 4:35 PM, martinhansen <
>
> martin.hanse...@googlemail.com> wrote:
>
> > Now I tried the "link source" function without Google App Engine. At
> > first, it seems to work, and the project is added to my main project.
> > The only problem is: The package declarations produce errors. Eclipse
> > shows an error message:
>
> > The declared package "com.company.data" does not match the expected
> > package "src.com.company.data"
>
> > What to do?
>
> > On 20 Jul., 22:29, martinhansen 
> > wrote:
> > > Hello Donald,
>
> > > I already tried the Google App Engine approach, but it didn't work for
> > > me. And GAE adds a lot of stuff I don't need to my project. I really
> > > don't want to mess around with it, since I managed to kill my GWT
> > > app's configuration several times and I had to create a new project.
>
> > > Meanwhile, I tried the "output folder" approach. I tried to change the
> > > default output folder of "DataProject", but I
> > > didn't manage successfully. Eclipse says: Path '/GwtApp/src' must
> > > denote location inside project 'DataProject'. Am I heading the wrong
> > > way there?
>
> > > On 20 Jul., 22:21, "Donald W. Long"  wrote:
>
> > > > I looked at the linked source method and you have to have the linked
> > > > source fully qualified.  Thats nice if you always have your source in
> > > > the same place.  You could try using the linked variables but then
> > > > thats also work.  Do not see this as a real option for projects that
> > > > will be worked on by many developers at the same time.
>
> > > > If I am wrong please let me know.
>
> > > > Thanks
>
> > > > Donald W. Long (donald.w.l...@thelongsfamily.com)
>
> > > > On Jul 20, 1:34 pm, Jason Parekh  wrote:
>
> > > > > Hi Martin,
> > > > > You may try using the link source option, as suggested by the thread
> > athttp://groups.google.com/group/google-appengine-java/browse_thread/th..
> > ..
> > > > >  If that doesn't work, you could set the output directory of your
> > > > > dependencies to be the GWT output folder.
>
> > > > > jason
>
> > > > > On Mon, Jul 20, 2009 at 12:14 PM, martinhansen <
>
> > > > > martin.hanse...@googlemail.com> wrote:
>
> > > > > > Hello Sean,
>
> > > > > > thank you very much. I've thought of that solution too, but it is
> > not
> > > > > > appropriate for my GWT project. I have to add 4 external projects
> > to
> > > > > > my GWT project, and all of these 4 projects are subject to change
> > > > > > every day. It would be too much work to export them to a jar file
> > > > > > every day. Is there some way to automatically add the external
> > project
> > > > > > sources to the GWT output folder?
>
> > > > > > On 20 Jul., 18:03, Sean  wrote:
> > > > > > > You can export the non-GWT java files into a jar and drop those
> > in the
> > > > > > > WEB-INF/lib folder. That's what I do.
>
> > > > > > > On Jul 20, 11:44 am, martinhansen <
> > martin.hanse...@googlemail.com>
> > > > > > > wrote:
>
> > > > > > > > Hello,
>
> > > > > > > > my GWT server-side code needs an external java project. I have
> > added
> > > > > > > > the project under "Configure build path / Projects". It works
> > fine in
> > > > > > > > hosted mode. But when I deploy my application on a server, I
> > get lots
> > > > > > > > of ClassNotFoundExceptions. Obviously, GWT cannot find the
> > external
> > > > > > > > java code. When I look at the war\WEB-INF\classes folder, I see
> > that
> > > > > > > > the external java classes have not been included.
>
> > > > > > > > How can I get GWT to include the external classes?- Hide quoted
> > text -
>
> > > > > - Show quoted 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 Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: GWT Toolkit Problem

2009-07-21 Thread martinhansen

Does your ServiceImpl class extend RemoteServiceServlet?

On 20 Jul., 22:01, JonJ27  wrote:
> Hi all.. i hope you can help me. I am new to GWT. I am using RAD 7.5.
>
> I have ran through the StockWatcher tutorial and succesfully got the
> app working and even got the Client Server communication using 2
> seperate machines using RPC using a Proxy.
>
> I also managed to import the created project into a "Dynamic Web
> Project" created by RAD. This also would run on WebSphere Test Env and
> Hosted mode.
>
> However, i have now come across an issue where the app wont recognise
> the Service class specifed in the web.xml as a servlet. .
>
> I have even gone back to basics and created a new GWT application from
> scratch and followed through the StockWatcher tutorial again but i
> keep getting the same error which i have posted below.
>
> I have ran the updates for the GWT. I believe the version i am on is
> 1.7.
>
> Thanks in advance for your help.
>
> 20-Jul-2009 19:42:32 com.google.apphosting.utils.jetty.JettyLogger
> warn
> WARNING: failed stockPriceServiceImpl
> Throwable occurred: javax.servlet.UnavailableException: Servlet class
> com.google.gwt.sample.stockwatcher.server.StockPriceServiceImpl is not
> a javax.servlet.Servlet
>         at org.mortbay.jetty.servlet.ServletHolder.checkServletType
> (ServletHolder.java:377)
>         at org.mortbay.jetty.servlet.ServletHolder.doStart(ServletHolder.java:
> 234)
>         at org.mortbay.component.AbstractLifeCycle.start
> (AbstractLifeCycle.java:40)
>         at org.mortbay.jetty.servlet.ServletHandler.initialize
> (ServletHandler.java:612)
>         at org.mortbay.jetty.servlet.Context.startContext(Context.java:139)
>         at org.mortbay.jetty.webapp.WebAppContext.startContext
> (WebAppContext.java:1218)
>         at org.mortbay.jetty.handler.ContextHandler.doStart
> (ContextHandler.java:500)
>         at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:
> 448)
>         at org.mortbay.component.AbstractLifeCycle.start
> (AbstractLifeCycle.java:40)
>         at org.mortbay.jetty.handler.HandlerWrapper.doStart
> (HandlerWrapper.java:117)
>         at org.mortbay.component.AbstractLifeCycle.start
> (AbstractLifeCycle.java:40)
>         at org.mortbay.jetty.handler.HandlerWrapper.doStart
> (HandlerWrapper.java:117)
>         at org.mortbay.jetty.Server.doStart(Server.java:217)
>         at org.mortbay.component.AbstractLifeCycle.start
> (AbstractLifeCycle.java:40)
>         at
> com.google.appengine.tools.development.JettyContainerService.startContainer
> (JettyContainerService.java:147)
>         at
> com.google.appengine.tools.development.AbstractContainerService.startup
> (AbstractContainerService.java:116)
>         at com.google.appengine.tools.development.DevAppServerImpl.start
> (DevAppServerImpl.java:211)
>         at com.google.appengine.tools.development.gwt.AppEngineLauncher.start
> (AppEngineLauncher.java:86)
>         at com.google.gwt.dev.HostedMode.doStartUpServer(HostedMode.java:365)
>         at com.google.gwt.dev.HostedModeBase.startUp(HostedModeBase.java:590)
>         at com.google.gwt.dev.HostedModeBase.run(HostedModeBase.java:397)
>         at com.google.gwt.dev.HostedMode.main(HostedMode.java:232)
> 20-Jul-2009 19:42:32 com.google.apphosting.utils.jetty.JettyLogger
> warn
> WARNING: Failed startup of context
> com.google.apphosting.utils.jetty.devappenginewebappcont...@4e9d4e9d
> {/,C:\Files\IBM\RAD\GoogleWebToolkit\StockWatcher\war}
> Throwable occurred: javax.servlet.UnavailableException: Servlet class
> com.google.gwt.sample.stockwatcher.server.StockPriceServiceImpl is not
> a javax.servlet.Servlet
>         at org.mortbay.jetty.servlet.ServletHolder.checkServletType
> (ServletHolder.java:377)
>         at org.mortbay.jetty.servlet.ServletHolder.doStart(ServletHolder.java:
> 234)
>         at org.mortbay.component.AbstractLifeCycle.start
> (AbstractLifeCycle.java:40)
>         at org.mortbay.jetty.servlet.ServletHandler.initialize
> (ServletHandler.java:612)
>         at org.mortbay.jetty.servlet.Context.startContext(Context.java:139)
>         at org.mortbay.jetty.webapp.WebAppContext.startContext
> (WebAppContext.java:1218)
>         at org.mortbay.jetty.handler.ContextHandler.doStart
> (ContextHandler.java:500)
>         at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:
> 448)
>         at org.mortbay.component.AbstractLifeCycle.start
> (AbstractLifeCycle.java:40)
>         at org.mortbay.jetty.handler.HandlerWrapper.doStart
> (HandlerWrapper.java:117)
>         at org.mortbay.component.AbstractLifeCycle.start
> (AbstractLifeCycle.java:40)
>         at org.mortbay.jetty.handler.HandlerWrapper.doStart
> (HandlerWrapper.java:117)
>         at org.mortbay.jetty.Server.doStart(Server.java:217)
>         at org.mortbay.component.AbstractLifeCycle.start
> (AbstractLifeCycle.java:40)
>         at
> com.google.appengine.tools.development.JettyContainerService.startContainer
> (JettyContainerService.ja

Re: Add external java project to GWT project in Eclipse

2009-07-20 Thread martinhansen

Now I tried the "link source" function without Google App Engine. At
first, it seems to work, and the project is added to my main project.
The only problem is: The package declarations produce errors. Eclipse
shows an error message:

The declared package "com.company.data" does not match the expected
package "src.com.company.data"

What to do?


On 20 Jul., 22:29, martinhansen 
wrote:
> Hello Donald,
>
> I already tried the Google App Engine approach, but it didn't work for
> me. And GAE adds a lot of stuff I don't need to my project. I really
> don't want to mess around with it, since I managed to kill my GWT
> app's configuration several times and I had to create a new project.
>
> Meanwhile, I tried the "output folder" approach. I tried to change the
> default output folder of "DataProject", but I
> didn't manage successfully. Eclipse says: Path '/GwtApp/src' must
> denote location inside project 'DataProject'. Am I heading the wrong
> way there?
>
> On 20 Jul., 22:21, "Donald W. Long"  wrote:
>
> > I looked at the linked source method and you have to have the linked
> > source fully qualified.  Thats nice if you always have your source in
> > the same place.  You could try using the linked variables but then
> > thats also work.  Do not see this as a real option for projects that
> > will be worked on by many developers at the same time.
>
> > If I am wrong please let me know.
>
> > Thanks
>
> > Donald W. Long (donald.w.l...@thelongsfamily.com)
>
> > On Jul 20, 1:34 pm, Jason Parekh  wrote:
>
> > > Hi Martin,
> > > You may try using the link source option, as suggested by the thread 
> > > athttp://groups.google.com/group/google-appengine-java/browse_thread/th
> > >  If that doesn't work, you could set the output directory of your
> > > dependencies to be the GWT output folder.
>
> > > jason
>
> > > On Mon, Jul 20, 2009 at 12:14 PM, martinhansen <
>
> > > martin.hanse...@googlemail.com> wrote:
>
> > > > Hello Sean,
>
> > > > thank you very much. I've thought of that solution too, but it is not
> > > > appropriate for my GWT project. I have to add 4 external projects to
> > > > my GWT project, and all of these 4 projects are subject to change
> > > > every day. It would be too much work to export them to a jar file
> > > > every day. Is there some way to automatically add the external project
> > > > sources to the GWT output folder?
>
> > > > On 20 Jul., 18:03, Sean  wrote:
> > > > > You can export the non-GWT java files into a jar and drop those in the
> > > > > WEB-INF/lib folder. That's what I do.
>
> > > > > On Jul 20, 11:44 am, martinhansen 
> > > > > wrote:
>
> > > > > > Hello,
>
> > > > > > my GWT server-side code needs an external java project. I have added
> > > > > > the project under "Configure build path / Projects". It works fine 
> > > > > > in
> > > > > > hosted mode. But when I deploy my application on a server, I get 
> > > > > > lots
> > > > > > of ClassNotFoundExceptions. Obviously, GWT cannot find the external
> > > > > > java code. When I look at the war\WEB-INF\classes folder, I see that
> > > > > > the external java classes have not been included.
>
> > > > > > How can I get GWT to include the external classes?- Hide quoted 
> > > > > > text -
>
> > > - Show quoted 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 Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Add external java project to GWT project in Eclipse

2009-07-20 Thread martinhansen

Hello Donald,

I already tried the Google App Engine approach, but it didn't work for
me. And GAE adds a lot of stuff I don't need to my project. I really
don't want to mess around with it, since I managed to kill my GWT
app's configuration several times and I had to create a new project.

Meanwhile, I tried the "output folder" approach. I tried to change the
default output folder of "DataProject", but I
didn't manage successfully. Eclipse says: Path '/GwtApp/src' must
denote location inside project 'DataProject'. Am I heading the wrong
way there?

On 20 Jul., 22:21, "Donald W. Long"  wrote:
> I looked at the linked source method and you have to have the linked
> source fully qualified.  Thats nice if you always have your source in
> the same place.  You could try using the linked variables but then
> thats also work.  Do not see this as a real option for projects that
> will be worked on by many developers at the same time.
>
> If I am wrong please let me know.
>
> Thanks
>
> Donald W. Long (donald.w.l...@thelongsfamily.com)
>
> On Jul 20, 1:34 pm, Jason Parekh  wrote:
>
> > Hi Martin,
> > You may try using the link source option, as suggested by the thread 
> > athttp://groups.google.com/group/google-appengine-java/browse_thread/th
> >  If that doesn't work, you could set the output directory of your
> > dependencies to be the GWT output folder.
>
> > jason
>
> > On Mon, Jul 20, 2009 at 12:14 PM, martinhansen <
>
> > martin.hanse...@googlemail.com> wrote:
>
> > > Hello Sean,
>
> > > thank you very much. I've thought of that solution too, but it is not
> > > appropriate for my GWT project. I have to add 4 external projects to
> > > my GWT project, and all of these 4 projects are subject to change
> > > every day. It would be too much work to export them to a jar file
> > > every day. Is there some way to automatically add the external project
> > > sources to the GWT output folder?
>
> > > On 20 Jul., 18:03, Sean  wrote:
> > > > You can export the non-GWT java files into a jar and drop those in the
> > > > WEB-INF/lib folder. That's what I do.
>
> > > > On Jul 20, 11:44 am, martinhansen 
> > > > wrote:
>
> > > > > Hello,
>
> > > > > my GWT server-side code needs an external java project. I have added
> > > > > the project under "Configure build path / Projects". It works fine in
> > > > > hosted mode. But when I deploy my application on a server, I get lots
> > > > > of ClassNotFoundExceptions. Obviously, GWT cannot find the external
> > > > > java code. When I look at the war\WEB-INF\classes folder, I see that
> > > > > the external java classes have not been included.
>
> > > > > How can I get GWT to include the external classes?- Hide quoted text -
>
> > - Show quoted 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 Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Add external java project to GWT project in Eclipse

2009-07-20 Thread martinhansen

I tried to change the default output folder of "DataProject", but I
didn't manage successfully. Eclipse says: Path '/GwtApp/src' must
denote location inside project 'DataProject'. Am I heading the wrong
way there?


On 20 Jul., 22:16, martinhansen 
wrote:
> Hello Jason,
>
> thanks for your interesting hints. I tried the Google App Engine
> first, but to no avail. I tried to convert my project to use the
> Google App Engine, but then I got some errors referring to missing XML
> files.
> The second approach sounds also interesting, but I need a little hint
> there. Where exactly do I have to set the output folder to?
>
> Let's say, I have two Projects:
>
> GwtApp
> --src
> com.company.gwtapp
> --GwtApp.java
>
> DataProject
> --src
> com.company.data
> --Employee.java
>
> And I want Employee.java to be available in my Gwt App, what do I have
> to do? In Eclipse, "Configure build path" on DataProject, then
> "source", then change "default output folder"? If so, to what value
> should I change it to?
>
> On 20 Jul., 20:34, Jason Parekh  wrote:
>
> > Hi Martin,
> > You may try using the link source option, as suggested by the thread 
> > athttp://groups.google.com/group/google-appengine-java/browse_thread/th....
> >  If that doesn't work, you could set the output directory of your
> > dependencies to be the GWT output folder.
>
> > jason
>
> > On Mon, Jul 20, 2009 at 12:14 PM, martinhansen <
>
> > martin.hanse...@googlemail.com> wrote:
>
> > > Hello Sean,
>
> > > thank you very much. I've thought of that solution too, but it is not
> > > appropriate for my GWT project. I have to add 4 external projects to
> > > my GWT project, and all of these 4 projects are subject to change
> > > every day. It would be too much work to export them to a jar file
> > > every day. Is there some way to automatically add the external project
> > > sources to the GWT output folder?
>
> > > On 20 Jul., 18:03, Sean  wrote:
> > > > You can export the non-GWT java files into a jar and drop those in the
> > > > WEB-INF/lib folder. That's what I do.
>
> > > > On Jul 20, 11:44 am, martinhansen 
> > > > wrote:
>
> > > > > Hello,
>
> > > > > my GWT server-side code needs an external java project. I have added
> > > > > the project under "Configure build path / Projects". It works fine in
> > > > > hosted mode. But when I deploy my application on a server, I get lots
> > > > > of ClassNotFoundExceptions. Obviously, GWT cannot find the external
> > > > > java code. When I look at the war\WEB-INF\classes folder, I see that
> > > > > the external java classes have not been included.
>
> > > > > How can I get GWT to include the external classes?
--~--~-~--~~~---~--~~
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 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Add external java project to GWT project in Eclipse

2009-07-20 Thread martinhansen

Hello Jason,

thanks for your interesting hints. I tried the Google App Engine
first, but to no avail. I tried to convert my project to use the
Google App Engine, but then I got some errors referring to missing XML
files.
The second approach sounds also interesting, but I need a little hint
there. Where exactly do I have to set the output folder to?

Let's say, I have two Projects:

GwtApp
--src
com.company.gwtapp
--GwtApp.java


DataProject
--src
com.company.data
--Employee.java


And I want Employee.java to be available in my Gwt App, what do I have
to do? In Eclipse, "Configure build path" on DataProject, then
"source", then change "default output folder"? If so, to what value
should I change it to?



On 20 Jul., 20:34, Jason Parekh  wrote:
> Hi Martin,
> You may try using the link source option, as suggested by the thread 
> athttp://groups.google.com/group/google-appengine-java/browse_thread/th
>  If that doesn't work, you could set the output directory of your
> dependencies to be the GWT output folder.
>
> jason
>
> On Mon, Jul 20, 2009 at 12:14 PM, martinhansen <
>
> martin.hanse...@googlemail.com> wrote:
>
> > Hello Sean,
>
> > thank you very much. I've thought of that solution too, but it is not
> > appropriate for my GWT project. I have to add 4 external projects to
> > my GWT project, and all of these 4 projects are subject to change
> > every day. It would be too much work to export them to a jar file
> > every day. Is there some way to automatically add the external project
> > sources to the GWT output folder?
>
> > On 20 Jul., 18:03, Sean  wrote:
> > > You can export the non-GWT java files into a jar and drop those in the
> > > WEB-INF/lib folder. That's what I do.
>
> > > On Jul 20, 11:44 am, martinhansen 
> > > wrote:
>
> > > > Hello,
>
> > > > my GWT server-side code needs an external java project. I have added
> > > > the project under "Configure build path / Projects". It works fine in
> > > > hosted mode. But when I deploy my application on a server, I get lots
> > > > of ClassNotFoundExceptions. Obviously, GWT cannot find the external
> > > > java code. When I look at the war\WEB-INF\classes folder, I see that
> > > > the external java classes have not been included.
>
> > > > How can I get GWT to include the external classes?
--~--~-~--~~~---~--~~
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 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Add external java project to GWT project in Eclipse

2009-07-20 Thread martinhansen

Hello Sean,

thank you very much. I've thought of that solution too, but it is not
appropriate for my GWT project. I have to add 4 external projects to
my GWT project, and all of these 4 projects are subject to change
every day. It would be too much work to export them to a jar file
every day. Is there some way to automatically add the external project
sources to the GWT output folder?

On 20 Jul., 18:03, Sean  wrote:
> You can export the non-GWT java files into a jar and drop those in the
> WEB-INF/lib folder. That's what I do.
>
> On Jul 20, 11:44 am, martinhansen 
> wrote:
>
>
>
>
>
> > Hello,
>
> > my GWT server-side code needs an external java project. I have added
> > the project under "Configure build path / Projects". It works fine in
> > hosted mode. But when I deploy my application on a server, I get lots
> > of ClassNotFoundExceptions. Obviously, GWT cannot find the external
> > java code. When I look at the war\WEB-INF\classes folder, I see that
> > the external java classes have not been included.
>
> > How can I get GWT to include the external classes?
--~--~-~--~~~---~--~~
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 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Add external java project to GWT project in Eclipse

2009-07-20 Thread martinhansen

Hello,

my GWT server-side code needs an external java project. I have added
the project under "Configure build path / Projects". It works fine in
hosted mode. But when I deploy my application on a server, I get lots
of ClassNotFoundExceptions. Obviously, GWT cannot find the external
java code. When I look at the war\WEB-INF\classes folder, I see that
the external java classes have not been included.

How can I get GWT to include the external classes?
--~--~-~--~~~---~--~~
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 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Export GWT app as WAR file - EASY tutorial for this?

2009-07-20 Thread martinhansen

OK, I have found out that I can invoke err.printStackTrace() on the
server, which will log the error to logs/stdout. This is already quite
helpful.
--~--~-~--~~~---~--~~
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 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Export GWT app as WAR file - EASY tutorial for this?

2009-07-20 Thread martinhansen

Hello Chad,

I'm using GWT 1.6.4 with the Google plugin for Eclipse.

thank you very much, it worked fine. Great! Unfortunately, I can't get
my application to run. My RMI call fails on the server. When I look
into the tomcat server logs, it says:

com.google.gwt.user.client.rpc.SerializationException: Type
'java.rmi.UnmarshalException' was not included in the set of types
which can be serialized by this SerializationPolicy or its Class
object could not be loaded. For security purposes, this type will not
be serialized.

My server code tries to connect to a remote service. In hosted mode,
it works fine. But not when my application is deployed. Why is an
UnmarshalException being thrown? How can I debug the server-side code
with tomcat? After some research, I found out that it's possible to
debug tomcat java code, but apparently, it's so complicated that I'm
not able to do it. Unfortunately, I haven't found an easy tutorial for
this. Can someone give a little hint on how to do this?



On 20 Jul., 16:56, Chad  wrote:
> Martin,
>
> It can depend on your version of GWT. If you are using the GWT-Eclipse
> Plugin (GEP), you can just click the GWT Compile button from the
> toolbar. After it compiles successfully, open your project folder
> (outside of Eclipse). You will see a war folder inside your project
> folder. Open that war folder. You will see a few files and folders.
> Select everything and create a zip file (this should be a right-click
> action). Name the zip file something.war and that's it. When you drop
> that war file into your Tomcat webapps folder, it will get
> automatically expanded into a folder named the same as the war file
> name (without the extension).
>
> If you are using an older version of GWT, then the manual steps I
> outlined a while back may help and can be found:
>
> http://milamade.com/code/gwt/createwar.htm
>
> HTH,
> Chad
>
> On Jul 20, 8:01 am, martinhansen 
> wrote:
>
> > Hi,
>
> > I want to export my GWT app as a WAR file and deploy it on a tomcat
> > server. I've read dozens of threads about this topic, and I understood
> > nothing. I do not know anything about WAR files, ANT build scripts or
> > tomcat server, I'm totally new to that stuff. I tried to figure it out
> > by myself, but I couldn't get past the first few steps. When I right-
> > click my GWT project in eclipse and select "export/web/WAR file", it
> > always says "Module name is invalid" when it asks for a "web project"
> > name. What to do now? Can someone give me a really basic instruction
> > for this, or a good link to a tutorial? I'm really confused by this, I
> > need to know the very basics.
>
> > Thanks a lot in advance!
--~--~-~--~~~---~--~~
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 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Export GWT app as WAR file - EASY tutorial for this?

2009-07-20 Thread martinhansen

Hi,

I want to export my GWT app as a WAR file and deploy it on a tomcat
server. I've read dozens of threads about this topic, and I understood
nothing. I do not know anything about WAR files, ANT build scripts or
tomcat server, I'm totally new to that stuff. I tried to figure it out
by myself, but I couldn't get past the first few steps. When I right-
click my GWT project in eclipse and select "export/web/WAR file", it
always says "Module name is invalid" when it asks for a "web project"
name. What to do now? Can someone give me a really basic instruction
for this, or a good link to a tutorial? I'm really confused by this, I
need to know the very basics.

Thanks a lot in advance!
--~--~-~--~~~---~--~~
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 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Create EMPTY project with Google Plugin for Eclipse

2009-07-13 Thread martinhansen

Thanks a lot, it worked. I like the Google Plugin very much, and it
would be a lot better with more configuration options. Maybe even
customizable default project options, such as default module inherits,
a default HTML file and so on.

On 13 Jul., 21:58, Alex Rudnick  wrote:
> Hrm. The link works fine for me (using gmail).
>
> Anyway. Try this one out!
>
> http://code.google.com/p/googleappengine/issues/detail?id=1547
>
> If that doesn't get you there, it's issue #1547, which you should be
> able to find on your own.
>
> On Mon, Jul 13, 2009 at 3:51 PM,
>
> martinhansen wrote:
>
> > Hello Jason,
>
> > thanks for your swift response. Too bad this is not possible yet. I
> > will star it. Unfortunately, I get a 404 error on that link. Would you
> > be so kind and provide a corrected link? Thank you very much!
>
> --
> Alex Rudnick
> swe, gwt, atl
--~--~-~--~~~---~--~~
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 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Create EMPTY project with Google Plugin for Eclipse

2009-07-13 Thread martinhansen

Hello Jason,

thanks for your swift response. Too bad this is not possible yet. I
will star it. Unfortunately, I get a 404 error on that link. Would you
be so kind and provide a corrected link? Thank you very much!

On 13 Jul., 21:38, Jason Parekh  wrote:
> Hi Martin,
> Sorry, it's not currently possible to create empty projects.  Please star
> the issue athttp://code.google.com/p/googleappengine/issues/detail?id=1547as
> that improves how we rank the issue.
>
> Thanks,
> jason
>
> On Mon, Jul 13, 2009 at 3:30 PM, martinhansen <
>
> martin.hanse...@googlemail.com> wrote:
>
> > Hello,
>
> > is it possible to create a new empty project using the Google GWT
> > plugin for Eclipse? I very often create new projects to test
> > something. Is it possible to configure the plugin to start with an
> > empty project? Where can I change the default settings for new
> > projects?
>
> > Thanks in advance for any helpful information!
--~--~-~--~~~---~--~~
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 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Create EMPTY project with Google Plugin for Eclipse

2009-07-13 Thread martinhansen

Hello,

is it possible to create a new empty project using the Google GWT
plugin for Eclipse? I very often create new projects to test
something. Is it possible to configure the plugin to start with an
empty project? Where can I change the default settings for new
projects?

Thanks in advance for any helpful information!
--~--~-~--~~~---~--~~
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 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Best practice to implement Command Pattern RPC on server?

2009-07-06 Thread martinhansen

Hello Herme,

now it finally works. I've used your great and simple example and
created a simple GWT application from it to check a user name and a
password. For anyone interested, I've uploaded the sample application.
It's essentially the same, just using GWT.

http://rapidshare.de/files/47769639/GWTPattern.zip.html


On 5 Jul., 11:59, Herme Garcia  wrote:
> Martin,
>
> For really simple example, look at
>
> http://itsp.typepad.com/voip/2009/07/gwt-implementing-rpc-command-pat...
>
> This is really simple, far from complete, but you can see how the
> pattern works
>
> Herme
>
> On Jul 5, 10:16 am, martinhansen 
> wrote:
>
> > Hello David,
>
> > I've read your source code and your example. It is very interesting.
> > But although it's short and simple, I still don't understand it.
> > Especially "GIN" and "GUICE" confuses me a lot. Can I use your example
> > without these technologies?
>
> > Does anyone know a really simple example? The example inRay'ssheet
> > is interesting and simple, but incomplete. Where does the actual
> > action take place in his example, let's say, querying some contact
> > details from a remote data base? I think this important part is
> > missing.
> > The ContactService defines a method called "execute", but where is
> > this method implemented? Is it implemented automatically by some
> > mechanism? If yes, how is it done? Is "execute" the only method in the
> > interface I ever need, e.g. some kind of place holder?
>
> > Any help would be greatly appreciated.
>
> > On 5 Jul., 08:17, David Peterson  wrote:
>
> > > Hi Nathan,
>
> > > On Jul 5, 2:15 am, Nathan Wells  wrote:
>
> > > > I updated my project to only use the two interfaces as suggested by
> > > > David. Instead of using actionhandlers and registering them, I created
> > > > an annotation for the IRemoteProcedureCall implementations that
> > > > contains the canonical class name of the IProcedure that is to be run
> > > > on the server.
>
> > > As you say, one of the downsides of linking the handler to the
> > > concrete implementation is that there may be issues with the GWT
> > > compiler. That said, in general it seems to mostly ignore attributes,
> > > so it may not be an issue.
>
> > > The other downside for me is that it ties the action interface to a
> > > specific implementation. This makes it more difficult to write mocks
> > > for tests, etc. Having them configured purely on the server-side means
> > > you can replace them with whatever you like on in test scenarios. Or,
> > > if you want to provide alternate implementations (eg. JDO vs
> > > Hibernate), you can have both in your app and just switch between them
> > > by changing your DI configuration.
>
> > > The downside of my method is that you may forget to actually implement
> > > the handler. Of course, this will generally show up pretty quickly
> > > when you try to actually use it. And I guess it's still quite easy to
> > > forget to supply the annotation anyway...
>
> > > David
--~--~-~--~~~---~--~~
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 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Best practice to implement Command Pattern RPC on server?

2009-07-06 Thread martinhansen

Gr!

I found out why! Gr!

The Action and Response classes must have an empty default constructor
to be serializable. I've had this error before. Unfortunately, the GWT
compiler error message is anything but helpful in this case. G.


On 6 Jul., 11:57, martinhansen  wrote:
> Hello Herme,
>
> your example is very interesting. I downloaded it and changed it to
> work with GWT. But I was not successful. When I run my application,
> the compiler complains about my client service interface:
>
> [ERROR] Type 'com.isp.gwtpattern.client.rpc.Response' was not
> serializable and has no concrete serializable subtypes
>
> The code is as follows:
>
> @RemoteServiceRelativePath( "buchungServlet" )
> public interface BuchungService extends RemoteService {
>
>    T execute(Action action);
>
> }
>
> What am I doing wrong here? My interfaces "Action" and "Response" both
> implement IsSerializable.
>
> M
> On 5 Jul., 11:55, hgarciag  wrote:
>
> > Martin,
>
> > For really simple example you can see here:
>
> >http://itsp.typepad.com/voip/2009/07/gwt-implementing-rpc-command-pat...
>
> > At the end, you will need to add some more code, but you can see how
> > the pattern works (it helped me!)
>
> > Herme
>
> > On Jul 5, 10:16 am, martinhansen 
> > wrote:
>
> > > Hello David,
>
> > > I've read your source code and your example. It is very interesting.
> > > But although it's short and simple, I still don't understand it.
> > > Especially "GIN" and "GUICE" confuses me a lot. Can I use your example
> > > without these technologies?
>
> > > Does anyone know a really simple example? The example inRay'ssheet
> > > is interesting and simple, but incomplete. Where does the actual
> > > action take place in his example, let's say, querying some contact
> > > details from a remote data base? I think this important part is
> > > missing.
> > > The ContactService defines a method called "execute", but where is
> > > this method implemented? Is it implemented automatically by some
> > > mechanism? If yes, how is it done? Is "execute" the only method in the
> > > interface I ever need, e.g. some kind of place holder?
>
> > > Any help would be greatly appreciated.
>
> > > On 5 Jul., 08:17, David Peterson  wrote:
>
> > > > Hi Nathan,
>
> > > > On Jul 5, 2:15 am, Nathan Wells  wrote:
>
> > > > > I updated my project to only use the two interfaces as suggested by
> > > > > David. Instead of using actionhandlers and registering them, I created
> > > > > an annotation for the IRemoteProcedureCall implementations that
> > > > > contains the canonical class name of the IProcedure that is to be run
> > > > > on the server.
>
> > > > As you say, one of the downsides of linking the handler to the
> > > > concrete implementation is that there may be issues with the GWT
> > > > compiler. That said, in general it seems to mostly ignore attributes,
> > > > so it may not be an issue.
>
> > > > The other downside for me is that it ties the action interface to a
> > > > specific implementation. This makes it more difficult to write mocks
> > > > for tests, etc. Having them configured purely on the server-side means
> > > > you can replace them with whatever you like on in test scenarios. Or,
> > > > if you want to provide alternate implementations (eg. JDO vs
> > > > Hibernate), you can have both in your app and just switch between them
> > > > by changing your DI configuration.
>
> > > > The downside of my method is that you may forget to actually implement
> > > > the handler. Of course, this will generally show up pretty quickly
> > > > when you try to actually use it. And I guess it's still quite easy to
> > > > forget to supply the annotation anyway...
>
> > > > David
--~--~-~--~~~---~--~~
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 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Best practice to implement Command Pattern RPC on server?

2009-07-06 Thread martinhansen

Hello Herme,

your example is very interesting. I downloaded it and changed it to
work with GWT. But I was not successful. When I run my application,
the compiler complains about my client service interface:



[ERROR] Type 'com.isp.gwtpattern.client.rpc.Response' was not
serializable and has no concrete serializable subtypes



The code is as follows:



@RemoteServiceRelativePath( "buchungServlet" )
public interface BuchungService extends RemoteService {

   T execute(Action action);

}



What am I doing wrong here? My interfaces "Action" and "Response" both
implement IsSerializable.


M
On 5 Jul., 11:55, hgarciag  wrote:
> Martin,
>
> For really simple example you can see here:
>
> http://itsp.typepad.com/voip/2009/07/gwt-implementing-rpc-command-pat...
>
> At the end, you will need to add some more code, but you can see how
> the pattern works (it helped me!)
>
> Herme
>
> On Jul 5, 10:16 am, martinhansen 
> wrote:
>
> > Hello David,
>
> > I've read your source code and your example. It is very interesting.
> > But although it's short and simple, I still don't understand it.
> > Especially "GIN" and "GUICE" confuses me a lot. Can I use your example
> > without these technologies?
>
> > Does anyone know a really simple example? The example inRay'ssheet
> > is interesting and simple, but incomplete. Where does the actual
> > action take place in his example, let's say, querying some contact
> > details from a remote data base? I think this important part is
> > missing.
> > The ContactService defines a method called "execute", but where is
> > this method implemented? Is it implemented automatically by some
> > mechanism? If yes, how is it done? Is "execute" the only method in the
> > interface I ever need, e.g. some kind of place holder?
>
> > Any help would be greatly appreciated.
>
> > On 5 Jul., 08:17, David Peterson  wrote:
>
> > > Hi Nathan,
>
> > > On Jul 5, 2:15 am, Nathan Wells  wrote:
>
> > > > I updated my project to only use the two interfaces as suggested by
> > > > David. Instead of using actionhandlers and registering them, I created
> > > > an annotation for the IRemoteProcedureCall implementations that
> > > > contains the canonical class name of the IProcedure that is to be run
> > > > on the server.
>
> > > As you say, one of the downsides of linking the handler to the
> > > concrete implementation is that there may be issues with the GWT
> > > compiler. That said, in general it seems to mostly ignore attributes,
> > > so it may not be an issue.
>
> > > The other downside for me is that it ties the action interface to a
> > > specific implementation. This makes it more difficult to write mocks
> > > for tests, etc. Having them configured purely on the server-side means
> > > you can replace them with whatever you like on in test scenarios. Or,
> > > if you want to provide alternate implementations (eg. JDO vs
> > > Hibernate), you can have both in your app and just switch between them
> > > by changing your DI configuration.
>
> > > The downside of my method is that you may forget to actually implement
> > > the handler. Of course, this will generally show up pretty quickly
> > > when you try to actually use it. And I guess it's still quite easy to
> > > forget to supply the annotation anyway...
>
> > > David
--~--~-~--~~~---~--~~
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 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Best practice to implement Command Pattern RPC on server?

2009-07-05 Thread martinhansen

Hello David,

I've read your source code and your example. It is very interesting.
But although it's short and simple, I still don't understand it.
Especially "GIN" and "GUICE" confuses me a lot. Can I use your example
without these technologies?

Does anyone know a really simple example? The example in Ray's sheet
is interesting and simple, but incomplete. Where does the actual
action take place in his example, let's say, querying some contact
details from a remote data base? I think this important part is
missing.
The ContactService defines a method called "execute", but where is
this method implemented? Is it implemented automatically by some
mechanism? If yes, how is it done? Is "execute" the only method in the
interface I ever need, e.g. some kind of place holder?

Any help would be greatly appreciated.


On 5 Jul., 08:17, David Peterson  wrote:
> Hi Nathan,
>
> On Jul 5, 2:15 am, Nathan Wells  wrote:
>
> > I updated my project to only use the two interfaces as suggested by
> > David. Instead of using actionhandlers and registering them, I created
> > an annotation for the IRemoteProcedureCall implementations that
> > contains the canonical class name of the IProcedure that is to be run
> > on the server.
>
> As you say, one of the downsides of linking the handler to the
> concrete implementation is that there may be issues with the GWT
> compiler. That said, in general it seems to mostly ignore attributes,
> so it may not be an issue.
>
> The other downside for me is that it ties the action interface to a
> specific implementation. This makes it more difficult to write mocks
> for tests, etc. Having them configured purely on the server-side means
> you can replace them with whatever you like on in test scenarios. Or,
> if you want to provide alternate implementations (eg. JDO vs
> Hibernate), you can have both in your app and just switch between them
> by changing your DI configuration.
>
> The downside of my method is that you may forget to actually implement
> the handler. Of course, this will generally show up pretty quickly
> when you try to actually use it. And I guess it's still quite easy to
> forget to supply the annotation anyway...
>
> David
--~--~-~--~~~---~--~~
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 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Best practice to implement Command Pattern RPC on server?

2009-07-04 Thread martinhansen

Can someone explain how this is useful? I don't know what a command
pattern is. Why should I use command patterns and not the traditional
way? What is the difference? At first look, this seems to be a lot
more complicated, so I'm a little confused.
--~--~-~--~~~---~--~~
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 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Reuse AsyncCallback Class

2009-07-04 Thread martinhansen

Hello Fred,

something like:

if(! LoginService.checkLogin(user, password) ) {
displayError();
}

will not be possible with GWT, I guess?

Furthermore, I do not understand this part:

void showContact(final Contact contact) {
  service.execute(new GetDetails(contact.getDetailIds()),
new GotDetails() {
  public void got(ArrayList details) {
renderContact(contact);
renderDetails(details);
  }
  });
}

Where do I have to do the actual RPC call, let's say, query a remote
database?


On 2 Jul., 18:25, Fred Sauer  wrote:
> Ray has some sample code in one of his 
> slides:http://code.google.com/events/io/sessions/GoogleWebToolkitBestPractic...
>
> See slide 24
>
> http://dl.google.com/io/2009/pres/Th_0200_GoogleWebToolkitArchitectur...
>
> On Fri, Jun 26, 2009 at 5:58 AM, martinhansen <
>
>
>
>
>
>
>
> martin.hanse...@googlemail.com> wrote:
>
> > Hello,
>
> > how can I reuse an AsyncCallback Class? Is there any concept?
> > For example, I have the following AsyncCallback defined in a GUI
> > class:
>
> >    AsyncCallback callback = new
> > AsyncCallback()
> >    {
> >      public void onFailure( Throwable caught )
> >      {
> >      // Show error message
> >      }
> >      public void onSuccess( LoginResult result )
> >      {
> >      // Show success message
> >      }
> >    };
>
> >    loginService.loginUser(user, password, callback);
>
> > And I want to use the same functionality in another GUI class, how can
> > I accomplish this? I have a lot of code duplication and I want to
> > reduce it. In the end, I'd like to have something like:
>
> > LoginResult result = LoginUtil.loginUser(user, password)
> > if (result == error)  doSomething;
> > if(result == success) doSomething;
>
> > Thanks in advance
>
> --
> Fred Sauer
> f...@allen-sauer.com
>
> []
--~--~-~--~~~---~--~~
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 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Reuse AsyncCallback Class

2009-06-26 Thread martinhansen

Hello,

how can I reuse an AsyncCallback Class? Is there any concept?
For example, I have the following AsyncCallback defined in a GUI
class:


AsyncCallback callback = new
AsyncCallback()
{
  public void onFailure( Throwable caught )
  {
  // Show error message
  }
  public void onSuccess( LoginResult result )
  {
  // Show success message
  }
};

loginService.loginUser(user, password, callback);


And I want to use the same functionality in another GUI class, how can
I accomplish this? I have a lot of code duplication and I want to
reduce it. In the end, I'd like to have something like:

LoginResult result = LoginUtil.loginUser(user, password)
if (result == error)  doSomething;
if(result == success) doSomething;

Thanks in advance
--~--~-~--~~~---~--~~
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 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: java.rmi is not supported by Google App Engine's Java runtime environment

2009-06-25 Thread martinhansen

I found the solution. I had to disable the Google App Engine in
Eclipse. Now it works.

On 25 Jun., 11:09, martinhansen 
wrote:
> Hello,
>
> I'm trying to do the following in a GWT application:
>
> Registry registry = LocateRegistry.getRegistry( "192.168.111.37",
> 1199 );
>
> I'm using Eclipse IDE and GWT 1.6.4. But I get the following error:
>
> java.rmi.registry.Registry is not supported by Google App Engine's
> Java runtime environment
>
> What does this mean? I cannot use anything from java.rmi, I always get
> the same error message. I have an old GWT project which was not
> created by the GWT Plugin for Eclipse. There I don't see any errors.
>
> Any help would be greatly appreciated.
--~--~-~--~~~---~--~~
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 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



java.rmi is not supported by Google App Engine's Java runtime environment

2009-06-25 Thread martinhansen

Hello,

I'm trying to do the following in a GWT application:

Registry registry = LocateRegistry.getRegistry( "192.168.111.37",
1199 );

I'm using Eclipse IDE and GWT 1.6.4. But I get the following error:

java.rmi.registry.Registry is not supported by Google App Engine's
Java runtime environment

What does this mean? I cannot use anything from java.rmi, I always get
the same error message. I have an old GWT project which was not
created by the GWT Plugin for Eclipse. There I don't see any errors.

Any help would be greatly appreciated.

--~--~-~--~~~---~--~~
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 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---