// Use the virtual hosts from @WebContext.virtualHosts
for (Endpoint ep : dep.getService().getEndpoints())
{
Class implClass = ep.getTargetBeanClass();
WebContext anWebContext = (WebContext)implClass.getAnnotation(WebContext.class);
if (anWebContext != null && anWebContext.virtualHosts() != null && anWebContext.virtualHosts().length > 0)
{
String[] anVirtualHosts = anWebContext.virtualHosts();
// Avoid modifying the annotation values.
String[] temp = new String[anVirtualHosts.length];
System.arraycopy(anVirtualHosts, 0, temp, 0, anVirtualHosts.length);