public AdapterInvocationInfo getHandlerImplementor() throws Exception { ComponentInvocation inv = container.startInvocation(); AdapterInvocationInfo aInfo = new AdapterInvocationInfo(); aInfo.setInv(inv); synchronized(this) { if(tieClass == null) { tieClass = Thread.currentThread().getContextClassLoader().loadClass(getEndpoint().getTieClassName()); } if( tieInstance == null ) { tieInstance = (Tie) tieClass.newInstance(); tieInstance.setTarget((Remote) webServiceEndpointServant); } } ((EJBInvocation)inv).setWebServiceTie(tieInstance); aInfo.setHandler((Handler)tieInstance); return aInfo; }
public Implementor getImplementorFor(RuntimeEndpointInfo targetEndpoint) { Implementor implementor = null; try { synchronized(targetEndpoint) { implementor = (Implementor) implementorCache_.get(targetEndpoint); if( implementor == null ) { implementor = createImplementor(targetEndpoint); implementorCache_.put(targetEndpoint, implementor); } } WebServiceContractImpl wscImpl = WebServiceContractImpl.getInstance(); InvocationManager invManager = wscImpl.getInvocationManager(); ComponentInvocation inv = invManager.getCurrentInvocation(); if (inv instanceof EJBInvocation) ((EJBInvocation)inv).setWebServiceTie(implementor.getTie()); } catch(Throwable t) { RuntimeException re = new RuntimeException(); re.initCause(t); throw re; } return implementor; }