Skip to content

Commit

Permalink
DUBBO-521 调用SpringApplicationContext的refresh时出错
Browse files Browse the repository at this point in the history
  • Loading branch information
liangfei0201 committed Jul 26, 2012
1 parent c1c290e commit 526d684
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ public class ServiceConfig<T> extends AbstractServiceConfig {
private final List<Exporter<?>> exporters = new ArrayList<Exporter<?>>();

private transient boolean exported;
private transient boolean unexported;

private transient boolean unexported;

private transient boolean generic;

Expand All @@ -103,6 +103,14 @@ public URL toUrl() {
public List<URL> toUrls() {
return urls;
}

public boolean isExported() {
return exported;
}

public boolean isUnexported() {
return unexported;
}

public synchronized void export() {
if (provider != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ public void setBeanName(String name) {

public void onApplicationEvent(ApplicationEvent event) {
if (ContextRefreshedEvent.class.getName().equals(event.getClass().getName())) {
if (isDelay()) {
if (isDelay() && ! isExported() && ! isUnexported()) {
if (logger.isInfoEnabled()) {
logger.info("The service ready on spring started. service: " + getInterface());
}
Expand Down

0 comments on commit 526d684

Please sign in to comment.