throw new DefaultMuleException(CoreMessages.objectNotRegistered("Transformer", key));
protected void doBegin() throws TransactionException { if (txManager == null) { throw new IllegalStateException( CoreMessages.objectNotRegistered("javax.transaction.TransactionManager", "Transaction Manager").getMessage()); } try { synchronized (this) { transaction = txManager.getTransaction(); transaction.registerSynchronization(new ExternalTransaction(muleContext)); } } catch (Exception e) { throw new TransactionException(CoreMessages.cannotStartTransaction("XA"), e); } }
public void setAsText(String text) { Connector connector = muleContext.getRegistry().lookupConnector(text); if (connector == null) { throw new IllegalArgumentException(CoreMessages.objectNotRegistered("Connector", text).getMessage()); } setValue(connector); } }
protected void doBegin() throws TransactionException { if (txManager == null) { throw new IllegalStateException( CoreMessages.objectNotRegistered("javax.transaction.TransactionManager", "Transaction Manager").getMessage()); } try { txManager.setTransactionTimeout(getTimeoutInSeconds()); txManager.begin(); synchronized (this) { transaction = txManager.getTransaction(); } } catch (Exception e) { throw new TransactionException(CoreMessages.cannotStartTransaction("XA"), e); } }
public Transaction suspend() throws TransactionException { TransactionManager txManager = muleContext.getTransactionManager(); if (txManager == null) { throw new IllegalStateException( CoreMessages.objectNotRegistered("javax.transaction.TransactionManager", "Transaction Manager").getMessage()); } try { transaction = txManager.suspend(); } catch (SystemException e) { throw new TransactionException(e); } return transaction; }
public void resume() throws TransactionException { TransactionManager txManager = muleContext.getTransactionManager(); if (txManager == null) { throw new IllegalStateException( CoreMessages.objectNotRegistered("javax.transaction.TransactionManager", "Transaction Manager").getMessage()); } try { txManager.resume(transaction); } catch (InvalidTransactionException e) { throw new TransactionException(e); } catch (SystemException e) { throw new TransactionException(e); } }
/** * Dispatches an event asynchronously to a component * * @param componentName the name of the Mule components to dispatch to * @param message the message to send * @throws org.mule.api.MuleException if the dispatch fails or the components or * transfromers cannot be found * * <b>Deprecated from 3.6.0</b> - Only supported with Services. Sending message to remote flows is not supported. */ @Deprecated public void dispatchDirect(String componentName, MuleMessage message) throws MuleException { Service service = muleContext.getRegistry().lookupService(componentName); if (service == null) { throw new ServiceException(CoreMessages.objectNotRegistered("Service", componentName)); } InboundEndpoint endpoint = getDefaultClientEndpoint(service, message.getPayload(), false); MuleEvent event = new DefaultMuleEvent(message, endpoint, service); if (logger.isDebugEnabled()) { logger.debug("MuleClient dispatching event direct to: " + componentName + ". MuleEvent is: " + event); } service.dispatchEvent(event); }
if (service == null) throw new ServiceException(CoreMessages.objectNotRegistered("Service", componentName));
CoreMessages.objectNotRegistered( "Security Provider", sp), this);
if (connector == null) throw new TransportFactoryException(CoreMessages.objectNotRegistered("Connector", uriBuilder.getEndpoint().getConnectorName()));