private ServiceException createServiceException(String message) { ServiceException ex = new ServiceException(); ex.setMessage(message); return ex; }
private Object[] getObjectArrayFromHeader(Object header) { if (header instanceof Object[]) return (Object []) header; else if (header instanceof List) return ((List) header).toArray(); else if (header == null) return null; ServiceException se = new ServiceException(); se.setMessage("Invalid header: " + header + " in message. expected array or list and found: " + header.getClass().getName()); throw se; }
private Object[] getObjectArrayFromHeader(Object header) { if (header instanceof Object[]) return (Object []) header; else if (header instanceof List) return ((List) header).toArray(); else if (header == null) return null; ServiceException se = new ServiceException(); se.setMessage("Invalid header: " + header + " in message. expected array or list and found: " + header.getClass().getName()); throw se; }
private Object[] getObjectArrayFromHeader(Object header) { if (header instanceof Object[]) return (Object []) header; else if (header instanceof List) return ((List) header).toArray(); else if (header == null) return null; ServiceException se = new ServiceException(); se.setMessage("Invalid header: " + header + " in message. expected array or list and found: " + header.getClass().getName()); throw se; }
private ServiceException createServiceException(String message) { ServiceException ex = new ServiceException(); ex.setMessage(message); return ex; }
private Subtopic testProducerSubtopic(String subtopicSeparator, String subtopicString) { Subtopic subtopic = new Subtopic(subtopicString, subtopicSeparator); if (subtopic.containsSubtopicWildcard()) { ServiceException se = new ServiceException(); se.setMessage(10556, new Object[] {subtopicString}); throw se; } return subtopic; }
private Subtopic testProducerSubtopic(String subtopicSeparator, String subtopicString) { Subtopic subtopic = new Subtopic(subtopicString, subtopicSeparator); if (subtopic.containsSubtopicWildcard()) { ServiceException se = new ServiceException(); se.setMessage(10556, new Object[] {subtopicString}); throw se; } return subtopic; }
private void testProducerSubtopic(MessageDestination dest, String subtopicString) { if ((subtopicString != null) && (subtopicString.length() > 0)) { Subtopic subtopic = new Subtopic(subtopicString, dest.getServerSettings().getSubtopicSeparator()); if (subtopic.containsSubtopicWildcard()) { ServiceException se = new ServiceException(); se.setMessage(10556, new Object[] {subtopicString}); throw se; } } }
public Object lookup() { ApplicationContext appContext = WebApplicationContextUtils.getWebApplicationContext(flex.messaging.FlexContext.getServletConfig().getServletContext()); String beanName = getSource(); try { return appContext.getBean(beanName); } catch (NoSuchBeanDefinitionException nexc) { ServiceException e = new ServiceException(); String msg = "Spring service named '" + beanName + "' does not exist."; e.setMessage(msg); e.setRootCause(nexc); e.setDetails(msg); e.setCode("Server.Processing"); throw e; } catch (BeansException bexc) { ServiceException e = new ServiceException(); String msg = "Unable to create Spring service named '" + beanName + "' "; e.setMessage(msg); e.setRootCause(bexc); e.setDetails(msg); e.setCode("Server.Processing"); throw e; } }
public Object lookup() { ApplicationContext appContext = WebApplicationContextUtils.getWebApplicationContext(flex.messaging.FlexContext.getServletConfig().getServletContext()); String beanName = getSource(); try { return appContext.getBean(beanName); } catch (NoSuchBeanDefinitionException nexc) { ServiceException e = new ServiceException(); String msg = "Spring service named '" + beanName + "' does not exist."; e.setMessage(msg); e.setRootCause(nexc); e.setDetails(msg); e.setCode("Server.Processing"); throw e; } catch (BeansException bexc) { ServiceException e = new ServiceException(); String msg = "Unable to create Spring service named '" + beanName + "' "; e.setMessage(msg); e.setRootCause(bexc); e.setDetails(msg); e.setCode("Server.Processing"); throw e; } }
se.setMessage(SUBTOPICS_NOT_SUPPORTED, new Object[] {subtopicString, destination.getId()}); throw se; se.setMessage(10558, new Object[] {subtopicString}); throw se;
public Object lookup() { ApplicationContext appContext = WebApplicationContextUtils.getWebApplicationContext(flex.messaging.FlexContext.getServletConfig().getServletContext()); String beanName = getSource(); try { return appContext.getBean(beanName); } catch (NoSuchBeanDefinitionException nexc) { ServiceException e = new ServiceException(); String msg = "Spring service named '" + beanName + "' does not exist."; e.setMessage(msg); e.setRootCause(nexc); e.setDetails(msg); e.setCode("Server.Processing"); throw e; } catch (BeansException bexc) { ServiceException e = new ServiceException(); String msg = "Unable to create Spring service named '" + beanName + "' "; e.setMessage(msg); e.setRootCause(bexc); e.setDetails(msg); e.setCode("Server.Processing"); throw e; } }
/** * * Tests a selector in an attempt to avoid runtime errors that we could catch at startup. * * @param selectorExpression The expression to test. * @param msg A test message. */ private void testSelector(String selectorExpression, Message msg) { try { JMSSelector selector = new JMSSelector(selectorExpression); selector.match(msg); } catch (Exception e) { ServiceException se = new ServiceException(); se.setMessage(BAD_SELECTOR, new Object[] {selectorExpression}); se.setRootCause(e); throw se; } }
/** * @exclude * Tests a selector in an attempt to avoid runtime errors that we could catch at startup. * * @param selectorExpression The expression to test. * @param msg A test message. */ private void testSelector(String selectorExpression, Message msg) { try { JMSSelector selector = new JMSSelector(selectorExpression); selector.match(msg); } catch (Exception e) { ServiceException se = new ServiceException(); se.setMessage(BAD_SELECTOR, new Object[] {selectorExpression}); se.setRootCause(e); throw se; } }
/** * * Tests a selector in an attempt to avoid runtime errors that we could catch at startup. * * @param selectorExpression The expression to test. * @param msg A test message. */ private void testSelector(String selectorExpression, Message msg) { try { JMSSelector selector = new JMSSelector(selectorExpression); selector.match(msg); } catch (Exception e) { ServiceException se = new ServiceException(); se.setMessage(BAD_SELECTOR, new Object[] {selectorExpression}); se.setRootCause(e); throw se; } }
se.setMessage(SUBTOPICS_NOT_SUPPORTED, new Object[] {subtopic.getValue(), destination.getId()}); throw se; se.setMessage(10558, new Object[] {subtopic.getValue()}); throw se;
se.setMessage(SUBTOPICS_NOT_SUPPORTED, new Object[] {subtopic.getValue(), destination.getId()}); throw se; se.setMessage(10558, new Object[] {subtopic.getValue()}); throw se;
e.setMessage(INVALID_CLASS_FOUND, new Object[] { factoryInstance.getAttributeId(), "session", e.setMessage(SESSION_NOT_FOUND, new Object[] {factoryInstance.getId()}); e.setCode("Server.Processing"); throw e;
e.setMessage(UNKNOWN_MESSAGE_TYPE, new Object[]{"HTTPProxy", "HTTPMessage"}); throw e;
e.setMessage(UNKNOWN_MESSAGE_TYPE, new Object[]{"HTTPProxy", "HTTPMessage"}); throw e;