Search in sources :

Example 1 with MetadataImpl

use of org.jboss.weld.bootstrap.spi.helpers.MetadataImpl in project Payara by payara.

the class WeldDeployer method createProbeExtension.

private Metadata<Extension> createProbeExtension() {
    ProbeExtension probeExtension;
    Class<ProbeExtension> probeExtensionClass = ProbeExtension.class;
    try {
        if (System.getSecurityManager() != null) {
            probeExtension = AccessController.doPrivileged(NewInstanceAction.of(probeExtensionClass));
        } else {
            probeExtension = probeExtensionClass.newInstance();
        }
    } catch (Exception e) {
        throw new WeldException(e.getCause());
    }
    return new MetadataImpl<Extension>(probeExtension, "N/A");
}
Also used : WeldException(org.jboss.weld.exceptions.WeldException) MetadataImpl(org.jboss.weld.bootstrap.spi.helpers.MetadataImpl) ProbeExtension(org.jboss.weld.probe.ProbeExtension) DeploymentException(org.glassfish.deployment.common.DeploymentException) WeldException(org.jboss.weld.exceptions.WeldException)

Aggregations

DeploymentException (org.glassfish.deployment.common.DeploymentException)1 MetadataImpl (org.jboss.weld.bootstrap.spi.helpers.MetadataImpl)1 WeldException (org.jboss.weld.exceptions.WeldException)1 ProbeExtension (org.jboss.weld.probe.ProbeExtension)1