You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by Craig McClanahan <cr...@apache.org> on 2006/01/08 06:36:23 UTC

Re: [shale] Remote Method Calls

On 12/23/05, netsql <ne...@pointcast.com> wrote:
>
> Craig McClanahan wrote:
>
> > It's only nowdays that XML config
> > is out of fashion.
>
> I disagree on 2 levels.
> #1. I think everyone likes one simple XML. The noise was on some long
> and mutiple xmls frameworks.
> #2. Who care what the fad is!
>
> Oh well. I can use CoR anywhere I want,
> It sure would be a way to share 1.3 apps, w/ 2.0 apps, w/ Shale aps. if
> people made their "action"  cor.


FWIW, I just committed the "remoting" implementation that maps the new-style
requests to a Commons Chain command or chain (functionally equivalent to the
previous approach).  This code will be available in nightly build 20060108
or later.  Here's what you'd have to do to use it:

* Choose a prefix or extension mapping for resources that should
  be served by Commons Chain.  I'll use "/chain/*" in the example below.

* Configure the appropriate processor in /WEB-INF/web.xml:

    <context-param>
      <param-name>org.apache.shale.remoting.OTHER_RESOURCES</param-name>
      <param-value>
        /chain/*:org.apache.shale.remoting.impl.ChainProcessor
      </param-value>
    </context-param>

* Define the appropriate "foo.bar" command in the *remoting* catalog in a
  chain-config.xml resource:

    <catalogs>
      <catalog name="remoting">
        ...
        <command name="foo.bar" className="..."/>
        ...
    </catalogs>

* Now, assuming you have JSF mapped to "*.faces", the following URL will
  execute your command "foo.bar" from catalog "remoting":

    http://localhost:8080/myapp/chain/foo/bar.faces

* If instead you liked prefix mapping for JSF as well (say, with pattern
"/faces/*"),
  you would use:

    http://localhost:8080/myapp/faces/chain/foo/bar

.V


Craig