@Inject @TestScoped
private InstanceProducer<TestResult> testResult;
public void execute(@Observes RemoteExecutionEvent event) throws Exception
{
Container container = this.container.get();
DeploymentDescription deployment = this.deployment.get();
ProtocolRegistry protoReg = protocolRegistry.get();
// if no default marked or specific protocol defined in the registry, use the DeployableContainers defaultProtocol.
ProtocolDefinition protocol = protoReg.getProtocol(deployment.getProtocol());
if(protocol == null)
{
protocol = protoReg.getProtocol(container.getDeployableContainer().getDefaultProtocol());
}
ProtocolConfiguration protocolConfiguration;
if(container.hasProtocolConfiguration(protocol.getProtocolDescription()))
{
protocolConfiguration = protocol.createProtocolConfiguration(
container.getProtocolConfiguration(protocol.getProtocolDescription()).getProtocolProperties());
}
else
{
protocolConfiguration = protocol.createProtocolConfiguration();
}