public Collection<BusinessInterfaceDescriptor<?>> getRemoteBusinessInterfaces() {
Set<BusinessInterfaceDescriptor<?>> remoteBusIntfs = new HashSet<BusinessInterfaceDescriptor<?>>();
if( ejbDesc.getType().equals(EjbSessionDescriptor.TYPE) ) {
EjbSessionDescriptor sessionDesc = (EjbSessionDescriptor) ejbDesc;
Set<String> remoteNames = sessionDesc.getRemoteBusinessClassNames();
// Add superinterfaces that are also marked as Local
//JJS: 4/2/13 Removing superinterfaces to track down cdi tck failures.
// http://java.net/jira/browse/GLASSFISH-19970
// Set<String> extraNames = new HashSet<String>();
// for(String local : remoteNames) {
// try {
// Class<?> remoteClass = sessionDesc.getEjbBundleDescriptor().getClassLoader().loadClass(local);
// addIfRemote(remoteClass.getInterfaces(), extraNames);
// } catch(ClassNotFoundException e) {
// throw new IllegalStateException(e);
// }
// }
//
// remoteNames.addAll(extraNames);
// Include the no-interface Local view
if( sessionDesc.isLocalBean() ) {
remoteNames.add(sessionDesc.getEjbClassName());
}
for(String remote : remoteNames) {
try {
Class<?> remoteClass = sessionDesc.getEjbBundleDescriptor().getClassLoader().loadClass(remote);
@SuppressWarnings({ "rawtypes", "unchecked" })
BusinessInterfaceDescriptor<?> busIntfDesc =
new BusinessInterfaceDescriptorImpl(remoteClass);
remoteBusIntfs.add(busIntfDesc);