}
}
private static EJBEndpoint newEjbEndpoint(final PortComponentMetaData portComponentMD, final EEModuleDescription moduleDescription, final Set<String> securityRoles) {
final String ejbName = portComponentMD.getEjbLink();
final SessionBeanComponentDescription sessionBean = (SessionBeanComponentDescription)moduleDescription.getComponentByName(ejbName);
final String seiIfaceClassName = portComponentMD.getServiceEndpointInterface();
final EJBViewDescription ejbViewDescription = sessionBean.addWebserviceEndpointView(seiIfaceClassName);
// JSR 109 - Version 1.3 - 6.2.2.4 Security
// For EJB based service implementations, Handlers run after method level authorization has occurred.
// JSR 109 - Version 1.3 - 6.2.2.5 Transaction
// Handlers run under the transaction context of the component they are associated with.
sessionBean.getConfigurators().addLast(new JAXRPCHandlersConfigurator());
final ServiceName ejbViewName = ejbViewDescription.getServiceName();
return new EJBEndpoint(sessionBean, ejbViewName, securityRoles, null, false, null);
}