Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SWITCHYARD-1981 Provide sensible names for internal camel routes #608

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,12 @@ private void applyConfiguration() {
timeout = DEFAULT_TIMEOUT;
}
getShutdownStrategy().setTimeout(timeout);

if (_domain.getName() != null) {
// Need to replace colons to make a valid ObjectName
setName(_domain.getName().toString().replace(':', '-'));
}

}

}
Original file line number Diff line number Diff line change
Expand Up @@ -117,16 +117,7 @@ public final void init(ServiceDomain appServiceDomain, List<Activator> activator
throw new IllegalArgumentException("null 'appServiceDomain' argument.");
}

// initialize deployment name
if (getConfig() != null) {
_name = getConfig().getQName();
if (_name == null) {
// initialize to composite name if config name is missing
if (getConfig().getComposite() != null) {
_name = getConfig().getComposite().getQName();
}
}
}
initName();

_serviceDomain = appServiceDomain;
_serviceDomain.setProperty(CLASSLOADER_PROPERTY, Classes.getTCCL());
Expand All @@ -139,6 +130,26 @@ public final void init(ServiceDomain appServiceDomain, List<Activator> activator
doInit(activators);
}

/**
* Initialises the deployment name.
*/
public final void initName() {
if (_name != null) {
return;
}

// initialize deployment name
if (getConfig() != null) {
_name = getConfig().getQName();
if (_name == null) {
// initialize to composite name if config name is missing
if (getConfig().getComposite() != null) {
_name = getConfig().getComposite().getQName();
}
}
}
}


/**
* This field is not available until after the deployment has been
Expand Down