List of usage examples for java.rmi RemoteException RemoteException
public RemoteException(String s)
From source file:gov.nih.nci.cagrid.identifiers.service.IdentifiersNAServiceImpl.java
/****** * This method is used to get the data associated with an identifier. This * method is a non authentication oriented operation. * /*from w w w. j ava 2s .co m*/ * @param identifier * @return Identifier data. * @throws RemoteException * @throws gov.nih.nci.cagrid.identifiers.stubs.types.NamingAuthorityConfigurationFault * @throws gov.nih.nci.cagrid.identifiers.stubs.types.InvalidIdentifierFault * @throws gov.nih.nci.cagrid.identifiers.stubs.types.NamingAuthoritySecurityFault */ public namingauthority.IdentifierData resolveIdentifier(java.lang.String identifier) throws RemoteException, gov.nih.nci.cagrid.identifiers.stubs.types.NamingAuthorityConfigurationFault, gov.nih.nci.cagrid.identifiers.stubs.types.InvalidIdentifierFault, gov.nih.nci.cagrid.identifiers.stubs.types.NamingAuthoritySecurityFault { try { LOG.info("resolveIdentifier: USER=========[" + SecurityManager.getManager().getCaller() + "]"); SecurityInfo secInfo = new SecurityInfoImpl(SecurityManager.getManager().getCaller()); return IdentifiersNAUtil.map(namingAuthority.resolveIdentifier(secInfo, URI.create(identifier))); } catch (InvalidIdentifierException e) { e.printStackTrace(); throw IdentifiersNAUtil.map(e); } catch (NamingAuthorityConfigurationException e) { e.printStackTrace(); throw IdentifiersNAUtil.map(e); } catch (NamingAuthoritySecurityException e) { e.printStackTrace(); throw IdentifiersNAUtil.map(e); } catch (Exception e) { e.printStackTrace(); throw new RemoteException(e.toString()); } }
From source file:com.octo.captcha.j2ee.rpc.ImageCaptchaWebServiceEndpoint.java
/** * @see com.octo.captcha.j2ee.ImageCaptchaService#verifyResponseToACaptchaChallenge(java.lang.String, java.lang.String) * * @param theCaptchaID the unique ID associated with the captcha * @param theResponse the client response to the captcha challenge * @return true is the response is correct, false otherwise * @throws RemoteException @TODO DOCUMENT ME ! *///from ww w.j a v a 2 s . c o m public boolean verifyResponseToACaptchaChallenge(String theCaptchaID, String theResponse) throws RemoteException { boolean returnValue = false; try { returnValue = this.imageCaptchaService.verifyResponseToACaptchaChallenge(theCaptchaID, theResponse); } catch (ImageCaptchaServiceException e) { if (e.getDetail() == ImageCaptchaServiceException.NO_CAPTCHA_WITH_THIS_ID_ERROR) { // route the exception to the end user throw new RemoteException(e.getMessage()); } else { // log a message to the service endpoint operator log.error(e.getMessage()); // returns a generic exception to the end user throw new RemoteException("Service is temporarily unavailable." + " Please try again later."); } } return returnValue; }
From source file:net.sf.ehcache.distribution.jgroups.JGroupManager.java
/** * {@inheritDoc}//from w ww . j av a 2 s . c o m */ public void send(List eventMessages) throws RemoteException { if (eventMessages.size() == 1) { bus.sendNotification(wrapMessage((JGroupEventMessage) eventMessages.get(0))); return; } ArrayList msg = new ArrayList(); for (Iterator iter = eventMessages.iterator(); iter.hasNext();) { JGroupEventMessage m = (JGroupEventMessage) iter.next(); msg.add(wrapMessage(m)); } try { bus.sendNotification(msg); } catch (Throwable t) { throw new RemoteException(t.getMessage()); } }
From source file:edu.northwestern.bioinformatics.studycalendar.grid.PSCStudyService.java
@Transactional(readOnly = false) public edu.northwestern.bioinformatics.studycalendar.grid.Study createStudy( edu.northwestern.bioinformatics.studycalendar.grid.Study gridStudy) throws RemoteException, StudyCreationException { if (gridStudy == null) { String message = "method parameter is null"; logger.error(message);//w w w . ja v a2s . c om StudyCreationException studyCreationException = new StudyCreationException(); studyCreationException.setFaultString(message); studyCreationException.setFaultReason(message); throw studyCreationException; } StringWriter studyXml = new StringWriter(); String studyDocumentXml = ""; try { Utils.serializeObject(gridStudy, new javax.xml.namespace.QName("http://bioinformatics.northwestern.edu/ns/psc", "study", XMLConstants.W3C_XML_SCHEMA_NS_URI), studyXml); logger.info("study xml:" + studyXml.toString()); studyDocumentXml = studyXml.getBuffer().toString(); ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(studyDocumentXml.getBytes()); studyXMLReader.readAndSave(byteArrayInputStream); } catch (StudyCalendarValidationException exception) { String message = "error while importing the study:studyXml-" + studyDocumentXml + " exception message:" + exception.getMessage(); logger.error(message); StudyCreationException studyCreationException = new StudyCreationException(); studyCreationException.setFaultString(message); studyCreationException.setFaultReason(message); throw studyCreationException; } catch (Exception e) { String message = "error while importing the study:assigned_identifier=" + gridStudy.getAssignedIdentifier() + " exception message:" + e.getMessage(); logger.error(message); throw new RemoteException(message); } return null; }
From source file:edu.clemson.cs.nestbed.server.management.configuration.ProgramProfilingSymbolManagerImpl.java
public void deleteProfilingSymbolWithID(int programSymbolID) throws RemoteException { log.info("Request to delete ProgramProfilingSymbol with " + "programSymbolID: " + programSymbolID); try {/*from w w w. j ava2 s .co m*/ List<ProgramProfilingSymbol> list; list = new ArrayList<ProgramProfilingSymbol>(progProfSymbols.values()); for (ProgramProfilingSymbol i : list) { if (i.getProgramSymbolID() == programSymbolID) { deleteProfilingSymbol(i.getID()); } } } catch (RemoteException ex) { throw ex; } catch (Exception ex) { log.error("Exception in deleteProfilingSymbolWithID"); RemoteException rex = new RemoteException(ex.toString()); rex.initCause(ex); throw rex; } }
From source file:com.fluidops.iwb.api.APIImpl.java
@Override public void deleteFromSource(String source) throws RemoteException { ReadWriteDataManager dm = null;//w ww .j a v a 2s. co m URI sourceURI = null; if (source != null) { sourceURI = getNamespaceService().parseURI(source); if (sourceURI == null) throw new RemoteException("Parsing of source URI failed."); } dm = ReadWriteDataManagerImpl.openDataManager(Global.repository); dm.deleteExpiredContextsOfSource(sourceURI, null, null, null); dm.close(); }
From source file:gov.nih.nci.cagrid.identifiers.service.IdentifiersNAServiceImpl.java
/**** * This method is used to register GSID in to the database of the GSID. This * method is an authentication oriented operation. * /* w w w . j a v a 2s.c o m*/ * @param suggestedIdentifier * is an optional parameter (can be null) which is used to * register an non existing identifier. If the identifier already * exists then new identifier is generated and returned. * @param parentIdentifiers * is an array of identifiers which are already registered and * exists in the database. * @return registered identifier. * @throws RemoteException * @throws gov.nih.nci.cagrid.identifiers.stubs.types.NamingAuthorityConfigurationFault * @throws gov.nih.nci.cagrid.identifiers.stubs.types.InvalidIdentifierValuesFault * @throws gov.nih.nci.cagrid.identifiers.stubs.types.InvalidIdentifierFault * @throws gov.nih.nci.cagrid.identifiers.stubs.types.NamingAuthoritySecurityFault */ public java.lang.String registerGSID(java.lang.String suggestedIdentifier, java.lang.String[] parentIdentifiers) throws RemoteException, gov.nih.nci.cagrid.identifiers.stubs.types.NamingAuthorityConfigurationFault, gov.nih.nci.cagrid.identifiers.stubs.types.InvalidIdentifierValuesFault, gov.nih.nci.cagrid.identifiers.stubs.types.InvalidIdentifierFault, gov.nih.nci.cagrid.identifiers.stubs.types.NamingAuthoritySecurityFault { LOG.info("registerGSID: USER=========[" + SecurityManager.getManager().getCaller() + "]"); SecurityInfo secInfo = new SecurityInfoImpl(SecurityManager.getManager().getCaller()); try { return namingAuthority.registerGSID(secInfo, suggestedIdentifier, parentIdentifiers); } catch (NamingAuthorityConfigurationException e) { e.printStackTrace(); throw IdentifiersNAUtil.map(e); } catch (InvalidIdentifierException e) { e.printStackTrace(); throw IdentifiersNAUtil.map(e); } catch (NamingAuthoritySecurityException e) { e.printStackTrace(); throw IdentifiersNAUtil.map(e); } catch (InvalidIdentifierValuesException e) { e.printStackTrace(); throw IdentifiersNAUtil.map(e); } catch (Exception e) { e.printStackTrace(); throw new RemoteException(e.toString()); } }
From source file:edu.clemson.cs.nestbed.server.management.configuration.ProgramProfilingSymbolManagerImpl.java
public void deleteProfilingSymbolWithProjectDepConfID(int pdcID) throws RemoteException { log.info("Request to delete ProgramProfilingSymbol with " + "projectDeploymentConfigurationID: " + pdcID); try {/*from w w w.ja v a 2 s . c om*/ List<ProgramProfilingSymbol> list; list = new ArrayList<ProgramProfilingSymbol>(progProfSymbols.values()); for (ProgramProfilingSymbol i : list) { if (i.getProjectDeploymentConfigurationID() == pdcID) { deleteProfilingSymbol(i.getID()); } } } catch (RemoteException ex) { throw ex; } catch (Exception ex) { log.error("Exception in deleteProfilingSymbolWithID"); RemoteException rex = new RemoteException(ex.toString()); rex.initCause(ex); throw rex; } }
From source file:com.fluidops.iwb.api.APIImpl.java
@Override public void deleteFromGroup(String group) throws RemoteException { ReadWriteDataManager dm = null;/* ww w . j a va2 s .com*/ URI groupURI = null; if (group != null) { groupURI = getNamespaceService().parseURI(group); if (groupURI == null) throw new RemoteException("Parsing of group URI failed."); } dm = ReadWriteDataManagerImpl.openDataManager(Global.repository); dm.deleteExpiredContextsOfGroup(groupURI, null, null); dm.close(); }