{
log.info("+++ testClientContainer");
InitialContext ctx = new InitialContext();
BusinessObjectHome home = (BusinessObjectHome)ctx.lookup("BusinessSession");
// Check the IClientContainer interface
IClientContainer container = (IClientContainer) home;
ArrayList interceptors = container.getInterceptors();
for(int n = 0; n < interceptors.size(); n ++)
{
log.info(interceptors.get(n));
}
BusinessObject bean = home.create();
container = (IClientContainer) bean;
interceptors = container.getInterceptors();
for(int n = 0; n < interceptors.size(); n ++)
{
log.info(interceptors.get(n));
}
// Replace the default InvokerInterceptor
int last = interceptors.size() - 1;
interceptors.set(last, new InvokerInterceptor());
container.setInterceptors(interceptors);
// Invoke over the rpc transport
bean.doSomething();
// Invoker over the jms transport
String reply = bean.doSomethingSlowly("arg1", "arg2");