Skip to content

Commit

Permalink
Revert "Payara blue merge prior to release 163" (#1030)
Browse files Browse the repository at this point in the history
  • Loading branch information
smillidge authored Aug 13, 2016
1 parent 45cf3ef commit 77eb91a
Show file tree
Hide file tree
Showing 37 changed files with 553 additions and 1,722 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
mapPut(map="#{pageSession.valueMap}" key="dynamic" value="#{pageSession.dynamic}");
mapPut(map="#{pageSession.valueMap}" key="notifierDynamic" value="#{pageSession.notifierDynamic}");
prepareSuccessfulMsg();
gf.updateEntity(endpoint="#{sessionScope.REST_URL}/set-notification-configuration" attrs="#{pageSession.valueMap}" convertToFalse="#{pageSession.convertToFalseList}");
gf.updateEntity(endpoint="#{sessionScope.REST_URL}/set-notification" attrs="#{pageSession.valueMap}" convertToFalse="#{pageSession.convertToFalseList}");
/>
</sun:button>
</sun:panelGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
mapPut(map="#{pageSession.valueMap}" key="dynamic" value="#{pageSession.dynamic}");
mapPut(map="#{pageSession.valueMap}" key="notifierDynamic" value="#{pageSession.notifierDynamic}");
prepareSuccessfulMsg();
gf.updateEntity(endpoint="#{sessionScope.REST_URL}/set-requesttracing-configuration" attrs="#{pageSession.valueMap}" convertToFalse="#{pageSession.convertToFalseList}");
gf.updateEntity(endpoint="#{sessionScope.REST_URL}/set-requesttracing" attrs="#{pageSession.valueMap}" convertToFalse="#{pageSession.convertToFalseList}");
/>
</sun:button>
</sun:panelGroup>
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ and Distribution License("CDDL") (collectively, the "License"). You
import com.sun.enterprise.config.serverbeans.Domain;
import com.sun.enterprise.util.ColumnFormatter;
import com.sun.enterprise.util.StringUtils;
import com.sun.enterprise.util.SystemPropertyConstants;
import fish.payara.jmx.monitoring.configuration.MonitoringServiceConfiguration;
import javax.inject.Inject;
import org.glassfish.api.ActionReport;
Expand Down Expand Up @@ -47,7 +46,7 @@ and Distribution License("CDDL") (collectively, the "License"). You
@CommandLock(CommandLock.LockType.NONE)
@I18n("get.monitoring.configuration")
@ExecuteOn(value = {RuntimeType.DAS})
@TargetType(value = {CommandTarget.DAS, CommandTarget.STANDALONE_INSTANCE, CommandTarget.CLUSTER, CommandTarget.CLUSTERED_INSTANCE, CommandTarget.CONFIG})
@TargetType(value = {CommandTarget.DAS, CommandTarget.STANDALONE_INSTANCE, CommandTarget.CLUSTER})
@RestEndpoints({
@RestEndpoint(configBean = Domain.class,
opType = RestEndpoint.OpType.GET,
Expand All @@ -64,7 +63,7 @@ public class GetMonitoringConfiguration implements AdminCommand {
@Param(name = "pretty", defaultValue = "false", optional = true)
private Boolean pretty;

@Param(name = "target", defaultValue = SystemPropertyConstants.DAS_SERVER_NAME, optional = true)
@Param(name = "target", defaultValue = "server", optional = true)
private String target;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,7 @@ and Distribution License("CDDL") (collectively, the "License"). You
import org.glassfish.api.admin.AdminCommand;
import org.glassfish.api.admin.AdminCommandContext;
import org.glassfish.api.admin.CommandLock;
import org.glassfish.api.admin.CommandRunner;
import org.glassfish.api.admin.ExecuteOn;
import org.glassfish.api.admin.ParameterMap;
import org.glassfish.api.admin.RestEndpoint;
import org.glassfish.api.admin.RestEndpoints;
import org.glassfish.api.admin.RuntimeType;
Expand All @@ -54,8 +52,8 @@ and Distribution License("CDDL") (collectively, the "License"). You
@PerLookup
@CommandLock(CommandLock.LockType.NONE)
@I18n("set.monitoring.configuration")
@ExecuteOn(RuntimeType.DAS)
@TargetType(value = {CommandTarget.DAS, CommandTarget.STANDALONE_INSTANCE, CommandTarget.CLUSTER, CommandTarget.CLUSTERED_INSTANCE, CommandTarget.CONFIG})
@ExecuteOn(RuntimeType.INSTANCE)
@TargetType(value = {CommandTarget.DAS, CommandTarget.STANDALONE_INSTANCE, CommandTarget.CLUSTER})
@RestEndpoints({
@RestEndpoint(configBean = Domain.class,
opType = RestEndpoint.OpType.GET,
Expand All @@ -65,7 +63,7 @@ and Distribution License("CDDL") (collectively, the "License"). You
public class SetMonitoringConfiguration implements AdminCommand {

@Inject
ServiceLocator serviceLocator;
ServiceLocator habitat;

@Inject
protected Target targetUtil;
Expand Down Expand Up @@ -102,7 +100,7 @@ public void execute(AdminCommandContext context) {
final ActionReport actionReport = context.getActionReport();
Config config = targetUtil.getConfig(target);

final MonitoringService service = serviceLocator.getService(MonitoringService.class);
final MonitoringService service = habitat.getService(MonitoringService.class);
if (service == null) {
actionReport.appendMessage("Could not find a monitoring service.");
actionReport.setActionExitCode(ActionReport.ExitCode.FAILURE);
Expand All @@ -120,9 +118,9 @@ public Object run(final MonitoringServiceConfiguration monitoringConfigProxy) th
return monitoringConfigProxy;
}
}, monitoringConfig);

if (dynamic) {
enableOnTarget(actionReport, context, enabled);
monitoringService.setEnabled(enabled);
}

} catch (TransactionFailure ex) {
Expand Down Expand Up @@ -155,25 +153,6 @@ private void updateConfiguration(MonitoringServiceConfiguration monitoringConfig
}
}

private void enableOnTarget(ActionReport actionReport, AdminCommandContext context, Boolean enabled) {
CommandRunner runner = serviceLocator.getService(CommandRunner.class);
ActionReport subReport = context.getActionReport().addSubActionsReport();
CommandRunner.CommandInvocation invocation;

if (target.equals("server-config")) {
invocation = runner.getCommandInvocation("__enable-monitoring-service-on-das", subReport, context.getSubject());
} else {
invocation = runner.getCommandInvocation("__enable-monitoring-service-on-instance", subReport, context.getSubject());
}

// Build the parameters
ParameterMap params = new ParameterMap();
params.add("enabled", enabled.toString());
params.add("target", target);
invocation.parameters(params);
invocation.execute();
}

/**
* Updates monitoring attributes through adding a new property and/or deleting an existing one.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Portions Copyright [2016] [C2B2 Consulting Limited and/or its affiliates]

package org.apache.catalina.fileupload;

import org.apache.catalina.Globals;
Expand Down Expand Up @@ -739,24 +739,6 @@ private void readObject(ObjectInputStream in)
throws IOException, ClassNotFoundException {
// read values
in.defaultReadObject();

// PAYARA-953 protect against null byte attacks
if (repository != null) {
if (repository.getPath().contains("\0")) {
throw new IOException("Repository path cannot contain a null byte");
}

if (!repository.isDirectory()) {
throw new IOException("Repository path " + repository.getPath() + " is not a directory ");
}
}

if (dfosFile != null) {
if (dfosFile.getPath().contains("\0")) {
throw new IOException("File path cannot contain a null byte");
}
}
// END PAYARA-953

OutputStream output = getOutputStream();
if (cachedContent != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,12 +132,4 @@ public void shutdownHealthCheck() {
Logger.getLogger(HealthCheckService.class.getName()).log(Level.INFO, "Payara Health Check Service is shutdown.");
}
}

public BaseHealthCheck getCheck(String serviceName) {
return registeredTasks.get(serviceName).getCheck();
}

public HealthCheckServiceConfiguration getConfiguration() {
return configuration;
}
}
Loading

0 comments on commit 77eb91a

Please sign in to comment.