Examples of Exception


Examples of java.lang.Exception

    public void addConnectionFactory(String factoryName, String service, Map<String,String> params,
                                     boolean listener) throws Exception {

        if (getConnectionFactory(factoryName, null, listener) != null) {
            throw new Exception("A JMS connection factory already exists by the name " + factoryName);
        }

        removeDefaults(params);
        stub.addConnectionFactory(getParameter(factoryName, params), service, listener);
    }
View Full Code Here

Examples of java.lang.Exception

            client = stub._getServiceClient();
            option = client.getOptions();
            option.setManageSession(true);
            option.setProperty(HTTPConstants.COOKIE_STRING, authCookie);
        } else {
            throw new Exception("User not authenticated");
        }
    }
View Full Code Here

Examples of java.lang.Exception

                invalidateSession();
            }
        } catch (Exception e) {
            String msg = "Cannot restart the server." + e.getMessage();
            log.error(msg, e);
            throw new Exception(msg, e);
        }
        return result;
    }
View Full Code Here

Examples of java.lang.Exception

                invalidateSession();
            }
        } catch (Exception e) {
            String msg = "Cannot restart the server. " + e.getMessage();
            log.error(msg, e);
            throw new Exception(msg, e);
        }
        return result;
    }
View Full Code Here

Examples of java.lang.Exception

                invalidateSession();
            }
        } catch (RemoteException e) {
            String msg = "Cannot shutdown the server. "  + e.getMessage();
            log.error(msg, e);
            throw new Exception(msg, e);
        }
        return result;
    }
View Full Code Here

Examples of java.lang.Exception

                invalidateSession();
            }
        } catch (RemoteException e) {
            String msg = "Cannot shutdown the server. "  + e.getMessage();
            log.error(msg, e);
            throw new Exception(msg, e);
        }
        return result;
    }
View Full Code Here

Examples of java.lang.Exception

            result.setUserTimezone(original.getUserTimezone());
            result.setCarbonVersion(original.getCarbonVersion());
        } catch (RemoteException e) {
            String msg = "Cannot get server data. Backend service may be unavailable";
            log.error(msg, e);
            throw new Exception(msg, e);
        }
        return result;
    }
View Full Code Here

Examples of java.lang.Exception

    if (ontology==null) {
      try {
        ontology = OntologyFactory.getOntology();
      } catch (Exception e) {
        throw new Exception("Failed to instantiate ontology");
      }
    }

    //foreach sample file
    for (int i=0; i<sampleFiles.length; i++) {
View Full Code Here

Examples of java.lang.Exception

    if (ontology==null) {
      try {
        ontology = OntologyFactory.getOntology();
      } catch (Exception e) {
        throw new Exception("Failed to instantiate ontology");
      }
    }

    //foreach sample file
    for (int i=0; i<sampleFiles.length; i++) {
View Full Code Here

Examples of java.lang.Exception

            Application app = configManager.getExtensionDescriptor(
                     em.getName(), em.getLocation(), true);
            RoleMapper.removeRoleMapper(app.getRoleMapper().getName());
            appName = app.getRegistrationName();
        } catch (Exception ce) {
            throw new Exception(ce);
        }

        String contextRoot = null;
        ElementProperty ep = em.getElementPropertyByName("contextRoot");
        if(ep != null ){
            contextRoot = ep.getValue();
        } else {
            contextRoot = em.getName();
        }
             
        String virtualServers = null;
        try {
            virtualServers = configManager.getVirtualServers(em.getName());
        } catch(Exception ce) {
                 throw new Exception("Exception getting virtual servers by app name "
                    + appName, ce);
          
        }

        try {
            getWebContainer().unloadWebModule(contextRoot, appName,
                                         virtualServers, wbd);
            // XXX : Fix me
            return true;
        } catch (Exception ex) {
            _logger.log(Level.WARNING,"Exception thrown in the unload" + ex.toString());
            return false;
        } finally {
            try {
              Switch.getSwitch().getNamingManager().unbindObjects(wbd);
            } catch (javax.naming.NamingException nameEx) {
                throw new Exception("[WebExtensionLoader] "
                + " Exception during namingManager.unbindObject",
                nameEx);
            }
        }
        
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.