added proxy
This commit is contained in:
parent
a894e23b23
commit
d62df31df1
|
@ -40,13 +40,16 @@ public class LegacyISPublisher implements Publisher{
|
||||||
AuthorizationProvider provider = container.configuration().authorizationProvider();
|
AuthorizationProvider provider = container.configuration().authorizationProvider();
|
||||||
for (String context : provider.getContexts())
|
for (String context : provider.getContexts())
|
||||||
try {
|
try {
|
||||||
|
logger.info("publishing container in context {}", context);
|
||||||
AuthorizedTasks.executeSafely(new Runnable() {
|
AuthorizedTasks.executeSafely(new Runnable() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
try {
|
try {
|
||||||
|
logger.info("(inside task)publishing container in context {}", context);
|
||||||
registry.getStubs().create(toXml(hostingNode), hostingNode.type().toString());
|
registry.getStubs().create(toXml(hostingNode), hostingNode.type().toString());
|
||||||
}catch (Exception e) {
|
}catch (Exception e) {
|
||||||
|
logger.error("error publishing container", e);
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -69,13 +72,16 @@ public class LegacyISPublisher implements Publisher{
|
||||||
AuthorizationProvider provider = application.container().configuration().authorizationProvider();
|
AuthorizationProvider provider = application.container().configuration().authorizationProvider();
|
||||||
for (String context : provider.getContexts())
|
for (String context : provider.getContexts())
|
||||||
try {
|
try {
|
||||||
|
logger.info("publishing application in context {}", context);
|
||||||
AuthorizedTasks.executeSafely(new Runnable() {
|
AuthorizedTasks.executeSafely(new Runnable() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
try {
|
try {
|
||||||
|
logger.info("(inside task)publishing application in context {}", context);
|
||||||
registry.getStubs().create(toXml(enpoint), enpoint.type().toString());
|
registry.getStubs().create(toXml(enpoint), enpoint.type().toString());
|
||||||
}catch (Exception e) {
|
}catch (Exception e) {
|
||||||
|
logger.error("erro publishing application", e);
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -48,11 +48,11 @@ public class ApplicationProfileBuilder {
|
||||||
endpoint.profile().endpoints().clear();
|
endpoint.profile().endpoints().clear();
|
||||||
|
|
||||||
String baseAddress;
|
String baseAddress;
|
||||||
if (configuration.proxied()){
|
if (configuration.proxied() && container.proxy()!=null){
|
||||||
String protocol = configuration.proxyAddress().getProtocol();
|
String protocol = container.proxy().getProtocol();
|
||||||
String port = configuration.proxyAddress().getPort()!=null?":"+configuration.proxyAddress().getPort():"";
|
String port = container.proxy().getPort()!=null?":"+container.proxy().getPort():"";
|
||||||
|
|
||||||
baseAddress=String.format("%s://%s%s%s", protocol , configuration.proxyAddress().getHostname(), port,context.application().getContextPath());
|
baseAddress=String.format("%s://%s%s%s", protocol , container.proxy().getHostname(), port,context.application().getContextPath());
|
||||||
} else {
|
} else {
|
||||||
String protocol = container.protocol();
|
String protocol = container.protocol();
|
||||||
int port = container.port();
|
int port = container.port();
|
||||||
|
|
Loading…
Reference in New Issue