コード例 #1
0
 public int compare(Object o1, Object o2) {
   try {
     return ((UMOEvent) o1).getMessageAsString().compareTo(((UMOEvent) o2).getMessageAsString());
   } catch (UMOException e) {
     throw new IllegalArgumentException(e.getMessage());
   }
 }
コード例 #2
0
 public void testNoMethodSet() throws Exception {
   UMOImmutableEndpoint ep = new ImmutableMuleEndpoint("jnp://localhost/TestService", false);
   try {
     ep.send(getTestEvent("hello", ep));
   } catch (UMOException e) {
     assertTrue(e instanceof DispatchException);
     assertTrue(
         e.getMessage()
             .startsWith(Messages.get("rmi", RmiConnector.MSG_PARAM_SERVICE_METHOD_NOT_SET)));
   }
 }
コード例 #3
0
  public final synchronized void dispose() {
    // TODO lifecycleManager.checkPhase(Disposable.PHASE_NAME);

    if (isDisposed()) {
      return;
    }

    try {
      doDispose();
      lifecycleManager.firePhase(getManagementContext(), Disposable.PHASE_NAME);
      if (getParent() != null) {
        parent.dispose();
      } else {
        // remove this referenceonce there is no one else left to dispose
        RegistryContext.setRegistry(null);
      }
    } catch (UMOException e) {
      // TO-DO
      logger.error("Failed to cleanly dispose: " + e.getMessage(), e);
    }
  }