本文整理了Java中org.jboss.wsf.spi.deployment.Endpoint.getTargetBeanClass()
方法的一些代码示例,展示了Endpoint.getTargetBeanClass()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Endpoint.getTargetBeanClass()
方法的具体详情如下:
包路径:org.jboss.wsf.spi.deployment.Endpoint
类名称:Endpoint
方法名:getTargetBeanClass
[英]Use the deployment classloader to load the bean
[中]使用部署类加载器加载bean
代码示例来源:origin: org.jboss.ws/jbossws-jboss501
/**
* Gets <b>WebContext</b> if associated with EJB endpoint.
*
* @param endpoint EJB webservice endpoint
* @return web context associated with EJB or null
*/
@SuppressWarnings(
{"unchecked"})
private WebContext getWebContextAnnotation(final Endpoint endpoint)
{
return (WebContext) endpoint.getTargetBeanClass().getAnnotation(WebContext.class);
}
代码示例来源:origin: org.jboss.ws/jbossws-jboss510
/**
* Gets <b>WebContext</b> if associated with EJB endpoint.
*
* @param endpoint EJB webservice endpoint
* @return web context associated with EJB or null
*/
@SuppressWarnings(
{"unchecked"})
private WebContext getWebContextAnnotation(final Endpoint endpoint)
{
return (WebContext) endpoint.getTargetBeanClass().getAnnotation(WebContext.class);
}
代码示例来源:origin: org.jboss.ws/jbossws-jboss600M2
/**
* Gets <b>WebContext</b> if associated with EJB endpoint.
*
* @param endpoint EJB webservice endpoint
* @return web context associated with EJB or null
*/
@SuppressWarnings(
{"unchecked"})
private WebContext getWebContextAnnotation(final Endpoint endpoint)
{
return (WebContext) endpoint.getTargetBeanClass().getAnnotation(WebContext.class);
}
代码示例来源:origin: org.jboss.ws/jbossws-jboss500Beta4
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;
}
代码示例来源:origin: org.jboss.ws/jbossws-jboss423x
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;
}
代码示例来源:origin: org.jboss.ws/jbossws-jboss421
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;
}
代码示例来源:origin: org.jboss.ws/jbossws-jboss500x
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;
}
代码示例来源:origin: org.jboss.ws/jbossws-jboss600x
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;
}
代码示例来源:origin: org.jboss.ws/jbossws-jboss501CR1
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;
}
代码示例来源:origin: org.jboss.ws/jbossws-jboss510x
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;
}
代码示例来源:origin: org.jboss.ws/jbossws-common
protected String getExplicitVirtualHost(final Deployment dep)
{
String virtualHost = null;
for (final Endpoint ep : dep.getService().getEndpoints())
{
final Class<?> implClass = ep.getTargetBeanClass();
final WebContext webContext = implClass.getAnnotation(WebContext.class);
if (hasVirtualHost(webContext))
{
final String currentVirtualHost = webContext.virtualHost().trim();
if (virtualHost == null)
{
virtualHost = currentVirtualHost;
}
else
{
if (!currentVirtualHost.equals(virtualHost))
{
throw Messages.MESSAGES.virtualHostMustBeTheSameForAllEndpoints(dep.getSimpleName());
}
}
}
}
return virtualHost;
}
代码示例来源:origin: org.jboss.ws/jbossws-jboss423
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;
}
代码示例来源:origin: org.jboss.ws/jbossws-jboss510x
Class epImpl = ep.getTargetBeanClass();
targetBean = epImpl.newInstance();
invCtx.setTargetBean(targetBean);
代码示例来源:origin: org.jboss.ws/jbossws-jboss500x
Class epImpl = ep.getTargetBeanClass();
targetBean = epImpl.newInstance();
invCtx.setTargetBean(targetBean);
代码示例来源:origin: org.jboss.ws/jbossws-jboss600x
Class epImpl = ep.getTargetBeanClass();
targetBean = epImpl.newInstance();
invCtx.setTargetBean(targetBean);
代码示例来源:origin: org.jboss.ws/jbossws-jboss423x
Class epImpl = ep.getTargetBeanClass();
targetBean = epImpl.newInstance();
invCtx.setTargetBean(targetBean);
代码示例来源:origin: org.jboss.ws/jbossws-framework
Class implClass = ep.getTargetBeanClass();
WebContext anWebContext = (WebContext)implClass.getAnnotation(WebContext.class);
this.validateSecuritySettings(anWebContext);
代码示例来源:origin: org.jboss.ws/jbossws-common
Class<?> implClass = ep.getTargetBeanClass();
WebContext anWebContext = implClass.getAnnotation(WebContext.class);
this.validateSecuritySettings(anWebContext);
代码示例来源:origin: org.jboss.ws.cxf/jbossws-cxf-server
public DDBeans build(Deployment dep)
{
final SOAPAddressRewriteMetadata sarm = dep.getAttachment(SOAPAddressRewriteMetadata.class);
Map<QName, String> serviceNameAddressMap = new HashMap<QName, String>();
Map<String, SOAPAddressWSDLParser> soapAddressWsdlParsers = new HashMap<String, SOAPAddressWSDLParser>();
DDBeans dd = new DDBeans();
for (Endpoint ep : dep.getService().getEndpoints())
{
DDEndpoint ddep = createDDEndpoint(ep.getTargetBeanClass(), (ArchiveDeployment)dep, ep);
if (ep instanceof HttpEndpoint)
{
ddep.setInvoker(JBossWSInvoker.class.getName());
}
processWSDDContribution(ddep, (ArchiveDeployment)dep);
URL wsdlLocation = getWsdlLocationURL(ddep, ((ArchiveDeployment)dep).getResourceResolver());
processAddressRewrite(ddep, wsdlLocation, sarm, soapAddressWsdlParsers);
METADATA_LOGGER.addingServiceEndpointMetadata(METADATA_LOGGER.isDebugEnabled() ? ddep.toStringExtended() : ddep.toString());
dd.addEndpoint(ddep);
serviceNameAddressMap.put(ddep.getServiceName(), ddep.getAddress());
}
dep.setProperty("ServiceAddressMap", serviceNameAddressMap);
return dd;
}
代码示例来源:origin: org.jboss.ws.native/jbossws-native-core
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;
}
内容来源于网络,如有侵权,请联系作者删除!