private static Object getStub(NamingEndpoint namingEndpoint, InterfaceInfo ejbInterface) {
try {
stub = EJBObjectFactory.createStub(namingEndpoint, ejbInterface);
} catch (NamingException e) {
exception = new ServiceUnavailableException(e);
e.printStackTrace();
throw (ServiceUnavailableException)exception;
} catch (CreateException e) {
exception = new ServiceUnavailableException(e);
throw (ServiceUnavailableException)exception;
} catch (RemoteException e) {
exception = new ServiceRuntimeException(e);
throw (ServiceRuntimeException)exception;
}