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_id=5588&alloc_id=12065&op=click
_______________________________________________
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to