public void send_request(ClientRequestInfo ri) throws ForwardRequest { try { org.omg.CORBA.Any any = ri.get_slot(slot_id); if (any.type().kind().value() == org.omg.CORBA.TCKind._tk_null) { logger.debug( "tid=" + Thread.currentThread().getName() + "," + "ClientInterceptor.send_request, slot is empty"); } else { logger.debug( "tid=" + Thread.currentThread().getName() + "," + "ClientInterceptor.send_request, adding ServiceContext"); ServiceContext ctx = new ServiceContext(SERVICE_ID, codec.encode(any)); ri.add_request_service_context(ctx, false); } } catch (Exception e) { throw new INTERNAL("Caught " + e); } }
public void send_request(ClientRequestInfo ri) throws ForwardRequest { System.out.println("[" + Thread.currentThread() + "] ClientInterceptor: send_request()"); try { org.omg.CORBA.Any any = ri.get_slot(slot_id); System.out.println( "[" + Thread.currentThread() + "] ClientInterceptor: send_request() - get_slot() = " + any); if (any.type().kind().value() != org.omg.CORBA.TCKind._tk_null) { ServiceContext ctx = new ServiceContext(4711, codec.encode(any)); ri.add_request_service_context(ctx, false); } } catch (Exception e) { e.printStackTrace(); throw new INTERNAL(e.getMessage()); } }