There is nothing that prevents you from introducing this by customizing your proxy to include an alternate InvokerInterceptor. I can't say I see this as a general issue as the client already chooses the invoker based on the ejb home name. There are many reasons why the server should couple the invoker to the proxy configuration such as customization of the transport with the associated client side interceptors/socket factories, transport specific interceptors to deal with protocol exceptions.
xxxxxxxxxxxxxxxxxxxxxxxx Scott Stark Chief Technology Officer JBoss Inc. xxxxxxxxxxxxxxxxxxxxxxxx > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On > Behalf Of Dave Smith > Sent: Monday, November 08, 2004 1:11 PM > To: [EMAIL PROTECTED] > Subject: [JBoss-dev] Client bind of Invoker.. > > I would like to change the invoker such that the client can > decide on the invoker to use not the server. The problem with > the current setup is that if you have local clients that wish > to use RMI and remote clients using HTTP you have to have 2 > different configurations and bind each EJB in JNDI with both > invokers. When the client starts up it knows based on its > configuration settings which invoker it is going to use. Why > not have a system property that overrides the default invoker? > > So in InvokerInterceptor we replace > else > { > // The payload will go through marshalling at the > invoker layer > Invoker invoker = ctx.getInvoker(); > returnValue = invoker.invoke(invocation); > } > > with > > static Invoker clientOverride=null; > static boolean checkOverride=false > .. > else > { > if(!checkOverride) > { > String prop = System.getProperty("jboss.client.invoker"); > if(prop != null) > { > InitialContext ctx = new InitialContext(); > clientOverride= (Invoker)cxt.lookup(prop); > ctx.close(); > } > checkOverride=true; > } > Invoker invoker > if(clientOverride != null) > { > invoker = clientOverride; > } > else > { > invoker=ctx.getInvoker(); > } > returnValue = invoker.invoke(invocation); } > > > -- > Dave Smith > CANdata Systems Ltd > 416-493-9020 > ------------------------------------------------------- This SF.Net email is sponsored by: Sybase ASE Linux Express Edition - download now for FREE LinuxWorld Reader's Choice Award Winner for best database on Linux. http://ads.osdn.com/?ad_idU88&alloc_id065&op=click _______________________________________________ JBoss-Development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
