Correction: the last call should have been *getProxyForService*() instead of getService().
On Mon, Nov 21, 2011 at 8:33 PM, Andrew Boyd <andrew.b...@bbtech.net> wrote: > Ok so with messaging we are de-coupled do the proxy can accept an endpoint: > > Echo service = ProxyHelper.createProxy(context.getEndpoint("direct:echo"), > Echo.class); > > > I still need to pass around a reference to a particular Object. So I > guess my question should be how I generate an Exporter on the fly. > > Now after I RTFM I think I have the answer: > > *RemoteExporter remoteExpt = > RemoteExporter<http://static.springsource.org/spring/docs/3.0.5.RELEASE/api/org/springframework/remoting/support/RemoteExporter.html#RemoteExporter()> > *() > remoteExpt.*setService*(br); // br from the code I need to replace. > remoteExpt.*setServiceInterface*(RequestInterface); > > myProxyToPassAround = (RequestInterface)remoteExpt.getService(); > > I think that should do it. I didn't compile but that is basically it. > > Thanks, > > Andrew > > > On Mon, Nov 21, 2011 at 8:03 PM, Andrew Boyd <andrew.b...@bbtech.net>wrote: > >> Hi Claus, >> In the links you provided it shows how to make a proxy for a particular >> Class. I want to make a proxy for a particular Object. >> >> I want to replace this: >> RequestImpl br = (RequestImpl) tmpHolder.get(ndx); // <- br is the Impl >> retList[ndx] = (RequestInterface) javax.rmi.PortableRemoteObject >> .narrow(br.getObjectRef(), RequestInterface.class); //<-- The br object >> will be linked to the stub being created. >> >> I didn't see an api that I can pass in an object to link the proxy to the >> pojo. >> >> Thanks, >> >> Andrew >> >> On Fri, Nov 18, 2011 at 1:58 AM, Claus Ibsen-2 [via Camel] < >> ml-node+s465427n5003615...@n5.nabble.com> wrote: >> >>> Hi >>> >>> Have you seen the user guide? >>> http://camel.apache.org/user-guide.html >>> >>> It has a link to using camel proxy >>> http://camel.apache.org/using-camelproxy.html >>> >>> >>> >>> On Fri, Nov 18, 2011 at 1:59 AM, KingAndrew <[hidden >>> email]<http://user/SendEmail.jtp?type=node&node=5003615&i=0>> >>> wrote: >>> >>> > Hi All, >>> > Currently my system is Corba/RMI-IIOP. We are using Camel to >>> decouple the >>> > services. We have a request repository that contains RequestItems >>> which are >>> > the target remote objects. As a new RequestItemImpl is created how >>> can I >>> > create a CamelProxyFactoryBean (proxy) on the fly? I would then pass >>> the >>> > proxy between the services as we do now with the RMI stub. >>> > >>> > I checked the api for CamelProxyFactoryBean and there weren't any >>> create >>> > methods close to what I was hoping for. >>> > >>> > Anyone have any ideas how I can tie a proxy to a specific object >>> instance? >>> > >>> > Thanks in advance, >>> > >>> > Andrew >>> > >>> > -- >>> > View this message in context: >>> http://camel.465427.n5.nabble.com/How-to-create-a-Proxy-per-request-tp5002903p5002903.html >>> > Sent from the Camel - Users mailing list archive at Nabble.com. >>> > >>> >>> >>> >>> -- >>> Claus Ibsen >>> ----------------- >>> FuseSource >>> Email: [hidden email]<http://user/SendEmail.jtp?type=node&node=5003615&i=1> >>> Web: http://fusesource.com >>> Twitter: davsclaus, fusenews >>> Blog: http://davsclaus.blogspot.com/ >>> Author of Camel in Action: http://www.manning.com/ibsen/ >>> >>> >>> ------------------------------ >>> If you reply to this email, your message will be added to the >>> discussion below: >>> >>> http://camel.465427.n5.nabble.com/How-to-create-a-Proxy-per-request-tp5002903p5003615.html >>> To unsubscribe from How to create a Proxy per request, click >>> here<http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5002903&code=YW5kcmV3LmJveWRAYmJ0ZWNoLm5ldHw1MDAyOTAzfC02OTE0NjE0ODg=> >>> . >>> NAML<http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.InstantMailNamespace&breadcrumbs=instant+emails%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml> >>> >> >> >> >> -- >> --Congress does not draw to its halls those who love liberty. It draws >> those who love power. >> >> -- Enforce the 10th Amendment: >> "The powers not delegated to the United States by the Constitution, nor >> prohibited by it to the States, are reserved to the States respectively, or >> to the people." >> > > > > -- > --Congress does not draw to its halls those who love liberty. It draws > those who love power. > > -- Enforce the 10th Amendment: > "The powers not delegated to the United States by the Constitution, nor > prohibited by it to the States, are reserved to the States respectively, or > to the people." > -- --Congress does not draw to its halls those who love liberty. It draws those who love power. -- Enforce the 10th Amendment: "The powers not delegated to the United States by the Constitution, nor prohibited by it to the States, are reserved to the States respectively, or to the people." -- View this message in context: http://camel.465427.n5.nabble.com/How-to-create-a-Proxy-per-request-tp5002903p5012331.html Sent from the Camel - Users mailing list archive at Nabble.com.