Codota Logo
StartException
Code IndexAdd Codota to your IDE (free)

How to use
StartException
in
org.jboss.msc.service

Best Java code snippets using org.jboss.msc.service.StartException (Showing top 20 results out of 918)

Refine searchRefine arrow

  • InjectedValue
  • StartContext
  • ServiceController
  • Common ways to obtain StartException
private void myMethod () {
StartException s =
  • Codota IconThrowable cause;new StartException(cause)
  • Codota IconServiceController controller;controller.getStartException()
  • Codota IconString str;Throwable cause;new StartException(str, cause)
  • Smart code suggestions by Codota
}
origin: wildfly/wildfly

@Override
public final StartException couldNotCreateLogDirectory(final Path directory, final IOException e) {
  final StartException result = new StartException(String.format(getLoggingLocale(), couldNotCreateLogDirectory$str(), directory), e);
  final StackTraceElement[] st = result.getStackTrace();
  result.setStackTrace(Arrays.copyOfRange(st, 1, st.length));
  return result;
}
private static final String noPortListeningForProtocol = "WFLYUT0063: Could not find the port number listening for protocol %s";
origin: wildfly/wildfly

@Override
public void start(StartContext context) throws StartException {
  if (IIOPLogger.ROOT_LOGGER.isDebugEnabled()) {
    IIOPLogger.ROOT_LOGGER.debugf("Starting service %s", context.getController().getName().getCanonicalName());
    final SocketBinding socketBinding = iiopSocketBindingInjector.getOptionalValue();
    final SocketBinding sslSocketBinding = this.iiopSSLSocketBindingInjector.getOptionalValue();
      InetSocketAddress address = this.iiopSocketBindingInjector.getValue().getSocketAddress();
      properties.setProperty(ORBConstants.SERVER_HOST_PROPERTY, address.getAddress().getHostAddress());
      properties.setProperty(ORBConstants.SERVER_PORT_PROPERTY, String.valueOf(address.getPort()));
    ServiceTarget target = context.getChildTarget();
    CorbaServiceUtil.bindObject(target, "ORB", this.orb);
  } catch (Exception e) {
    throw new StartException(e);
origin: wildfly/wildfly

@Override
public void start(StartContext context) throws StartException {
  final AssociationService associationService = associationServiceInjectedValue.getValue();
  final Endpoint endpoint = endpointValue.getValue();
  Executor executor = executorService.getOptionalValue();
  if (executor != null) {
    associationService.setExecutor(executor);
  }
  RemoteEJBService remoteEJBService = RemoteEJBService.create(
    associationService.getAssociation(),
    remotingTransactionServiceInjectedValue.getValue()
  );
  remoteEJBService.serverUp();
  // Register an EJB channel open listener
  OpenListener channelOpenListener = remoteEJBService.getOpenListener();
  try {
    registration = endpoint.registerService(EJB_CHANNEL_NAME, channelOpenListener, this.channelCreationOptions);
  } catch (ServiceRegistrationException e) {
    throw new StartException(e);
  }
}
origin: wildfly/wildfly

public synchronized void start(StartContext context) throws StartException {
  try {
    final Context namingContext = new NamingContext(namingStore.getValue(), new Hashtable<String, Object>());
    remoteNamingService = new RemoteNamingService(namingContext);
    remoteNamingService.start(endpoint.getValue());
  } catch (Exception e) {
    throw new StartException("Failed to start remote naming service", e);
  }
}
origin: wildfly/wildfly

started = true;
preStart(context);
serverService.getValue().registerListener(this);
try {
  openListener = createOpenListener();
  HttpHandler handler = serverService.getValue().getRoot();
  for(HandlerWrapper wrapper : listenerHandlerWrappers) {
    handler = wrapper.wrap(handler);
    final InetSocketAddress socketAddress = binding.getValue().getSocketAddress();
    if (socketAddress != null)
      sb.append(" ").append(socketAddress);
    throw new StartException(sb.toString());
  } else {
    throw UndertowLogger.ROOT_LOGGER.couldNotStartListener(name, e);
};
getUndertowService().registerStatisticsListener(statisticsChangeListener);
final ServiceContainer container = context.getController().getServiceContainer();
this.stoppingWrapper = new HandlerWrapper() {
  @Override
origin: wildfly/wildfly

@Override
public void start(final StartContext context) throws StartException {
  if (this.startAsynchronously) {
    Runnable task = () -> {
      try {
        this.service.start(context);
        context.complete();
      } catch (StartException e) {
        context.failed(e);
      } catch (Throwable e) {
        context.failed(new StartException(e));
      }
    };
    try {
      this.executor.getValue().execute(task);
    } catch (RejectedExecutionException e) {
      task.run();
    } finally {
      context.asynchronous();
    }
  } else {
    this.service.start(context);
  }
}
origin: camunda/camunda-bpm-platform

ComponentView componentView = paComponentViewInjector.getOptionalValue();
if(componentView != null) {
 reference = componentView.createInstance();
 processApplication = (ProcessApplicationInterface) reference.getInstance();
} else {
 processApplication = noViewProcessApplication.getValue();
 referencedProcessEngines.add(value.getProcessEngineInjector().getValue());
context.getChildTarget().addService(serviceName, managedProcessApplication).install();
throw new StartException(e);
origin: wildfly/wildfly

  @Override
  public void run() {
    try {
      startContext();
      startContext.complete();
    } catch (Throwable e) {
      startContext.failed(new StartException(e));
    }
  }
});
origin: camunda/camunda-bpm-platform

public void start(final StartContext context) throws StartException {
 context.asynchronous();
 executorInjector.getValue().submit(new Runnable() {
  public void run() {
   try {
    performDeployment();
    context.complete();
   } catch (StartException e) {
    context.failed(e);
   } catch (Throwable e) {
    context.failed(new StartException(e));
   }
  }
 });
}
origin: org.jboss.eap/wildfly-webservices-server-integration

@Override
public void start(final StartContext ctx) throws StartException {
  WSLogger.ROOT_LOGGER.starting(name);
  try {
    wsctx = EndpointPublisherHelper.doPublishStep(hostInjector.getValue(), ctx.getChildTarget(), deploymentUnit);
  } catch (Exception e) {
    throw new StartException(e);
  }
}
origin: liveoak-io/liveoak

@Override
public void start(StartContext context) throws StartException {
  this.server = newServer();
  try {
    this.server.host(this.bindingInjector.getValue().getAddress());
    this.server.port(this.bindingInjector.getValue().getPort());
    this.server.pipelineConfigurator(this.pipelineConfiguratorInjector.getValue());
    this.server.start();
  } catch (Exception e) {
    context.failed(new StartException(e));
  }
}
origin: org.wildfly/wildfly-webservices-server-integration

@Override
public void start(final StartContext ctx) throws StartException {
  WSLogger.ROOT_LOGGER.starting(name);
  try {
    wsctxConsumer.accept(wsctx = EndpointPublisherHelper.doPublishStep(hostSupplier.get(), ctx.getChildTarget(), deploymentUnit));
  } catch (Exception e) {
    throw new StartException(e);
  }
}
origin: wildfly/wildfly

private static InstancesService putIfAbsent(ServiceRegistry registry, ServiceName name, ServiceBuilder builder) throws StartException {
  for (; ; ) {
    try {
      ServiceController sc = registry.getService(name);
      if (sc == null) {
        sc = builder.install();
      }
      return (InstancesService) sc.getService();
    } catch (DuplicateServiceException ignored) {
    } catch (Exception e) {
      throw new StartException(e);
    }
  }
}
origin: wildfly/wildfly

@Override
public void start(StartContext context) throws StartException {
  // Global configuration.
  final CoreEnvironmentBean coreEnvironmentBean = arjPropertyManager.getCoreEnvironmentBean();
  if(coreEnvironmentBean.getProcessImplementationClassName() == null) {
    UuidProcessId id = new UuidProcessId();
    coreEnvironmentBean.setProcessImplementation(id);
  }
  try {
    coreEnvironmentBean.setNodeIdentifier(nodeIdentifier);
  } catch (CoreEnvironmentBeanException e) {
    throw new StartException(e.getCause());
  }
  // Setup the socket process id if there is a binding
  SocketBinding binding = socketProcessBindingInjector.getOptionalValue();
  if(binding != null) {
    int port = binding.getPort();
    coreEnvironmentBean.setSocketProcessIdPort(port);
  }
}
origin: io.thorntail/arquillian

  @Override
  public void transition(ServiceController<?> controller, ServiceController.Transition transition) {
    if (transition.enters(ServiceController.State.START_FAILED)) {
      StartException exception = controller.getStartException();
      Throwable cause = exception.getCause();
      testableArchiveService.setError(cause);
    }
  }
});
origin: org.wildfly.core/wildfly-server

  public ModuleSpec getModuleSpec() throws ModuleLoadException {
    if (startException != null)
      throw new ModuleLoadException(startException.getCause());
    return moduleSpec;
  }
}
origin: wildfly/wildfly

@Override
public void start(StartContext context) throws StartException {
  ROOT_LOGGER.debugf("started DirectConnectionFactoryActivatorService %s", context.getController().getName());
  String aoClass = null;
    Connector cmd = mdr.getValue().getResourceAdapter(raId);
    if (cmd.getVersion() == Connector.Version.V_10) {
      throw ConnectorLogger.ROOT_LOGGER.adminObjectForJCA10(resourceAdapter, jndiName);
    activator.setCreateBinderService(false);
    activator.setBindInfo(bindInfo);
    ServiceTarget serviceTarget = context.getChildTarget();
    adminObjectServiceBuilder.setInitialMode(ServiceController.Mode.ACTIVE).install();
  } catch (Exception e) {
    throw new StartException(e);
origin: wildfly/wildfly

@Override
public void start(StartContext startContext) throws StartException {
  //todo: this is a bit of a hack, as the proxy handler may be wrapped by a request controller handler for graceful shutdown
  ProxyHandler proxyHandler = (ProxyHandler) (this.proxyHandler.getValue() instanceof GlobalRequestControllerHandler ? ((GlobalRequestControllerHandler)this.proxyHandler.getValue()).getNext() : this.proxyHandler.getValue());
  final LoadBalancingProxyClient client = (LoadBalancingProxyClient) proxyHandler.getProxyClient();
  try {
    SSLContext sslContext = this.sslContext.getOptionalValue();
    if (sslContext == null) {
      SecurityRealm securityRealm = this.securityRealm.getOptionalValue();
      if (securityRealm != null) {
        sslContext = securityRealm.getSSLContext();
      }
    }
    if (sslContext == null) {
      client.addHost(getUri(), instanceId, null, OptionMap.create(UndertowOptions.ENABLE_HTTP2, enableHttp2));
    } else {
      OptionMap.Builder builder = OptionMap.builder();
      builder.set(Options.USE_DIRECT_BUFFERS, true);
      OptionMap combined = builder.getMap();
      XnioSsl xnioSsl = new UndertowXnioSsl(Xnio.getInstance(), combined, sslContext);
      client.addHost(getUri(), instanceId, xnioSsl, OptionMap.create(UndertowOptions.ENABLE_HTTP2, enableHttp2));
    }
  } catch (URISyntaxException e) {
    throw new StartException(e);
  }
}
origin: wildfly/wildfly

/**
 * Creates a new NamingServer and sets the naming context to use the naming server.
 *
 * @param context The start context
 * @throws StartException If any errors occur setting up the naming server
 */
public void start(StartContext context) throws StartException {
  ROOT_LOGGER.startingService();
  try {
    NamingContext.setActiveNamingStore(namingStore.getValue());
  } catch (Throwable t) {
    throw new StartException(NamingLogger.ROOT_LOGGER.failedToStart("naming service"), t);
  }
}
origin: wildfly/wildfly

  addCallbacks(false);
  ServiceRegistry registry = context.getController().getServiceContainer();
  InstancesService.addInstance(registry, context.getChildTarget(), getLifecycleState(), getBean());
  final BeanMetaDataConfig beanConfig = getBeanConfig();
  final ServiceName name = BeanMetaDataConfig.toBeanName(beanConfig.getName(), next);
  final ServiceTarget serviceTarget = context.getChildTarget();
  final ServiceBuilder serviceBuilder = serviceTarget.addService(name, nextPhase);
  registerAliases(serviceBuilder, next);
throw new StartException(t);
org.jboss.msc.serviceStartException

Javadoc

A start exception, thrown when a service fails to start.

Most used methods

  • <init>
    Constructs a StartException with the specified cause. The detail message is set to:(cause == null ?
  • getStackTrace
  • setStackTrace
  • getCause
  • toString
  • printStackTrace
  • getLocalizedMessage
  • getMessage

Popular in Java

  • Parsing JSON documents to java classes using gson
  • onRequestPermissionsResult (Fragment)
  • getSystemService (Context)
  • setContentView (Activity)
  • NumberFormat (java.text)
    The abstract base class for all number formats. This class provides the interface for formatting and
  • Collection (java.util)
    Collection is the root of the collection hierarchy. It defines operations on data collections and t
  • Executor (java.util.concurrent)
    An object that executes submitted Runnable tasks. This interface provides a way of decoupling task s
  • JPanel (javax.swing)
  • XPath (javax.xml.xpath)
    XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now