Is it possible to have the swf and LCDS app on different servers?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Is it possible to have the swf and LCDS app on different servers?

lb100lb
I have a flex client from which I would like to make RemoteObject calls
through LCDS to a J2EE server.

Is it possible for my swf to be on a different server from my LCDS app?
If so, how should my client be configured, compiled and deployed? What
would be deployed to my LCDS server?

How would my client know to call the server?

(I have used flex client with LCDS server when both are hosted on the
same server.)

Thanks,
Larry

Reply | Threaded
Open this post in threaded view
|

RE: Is it possible to have the swf and LCDS app on different servers?

Seth Hodgson
> I have a flex client from which I would like to make RemoteObject calls
> through LCDS to a J2EE server.

Not possible. LCDS remoting destinations invoke methods on local Java classes. These Java classes that you've exposed as remoting destinations could always make remote calls to other resources on other servers (i.e. RMI, JINI, etc.).

> Is it possible for my swf to be on a different server from my LCDS app?
> If so, how should my client be configured, compiled and deployed? What
> would be deployed to my LCDS server?

Yes. You'd compile your swf against a services-config.xml file containing <channel-definitions> that use fully qualified URLs that refer to your LCDS server. Then you'd deploy this swf on some other server (maybe an Apache web tier). You'll need a crossdomain.xml file on your LCDS server to allow network access from this remotely hosted swf.

>> How would my client know to call the server?

Based on the fully qualified URLs in the services-config.xml file you compile against. Or when your app starts up you could issue a URLRequest for a response containing a list the channels/endpoint URLs/etc. it should use to talk to a given LCDS server. Using this list, your app startup code would create and configure a ChannelSet/Channels and then assign that to your service components (RemoteObject, DataService, etc.).

Best,
Seth