The easiest way would be to use web services.
If this is not an option what protocol did you have in mind?
At first, I thought it might be possible to call Seam components in the same way you call EJBs from Java SE (is that JRMP?), but I guess that's not an option.
It was a hypothetical question though, I haven't started implementing anything yet.
Thanks for the advice though :)
There are other ways to do it, but web services are by far the easiest. You could for example use RMI but you have to start the seam app before making any calls, something like:
Lifecycle.beginCall(); MyComponent c = (MyComponent)Component.getInstance("myComponent"); c.doStuff(); Lifecycle.endCall();
Doing it like this means you wont have access to the session and conversation scopes (although you probably could if you wrote some kind of manager that uses mock HttpSession objects to provide the session scope).
I have a Seam application working with a dual interface, one web (non-EJB) and one desktop (lunched from JWS). What I would suggest you is to use the RESTful webservices support Seam has bundled, it made the things so easy, you can reuse your components, you can use the same authentication and authorization mechanisn, conversations, and so on.
You just have to decide how to preserve your http session in the client if your application is session aware. In my case I asked the user for a login (before entering the application), then I preserved the session and invoked the services in that way. BTW, RESTEasy has a wonderful and easy way to consume your webservices.
Ok, thanks guys, you've been very helpful!