dam.setDeploymentAspects(aspects);
dam.deploy(dep);
// [JBWS-3441] hack - fallback JAXWS invocation handler for dynamically generated deployments
for (Endpoint ep : dep.getService().getEndpoints()) {
ep.setState(EndpointState.STOPPED);
ep.setInvocationHandler(new InvocationHandlerJAXWS());
ep.setState(EndpointState.STARTED);
}
} finally {
if (dep != null) {
dep.removeAttachment(ServiceTarget.class);