-
Notifications
You must be signed in to change notification settings - Fork 305
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PAYARA-1079 Add DataGrid Timer Store (#2394)
* PAYARA-1079 add HZ EJB Timer store to Payara 5 * PAYARA-1070 Renamed persistence services to DataGrid and Database. Persistence Service is selectable in the administration console * PAYARA-1079 Admin console buttons for Deployment Groups sort of working * PAYARA-1079 Initial clustering and timer migration works across the data grid for all deployed applications * PAYARA-1079 fix timer buttons * PAYARA-1079 List Timers, Migrate Timers now works in both database and datagrid persistence mode. Clustered failover works in Datagrid * PAYARA-1079 Fix issue whereby after whole cluster restart timers are not reactivated * PAYARA-1070 minor white space changes
- Loading branch information
1 parent
49a2835
commit 3cf4f61
Showing
23 changed files
with
627 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
106 changes: 106 additions & 0 deletions
106
appserver/admingui/cluster/src/main/resources/dg/listEjbTimersDG.jsf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
<!-- | ||
|
||
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. | ||
|
||
Copyright (c) 1997-2013 Oracle and/or its affiliates. All rights reserved. | ||
|
||
The contents of this file are subject to the terms of either the GNU | ||
General Public License Version 2 only ("GPL") or the Common Development | ||
and Distribution License("CDDL") (collectively, the "License"). You | ||
may not use this file except in compliance with the License. You can | ||
obtain a copy of the License at | ||
https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html | ||
or packager/legal/LICENSE.txt. See the License for the specific | ||
language governing permissions and limitations under the License. | ||
|
||
When distributing the software, include this License Header Notice in each | ||
file and include the License file at packager/legal/LICENSE.txt. | ||
|
||
GPL Classpath Exception: | ||
Oracle designates this particular file as subject to the "Classpath" | ||
exception as provided by Oracle in the GPL Version 2 section of the License | ||
file that accompanied this code. | ||
|
||
Modifications: | ||
If applicable, add the following below the License Header, with the fields | ||
enclosed by brackets [] replaced by your own identifying information: | ||
"Portions Copyright [year] [name of copyright owner]" | ||
|
||
Contributor(s): | ||
If you wish your version of this file to be governed by only the CDDL or | ||
only the GPL Version 2, indicate your decision by adding "[Contributor] | ||
elects to include this software in this distribution under the [CDDL or GPL | ||
Version 2] license." If you don't indicate a single choice of license, a | ||
recipient has the option to distribute your version of this file under | ||
either the CDDL, the GPL Version 2 or to extend the choice of license to | ||
its licensees as provided above. However, if you add GPL Version 2 code | ||
and therefore, elected the GPL Version 2 license, then the option applies | ||
only if the new code is made subject to such option by the copyright | ||
holder. | ||
|
||
Portions Copyright [2018] [Payara Foundation and/or its affiliates] | ||
--> | ||
|
||
|
||
|
||
<!initPage | ||
setResourceBundle(key="i18ncs" bundle="org.glassfish.cluster.admingui.Strings") | ||
setResourceBundle(key="i18nc" bundle="org.glassfish.common.admingui.Strings") | ||
setResourceBundle(key="help_common" bundle="org.glassfish.common.admingui.Helplinks"); | ||
/> | ||
<!composition template="/templates/default.layout" | ||
guiTitle="$resource{i18ncs.clusters.ejbTimers.PageTitle}" | ||
> | ||
<!define name="content"> | ||
<event> | ||
<!beforeCreate | ||
setPageSessionAttribute(key="tableTitle" value="$resource{i18ncs.clusters.ejbTimers.TableTitle}"); | ||
getRequestValue(key="dgName" value="#{pageSession.dgName}"); | ||
urlencode(value="#{pageSession.dgName}" encoding="UTF-8" result="#{pageSession.encodedDGName}"); | ||
|
||
gf.restRequest(endpoint="#{sessionScope.REST_URL}/list-timers?target=#{pageSession.encodedDGName}" | ||
attrs="#{requestScope.attrsMap}" method="get" result="#{requestScope.resp}"); | ||
setAttribute(key="listOfRows" value="#{requestScope.resp.data.extraProperties.ejbTimers}"); | ||
setPageSessionAttribute(key="parentPage" value="#{request.contextPath}/cluster/dg/dgGeneral.jsf?dgName=#{pageSession.encodedDGName}"); | ||
gf.isDGName(dgName="#{pageSession.dgName}" ); | ||
/> | ||
</event> | ||
<sun:form id="propertyForm"> | ||
#include "/cluster/dg/dgTabs.inc" | ||
#include "/common/shared/alertMsg_1.inc" | ||
|
||
<sun:title id="propertyContentPage" title="$resource{i18ncs.clusters.ejbTimers.PageTitle}" > | ||
<!facet pageButtonsTop> | ||
<sun:panelGroup id="topButtons"> | ||
<sun:button id="cancelButton" immediate="#{true}" primary="#{false}" rendered="#{pageSession.showCancelButton}" text="$resource{i18n.button.Back}" > | ||
<!command | ||
gf.redirect(page="#{parentPage}"); | ||
/> | ||
</sun:button> | ||
</sun:panelGroup> | ||
</facet> | ||
</sun:title> | ||
<sun:table id="configs" title="#{tableTitle}" > | ||
<!afterCreate | ||
getClientId(component="$this{component}" clientId=>$page{tableId}); | ||
/> | ||
"<br/ > <br /> | ||
<sun:tableRowGroup id="rowGroup1" data={"$attribute{listOfRows}"} sourceVar="td"> | ||
<!afterCreate | ||
getClientId(component="$this{component}" clientId=>$page{tableRowGroupId}); | ||
/> | ||
|
||
<sun:tableColumn headerText="$resource{i18ncs.general.serverNameCol}" rowHeader="$boolean{true}" id="col1"> | ||
<sun:staticText id="serverNameCol" value="#{td.value.server}" /> | ||
</sun:tableColumn> | ||
|
||
<sun:tableColumn headerText="$resource{i18ncs.clusters.ejbTimers.TimerCountCol}" rowHeader="$boolean{true}" id="col6"> | ||
<sun:staticText id="timerCountCol" value="#{td.value.timerCount}" /> | ||
</sun:tableColumn> | ||
</sun:tableRowGroup> | ||
</sun:table> | ||
|
||
</sun:form> | ||
|
||
</define> | ||
</composition> |
130 changes: 130 additions & 0 deletions
130
appserver/admingui/cluster/src/main/resources/dg/migrateEjbTimersDG.jsf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,130 @@ | ||
<!-- | ||
|
||
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. | ||
|
||
Copyright (c) 2010-2013 Oracle and/or its affiliates. All rights reserved. | ||
|
||
The contents of this file are subject to the terms of either the GNU | ||
General Public License Version 2 only ("GPL") or the Common Development | ||
and Distribution License("CDDL") (collectively, the "License"). You | ||
may not use this file except in compliance with the License. You can | ||
obtain a copy of the License at | ||
https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html | ||
or packager/legal/LICENSE.txt. See the License for the specific | ||
language governing permissions and limitations under the License. | ||
|
||
When distributing the software, include this License Header Notice in each | ||
file and include the License file at packager/legal/LICENSE.txt. | ||
|
||
GPL Classpath Exception: | ||
Oracle designates this particular file as subject to the "Classpath" | ||
exception as provided by Oracle in the GPL Version 2 section of the License | ||
file that accompanied this code. | ||
|
||
Modifications: | ||
If applicable, add the following below the License Header, with the fields | ||
enclosed by brackets [] replaced by your own identifying information: | ||
"Portions Copyright [year] [name of copyright owner]" | ||
|
||
Contributor(s): | ||
If you wish your version of this file to be governed by only the CDDL or | ||
only the GPL Version 2, indicate your decision by adding "[Contributor] | ||
elects to include this software in this distribution under the [CDDL or GPL | ||
Version 2] license." If you don't indicate a single choice of license, a | ||
recipient has the option to distribute your version of this file under | ||
either the CDDL, the GPL Version 2 or to extend the choice of license to | ||
its licensees as provided above. However, if you add GPL Version 2 code | ||
and therefore, elected the GPL Version 2 license, then the option applies | ||
only if the new code is made subject to such option by the copyright | ||
holder. | ||
|
||
Portions Copyright [2018] [Payara Foundation and/or its affiliates] | ||
|
||
--> | ||
|
||
<!initPage | ||
setResourceBundle(key="i18ncs" bundle="org.glassfish.cluster.admingui.Strings") | ||
setResourceBundle(key="i18nc" bundle="org.glassfish.common.admingui.Strings") | ||
setResourceBundle(key="help_cluster" bundle="org.glassfish.cluster.admingui.Helplinks"); | ||
/> | ||
<!composition template="/templates/default.layout" guiTitle="$resource{i18ncs.cluster.migrateEjbTimers}" > | ||
<!define name="content"> | ||
<event> | ||
<!beforeCreate | ||
setSessionAttribute(key="dgTabs" value="general"); | ||
getRequestValue(key="dgName" value="#{pageSession.dgName}"); | ||
urlencode(value="#{pageSession.dgName}" encoding="UTF-8" result="#{pageSession.encodedDGName}"); | ||
setPageSessionAttribute(key="selfPage" value="#{request.contextPath}/dg/migrateEjbTimersDG.jsf?dgName=#{pageSession.encodedDGName}"); | ||
setPageSessionAttribute(key="parentPage" value="#{request.contextPath}/cluster/dg/dgGeneral.jsf?dgName=#{pageSession.encodedDGName}"); | ||
|
||
setPageSessionAttribute(key="resourceUrl", value="#{sessionScope.REST_URL}/deployment-groups/deployment-group/#{pageSession.encodedDGName}"); | ||
setPageSessionAttribute(key="rest-api" value="true"); | ||
|
||
//set the following for including buttons.inc | ||
setPageSessionAttribute(key="edit" value="#{true}" ); | ||
setPageSessionAttribute(key="showDefaultButton" value="#{false}" ); | ||
setPageSessionAttribute(key="showCancelButton" value="#{true}" ); | ||
|
||
gf.restRequest(endpoint="#{pageSession.resourceUrl}/list-instances", method="get", result="#{requestScope.results}"); | ||
setPageSessionAttribute(key="dgInstances", value="#{requestScope.results.data.extraProperties.instanceList}"); | ||
createList(result="#{pageSession.runningInstances}", size="0"); | ||
createList(result="#{pageSession.notRunningInstances}", size="0"); | ||
foreach (var="instance", list="#{pageSession.dgInstances}") { | ||
if ('#{instance.status} = NOT_RUNNING') { | ||
listAdd(list="#{pageSession.notRunningInstances}", value="#{instance.name}"); | ||
} | ||
if ('!(#{instance.status} = NOT_RUNNING)') { | ||
listAdd(list="#{pageSession.runningInstances}", value="#{instance.name}"); | ||
} | ||
} | ||
gf.isDGName(dgName="#{pageSession.dgName}" ); | ||
/> | ||
</event> | ||
<sun:form id="propertyForm"> | ||
#include "/cluster/dg/dgTabs.inc" | ||
#include "/common/shared/alertMsg_1.inc" | ||
<!-- Page Title --> | ||
<sun:title id="propertyContentPage" title="$resource{i18ncs.cluster.migrateEjbTimers}" helpText="$resource{i18ncs.cluster.migrateEjbTimersHelp}"> | ||
<!facet pageButtonsTop> | ||
<sun:panelGroup id="topButtons"> | ||
<sun:button id="saveButton" text="$resource{i18n.button.OK}" disabled="#{empty runningInstances}"> | ||
<!command | ||
createMap(result="#{requestScope.attrs}"); | ||
mapPut(map="#{requestScope.attrs}", key="target", value="#{pageSession.destInstance}"); | ||
mapPut(map="#{requestScope.attrs}", key="id", value="#{pageSession.sourceInstance}"); | ||
gf.restRequest(endpoint="#{pageSession.resourceUrl}/migrate-timers.json", attrs="#{requestScope.attrs}", method="post", result="#{requestScope.results}"); | ||
prepareAlertMsg(type="success", summary="#{requestScope.results.data.subReports[0].message}"); | ||
gf.redirect(page="#{selfPage}&alertType=${alertType}&alertSummary=${alertSummary}&alertDetail=${alertDetail}"); | ||
/> | ||
</sun:button> | ||
<sun:button id="cancelButton" immediate="#{true}" primary="#{false}" rendered="#{pageSession.showCancelButton}" text="$resource{i18n.button.Cancel}" > | ||
<!command | ||
gf.redirect(page="#{parentPage}"); | ||
/> | ||
</sun:button> | ||
</sun:panelGroup> | ||
</facet> | ||
</sun:title> | ||
|
||
<h:panelGroup rendered="#{!empty runningInstances}"> | ||
<sun:propertySheet id="propertySheet"> | ||
<!-- Text Field section --> | ||
<sun:propertySheetSection id="propertSectionTextField"> | ||
<sun:property id="clusterSourceProp" labelAlign="left" noWrap="#{true}" overlapLabel="#{false}" label="$resource{i18ncs.cluster.sourceCluster}" > | ||
<sun:dropDown id="source" selected="#{pageSession.sourceInstance}"labels="#{pageSession.notRunningInstances}"/> | ||
</sun:property> | ||
<sun:property id="clusterDestProp" labelAlign="left" noWrap="#{true}" overlapLabel="#{false}" label="$resource{i18ncs.cluster.destCluster}" > | ||
<sun:dropDown id="dest" selected="#{pageSession.destInstance}" labels="#{pageSession.runningInstances}"/> | ||
</sun:property> | ||
</sun:propertySheetSection> | ||
</sun:propertySheet> | ||
</h:panelGroup> | ||
<h:panelGroup rendered="#{empty runningInstances}"> | ||
"<br /> <br /> | ||
"<em>$resource{i18ncs.cluster.migrateEjbTimersNoRunningInstance}</em> | ||
</h:panelGroup> | ||
|
||
<sun:hidden id="helpKey" value="$resource{help_cluster.clusterMigrateEjbTimers}" /> | ||
</sun:form> | ||
</define> | ||
</composition> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
53 changes: 53 additions & 0 deletions
53
appserver/admingui/ejb/src/main/resources/ejbTimerButtonsDG.jsf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
<!-- | ||
|
||
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. | ||
|
||
Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. | ||
|
||
The contents of this file are subject to the terms of either the GNU | ||
General Public License Version 2 only ("GPL") or the Common Development | ||
and Distribution License("CDDL") (collectively, the "License"). You | ||
may not use this file except in compliance with the License. You can | ||
obtain a copy of the License at | ||
https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html | ||
or packager/legal/LICENSE.txt. See the License for the specific | ||
language governing permissions and limitations under the License. | ||
|
||
When distributing the software, include this License Header Notice in each | ||
file and include the License file at packager/legal/LICENSE.txt. | ||
|
||
GPL Classpath Exception: | ||
Oracle designates this particular file as subject to the "Classpath" | ||
exception as provided by Oracle in the GPL Version 2 section of the License | ||
file that accompanied this code. | ||
|
||
Modifications: | ||
If applicable, add the following below the License Header, with the fields | ||
enclosed by brackets [] replaced by your own identifying information: | ||
"Portions Copyright [year] [name of copyright owner]" | ||
|
||
Contributor(s): | ||
If you wish your version of this file to be governed by only the CDDL or | ||
only the GPL Version 2, indicate your decision by adding "[Contributor] | ||
elects to include this software in this distribution under the [CDDL or GPL | ||
Version 2] license." If you don't indicate a single choice of license, a | ||
recipient has the option to distribute your version of this file under | ||
either the CDDL, the GPL Version 2 or to extend the choice of license to | ||
its licensees as provided above. However, if you add GPL Version 2 code | ||
and therefore, elected the GPL Version 2 license, then the option applies | ||
only if the new code is made subject to such option by the copyright | ||
holder. | ||
|
||
--> | ||
|
||
<sun:button id="migrateTimesButton" text="$resource{i18ncs.button.migrateEjbTimer}" primary="false"> | ||
<!command | ||
gf.redirect(page="#{request.contextPath}/dg/migrateEjbTimersDG.jsf?dgName=#{pageSession.encodedDGName}"); | ||
/> | ||
</sun:button> | ||
|
||
<sun:button id="listTimersButton" text="$resource{i18ncs.button.listEjbTimers}" primary="false"> | ||
<!command | ||
gf.redirect(page="#{request.contextPath}/dg/listEjbTimersDG.jsf?dgName=#{pageSession.encodedDGName}"); | ||
/> | ||
</sun:button> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.