/**
  * Adds a {@link Service} to the deployment. This method must not be called after the container
  * has started
  */
 public <T extends Service> void addWeldService(Class<T> type, T service) {
   if (started) {
     throw WeldMessages.MESSAGES.cannotAddServicesAfterStart();
   }
   deployment.addWeldService(type, service);
 }
Пример #2
0
 /**
  * Adds a {@link Service} to the deployment. This method must not be called after the container
  * has started
  */
 public <T extends org.jboss.weld.bootstrap.api.Service> void addWeldService(
     Class<T> type, T service) {
   deployment.addWeldService(type, service);
 }