• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

DWR as RPC in standalone application?

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Author,
Whats the possiblity of using DWR in a standalone application that doesnt use browser.Can I use DWR as an alternative for Remote procedural Call?
 
Sheriff
Posts: 67749
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In a standalone Java application you would use RMI.

I suppose that you could use the java.net package to make HTTP requests to a server running a DWR application, but what advantage could there be to added all those extra layers over using RMI?
 
Ranch Hand
Posts: 136
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It's funny you ask that, I was thinking about how to do exactly that the other day I thought I saw discussion of it at one point somewhere, but I'm not sure where it landed.

DWR dynamically creates Javascript "proxy" objects, so I would think the key is having an environment where those could be run. I was thinking that maybe something like Rhino might fit the bill, but at the end of the day the environment would have to provide the same sort of underlying AJAX mechanism, i.e., XMLHttpRequest, that the browser does. If you had that, I'd think that approach could work.

You could also yourself manually mimic those proxies... so long as you could decode the DWR message that came back, you could probably pull it off too.

So, I don't have an answer for how to do it today, but I can say I don't believe I'm the only one looking into that.
reply
    Bookmark Topic Watch Topic
  • New Topic