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; } }
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; } }
/** * * 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; } }