本文整理了Java中java.rmi.RemoteException.getMessage
方法的一些代码示例,展示了RemoteException.getMessage
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。RemoteException.getMessage
方法的具体详情如下:
包路径:java.rmi.RemoteException
类名称:RemoteException
方法名:getMessage
[英]Returns the detail message, including the message from the nested exception if there is one.
[中]返回详细信息,包括来自嵌套异常(如果存在)的消息。
代码示例来源:origin: apache/incubator-dubbo
@Override
protected <T> Runnable doExport(final T impl, Class<T> type, URL url) throws RpcException {
final RmiServiceExporter rmiServiceExporter = new RmiServiceExporter();
rmiServiceExporter.setRegistryPort(url.getPort());
rmiServiceExporter.setServiceName(url.getPath());
rmiServiceExporter.setServiceInterface(type);
rmiServiceExporter.setService(impl);
try {
rmiServiceExporter.afterPropertiesSet();
} catch (RemoteException e) {
throw new RpcException(e.getMessage(), e);
}
return new Runnable() {
@Override
public void run() {
try {
rmiServiceExporter.destroy();
} catch (Throwable e) {
logger.warn(e.getMessage(), e);
}
}
};
}
代码示例来源:origin: apache/incubator-dubbo
@Override
protected <T> Runnable doExport(final T impl, Class<T> type, URL url) throws RpcException {
final RmiServiceExporter rmiServiceExporter = new RmiServiceExporter();
rmiServiceExporter.setRegistryPort(url.getPort());
rmiServiceExporter.setServiceName(url.getPath());
rmiServiceExporter.setServiceInterface(type);
rmiServiceExporter.setService(impl);
try {
rmiServiceExporter.afterPropertiesSet();
} catch (RemoteException e) {
throw new RpcException(e.getMessage(), e);
}
return new Runnable() {
@Override
public void run() {
try {
rmiServiceExporter.destroy();
} catch (Throwable e) {
logger.warn(e.getMessage(), e);
}
}
};
}
代码示例来源:origin: net.sf.ehcache/ehcache
/**
* Returns a list of bound objects.
* <p>
* This should match the list of cachePeers i.e. they should always be bound
*
* @return a list of String representations of <code>RMICachePeer</code> objects
*/
protected String[] listBoundRMICachePeers() throws CacheException {
try {
return registry.list();
} catch (RemoteException e) {
throw new CacheException("Unable to list cache peers " + e.getMessage());
}
}
代码示例来源:origin: apache/cloudstack
if (s_logger.isInfoEnabled()) {
s_logger.info("Exception on remote execution, peer: " + pdu.getDestPeer() + ", iteration: " + i + ", exception message :" +
e.getMessage());
代码示例来源:origin: apache/felix
public void run() {
try {
rmiRegistry=LocateRegistry.createRegistry(port);
} catch (RemoteException e) {
ac.warning(e.getMessage()+"\n"+"Possibly some other framework already running, skipping RMI registry creation");
return;
}
}
};
代码示例来源:origin: org.apache.geronimo.ext.openejb/openejb-itests-client
private void dropTable(String drop) throws java.sql.SQLException {
try {
database.execute(drop);
} catch (RemoteException re){
if (re.detail != null && re.detail instanceof java.sql.SQLException) {
throw (java.sql.SQLException)re.detail;
} else {
throw new java.sql.SQLException("Unable to drop table: "+re.getMessage(), drop);
}
}
}
代码示例来源:origin: org.wso2.cep/org.wso2.cep.integration.common.clients
public String[] editConfiguration(ScenarioConfigurationDTO scenarioConfigurationDTO) throws RemoteException {
try {
return templateManagerAdminServiceStub.editConfiguration(scenarioConfigurationDTO);
} catch (RemoteException e) {
log.error("RemoteException", e);
throw new RemoteException(e.getMessage(), e);
}
}
代码示例来源:origin: org.wso2.das/org.wso2.das.integration.common.clients
public boolean deleteConfiguration(String domainName, String configurationName) throws RemoteException {
try {
return templateManagerAdminServiceStub.deleteConfiguration(domainName, configurationName);
} catch (RemoteException e) {
log.error("RemoteException", e);
throw new RemoteException(e.getMessage(), e);
}
}
代码示例来源:origin: org.apache.tomee/openejb-core
@AroundInvoke
public Object intercept(final InvocationContext ic) throws Exception {
try {
return super.intercept(ic);
} catch (final RemoteException re) {
throw new TransactionalException(re.getMessage(), new InvalidTransactionException(re.getMessage()));
}
}
代码示例来源:origin: org.wso2.esb/admin-clients
public VersionsBean getVersionsBean(String path)
throws RemoteException, ResourceAdminServiceExceptionException {
try {
return resourceAdminServiceStub.getVersionsBean(path);
} catch (RemoteException e) {
log.error("Get version bean fails: " + e.getMessage());
throw new RemoteException("Get version bean fails: ", e);
} catch (ResourceAdminServiceExceptionException e) {
log.error("Get version bean fails: " + e.getMessage());
throw new ResourceAdminServiceExceptionException("Get version bean fails: : ", e);
}
}
代码示例来源:origin: org.wso2.es/org.wso2.es.integration.common.clients
public VersionsBean getVersionsBean(String path)
throws RemoteException, ResourceAdminServiceExceptionException {
try {
return resourceAdminServiceStub.getVersionsBean(path);
} catch (RemoteException e) {
log.error("Get version bean fails: " + e.getMessage());
throw new RemoteException("Get version bean fails: ", e);
} catch (ResourceAdminServiceExceptionException e) {
log.error("Get version bean fails: " + e.getMessage());
throw new ResourceAdminServiceExceptionException("Get version bean fails: : ", e);
}
}
代码示例来源:origin: org.onehippo.cms7/hippo-repository-connector
public int getTransactionTimeout() throws XAException {
try {
return remote.getTransactionTimeout();
} catch (RemoteException ex) {
throw new XAException(ex.getMessage());
}
}
代码示例来源:origin: org.onehippo.cms7/hippo-repository-connector
public void end(Xid arg0, int arg1) throws XAException {
try {
remote.end(arg0, arg1);
} catch (RemoteException ex) {
throw new XAException(ex.getMessage());
}
}
代码示例来源:origin: org.onehippo.cms7/hippo-repository-connector
public void rollback(Xid arg0) throws XAException {
try {
remote.rollback(arg0);
} catch (RemoteException ex) {
throw new XAException(ex.getMessage());
}
}
代码示例来源:origin: org.apache.openejb/openejb-itests-client
public void test58_returnClassArray() {
try {
final Class[] expected = {boolean.class, byte.class, char.class, short.class, int.class, long.class, float.class, double.class};
final Class[] actual = ejbObject.returnClassArray(expected);
assertEquals(expected.length, actual.length);
for (int i = 0; i < expected.length; i++) {
assertEquals(expected[i], actual[i]);
}
} catch (final RemoteException e) {
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
代码示例来源:origin: org.apache.geronimo.ext.openejb/openejb-itests-client
public void test58_returnClassArray() {
try {
Class[] expected = {boolean.class, byte.class, char.class, short.class, int.class, long.class, float.class, double.class};
Class[] actual = ejbObject.returnClassArray(expected);
assertEquals(expected.length, actual.length);
for (int i = 0; i < expected.length; i++) {
assertEquals(expected[i], actual[i]);
}
} catch (RemoteException e) {
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}
代码示例来源:origin: org.apache.oodt/oodt-commons
public void unbind(String name) throws NamingException {
checkName(name);
Registry registry = getRegistry();
try {
registry.unbind(toRMIName(name));
} catch (NotBoundException ex) {
throw new NameNotFoundException(name + " not found in RMI registry " + registry);
} catch (RemoteException ex) {
throw new NamingException("Remote exception: " + ex.getMessage());
}
}
代码示例来源:origin: org.wso2.carbon.identity/org.wso2.carbon.um.ws.api
@Override
public String getAttributeName(String domainName, String claimURI)
throws org.wso2.carbon.user.api.UserStoreException {
try {
return stub.getAttributeNameFromDomain(domainName, claimURI);
} catch (RemoteException e) {
this.handleException(e.getMessage(), e);
} catch (RemoteClaimManagerServiceUserStoreExceptionException e) {
this.handleException(e.getMessage(), e);
}
return null;
}
代码示例来源:origin: org.wso2.carbon.identity/org.wso2.carbon.um.ws.api
@Override
public org.wso2.carbon.user.api.ClaimMapping[] getAllSupportClaimMappingsByDefault()
throws org.wso2.carbon.user.api.UserStoreException {
try {
return WSRealmUtil.convertToClaimMappings(stub.getAllSupportClaimMappingsByDefault());
} catch (RemoteException e) {
this.handleException(e.getMessage(), e);
} catch (RemoteClaimManagerServiceUserStoreExceptionException e) {
this.handleException(e.getMessage(), e);
}
return new ClaimMapping[0];
}
代码示例来源:origin: org.wso2.carbon.commons/org.wso2.carbon.um.ws.api
public org.wso2.carbon.user.api.ClaimMapping[] getAllClaimMappings()
throws org.wso2.carbon.user.api.UserStoreException {
try {
return WSRealmUtil.convertToClaimMappings(stub.getAllClaimMappings(null));
} catch (RemoteException e) {
this.handleException(e.getMessage(), e);
} catch (RemoteClaimManagerServiceUserStoreExceptionException e) {
this.handleException(e.getMessage(), e);
}
return new ClaimMapping[0];
}
内容来源于网络,如有侵权,请联系作者删除!