protected Object getTargetBean(Endpoint ep, Invocation epInv) { InvocationContext invCtx = epInv.getInvocationContext(); Object targetBean = invCtx.getTargetBean(); if (targetBean == null) { try { Class epImpl = ep.getTargetBeanClass(); targetBean = epImpl.newInstance(); invCtx.setTargetBean(targetBean); } catch (Exception ex) { throw new IllegalStateException("Cannot get target bean instance", ex); } } return targetBean; }
protected Object getTargetBean(Endpoint ep, Invocation epInv) { InvocationContext invCtx = epInv.getInvocationContext(); Object targetBean = invCtx.getTargetBean(); if (targetBean == null) { try { Class epImpl = ep.getTargetBeanClass(); targetBean = epImpl.newInstance(); invCtx.setTargetBean(targetBean); } catch (Exception ex) { throw new IllegalStateException("Canot get target bean instance", ex); } } return targetBean; }
protected Object getTargetBean(Endpoint ep, Invocation epInv) { InvocationContext invCtx = epInv.getInvocationContext(); Object targetBean = invCtx.getTargetBean(); if (targetBean == null) { try { Class epImpl = ep.getTargetBeanClass(); targetBean = epImpl.newInstance(); invCtx.setTargetBean(targetBean); } catch (Exception ex) { throw new IllegalStateException("Cannot get target bean instance", ex); } } return targetBean; }
protected Object getTargetBean(Endpoint ep, Invocation epInv) { InvocationContext invCtx = epInv.getInvocationContext(); Object targetBean = invCtx.getTargetBean(); if (targetBean == null) { try { Class epImpl = ep.getTargetBeanClass(); targetBean = epImpl.newInstance(); invCtx.setTargetBean(targetBean); } catch (Exception ex) { throw new IllegalStateException("Cannot get target bean instance", ex); } } return targetBean; }
protected Object getTargetBean(Endpoint ep, Invocation epInv) throws Exception { InvocationContext invCtx = epInv.getInvocationContext(); Object targetBean = invCtx.getTargetBean(); if (targetBean == null) { try { Class<?> epImpl = ep.getTargetBeanClass(); targetBean = epImpl.newInstance(); invCtx.setTargetBean(targetBean); } catch (Exception ex) { throw new IllegalStateException("Cannot get target bean instance", ex); } JavaxAnnotationHelper.callPostConstructMethod(targetBean, targetBean.getClass().getClassLoader()); ep.addAttachment(PreDestroyHolder.class, new PreDestroyHolder(targetBean)); } return targetBean; }
protected Object getTargetBean(Endpoint ep, Invocation epInv) throws Exception { InvocationContext invCtx = epInv.getInvocationContext(); Object targetBean = invCtx.getTargetBean(); if (targetBean == null) { try { Class<?> epImpl = ep.getTargetBeanClass(); targetBean = epImpl.newInstance(); invCtx.setTargetBean(targetBean); } catch (Exception ex) { throw new IllegalStateException("Cannot get target bean instance", ex); } JavaxAnnotationHelper.callPostConstructMethod(targetBean, targetBean.getClass().getClassLoader()); ep.addAttachment(PreDestroyHolder.class, new PreDestroyHolder(targetBean)); } return targetBean; }
protected Object getTargetBean(Endpoint ep, Invocation epInv) throws Exception { InvocationContext invCtx = epInv.getInvocationContext(); Object targetBean = invCtx.getTargetBean(); if (targetBean == null) { try { Class<?> epImpl = ep.getTargetBeanClass(); targetBean = epImpl.newInstance(); invCtx.setTargetBean(targetBean); } catch (Exception ex) { throw new IllegalStateException("Cannot get target bean instance", ex); } JavaxAnnotationHelper.callPostConstructMethod(targetBean, targetBean.getClass().getClassLoader()); ep.addAttachment(PreDestroyHolder.class, new PreDestroyHolder(targetBean)); } return targetBean; }
protected Object getTargetBean(Endpoint ep, Invocation epInv) throws Exception { InvocationContext invCtx = epInv.getInvocationContext(); Object targetBean = invCtx.getTargetBean(); if (targetBean == null) { try { Class<?> epImpl = ep.getTargetBeanClass(); targetBean = epImpl.newInstance(); invCtx.setTargetBean(targetBean); } catch (Exception ex) { throw new IllegalStateException("Cannot get target bean instance", ex); } JavaxAnnotationHelper.callPostConstructMethod(targetBean); ep.addAttachment(PreDestroyHolder.class, new PreDestroyHolder(targetBean)); } return targetBean; }
invCtx.setTargetBean(targetBean);
invCtx.setTargetBean(targetBean);
invCtx.setTargetBean(targetBean);
invCtx.setTargetBean(targetBean);
invCtx.setTargetBean(targetBean);
invCtx.setTargetBean(targetBean);
invCtx.setTargetBean(targetBean);
invCtx.setTargetBean(targetBean);
invCtx.setTargetBean(targetBean);
invCtx.setTargetBean(targetBean);
private Invocation createInvocation(InvocationHandler invHandler, Object serviceObject, Endpoint ep, Method m, Object[] paramArray) { Invocation inv = invHandler.createInvocation(); InvocationContext invContext = inv.getInvocationContext(); WebServiceContext wsCtx = new WebServiceContextImpl(null); invContext.addAttachment(WebServiceContext.class, wsCtx); invContext.setTargetBean(serviceObject); inv.setJavaMethod(m); inv.setArgs(paramArray); return inv; }
protected Invocation setupInvocation(Endpoint ep, EndpointInvocation epInv, InvocationContext invContext) throws Exception { CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext(); if (msgContext instanceof SOAPMessageContextJAXRPC) { invContext.addAttachment(javax.xml.rpc.handler.MessageContext.class, msgContext); } if (ServiceLifecycle.class.isAssignableFrom(ep.getTargetBeanClass()) && invContext instanceof ServletRequestContext) { ServletEndpointContext servletEndpointContext = new ServletEndpointContextImpl((ServletRequestContext)invContext); invContext.addAttachment(ServletEndpointContext.class, servletEndpointContext); } invContext.addAttachment(EndpointInvocation.class, epInv); Invocation wsInv = new DelegatingInvocation(); wsInv.setInvocationContext(invContext); wsInv.setJavaMethod(getImplMethod(endpoint, epInv)); wsInv.getInvocationContext().setTargetBean(getEndpointInstance()); return wsInv; }