Skip to content
This repository has been archived by the owner on Mar 6, 2018. It is now read-only.

Commit

Permalink
ARQ-1230 @observe wanted object
Browse files Browse the repository at this point in the history
To avoid depending on ordering within a LifeCycle call, we should
rather depend on the creation of the object we're looking for.
  • Loading branch information
aslakknutsen committed Nov 30, 2012
1 parent 664cccf commit 6885e58
Showing 1 changed file with 2 additions and 7 deletions.
Expand Up @@ -18,12 +18,10 @@
package org.jboss.arquillian.seam2.configuration;

import org.jboss.arquillian.config.descriptor.api.ArquillianDescriptor;
import org.jboss.arquillian.core.api.Instance;
import org.jboss.arquillian.core.api.InstanceProducer;
import org.jboss.arquillian.core.api.annotation.ApplicationScoped;
import org.jboss.arquillian.core.api.annotation.Inject;
import org.jboss.arquillian.core.api.annotation.Observes;
import org.jboss.arquillian.test.spi.event.suite.BeforeSuite;

/**
*
Expand All @@ -34,16 +32,13 @@
*/
public class Seam2ConfigurationProducer
{
@Inject @ApplicationScoped
Instance<ArquillianDescriptor> descriptor;

@Inject @ApplicationScoped
InstanceProducer<Seam2Configuration> configurationProducer;

public void configure(@Observes BeforeSuite beforeSuiteEvent)
public void configure(@Observes ArquillianDescriptor descriptor)
{
ConfigurationImporter extractor = new ConfigurationImporter();
Seam2Configuration configuration = extractor.from(descriptor.get());
Seam2Configuration configuration = extractor.from(descriptor);
configurationProducer.set(configuration);
}

Expand Down

0 comments on commit 6885e58

Please sign in to comment.