Skip to content

Commit

Permalink
WELD-1978 Align Weld SE bootstrap API with 2.0.EDR1
Browse files Browse the repository at this point in the history
  • Loading branch information
mkouba committed Jul 9, 2015
1 parent df278ee commit c88c305
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
Expand Up @@ -446,6 +446,17 @@ public Weld property(String key, Object value) {
return this;
}

/**
* Set all the configuration properties.
*
* @param properties
* @return self
*/
public Weld properties(Map<String, Object> properties) {
this.properties.putAll(properties);
return this;
}

/**
* The {@link BeanBuilder#build()} is invoked automatically and the resulting bean is registered after all observers are notified.
*
Expand Down
Expand Up @@ -29,7 +29,6 @@
import org.jboss.weld.Container;
import org.jboss.weld.bootstrap.spi.BeanDeploymentArchive;
import org.jboss.weld.environment.se.logging.WeldSELogger;
import org.jboss.weld.exceptions.UnsupportedOperationException;
import org.jboss.weld.manager.BeanManagerImpl;
import org.jboss.weld.util.cache.ComputingCache;
import org.jboss.weld.util.cache.ComputingCacheBuilder;
Expand Down Expand Up @@ -118,14 +117,12 @@ public WeldContainer apply(String callerClassName) {

@Override
public boolean isInitialized() {
// TODO
throw new UnsupportedOperationException();
return !WeldContainer.getRunningContainerIds().isEmpty();
}

@Override
public CDI<Object> initialize(Map<String, Object> params) {
// TODO
throw new UnsupportedOperationException();
return new Weld().properties(params).initialize();
}

}

0 comments on commit c88c305

Please sign in to comment.