[Comsuite-svn] SF.net SVN: comsuite: [121] trunk/code
Brought to you by:
zduniak
|
From: <sku...@us...> - 2006-09-02 14:16:23
|
Revision: 121
http://svn.sourceforge.net/comsuite/?rev=121&view=rev
Author: skuzniak
Date: 2006-09-02 07:15:46 -0700 (Sat, 02 Sep 2006)
Log Message:
-----------
activeInstance field handling added
Modified Paths:
--------------
trunk/code/CSAdminPanel/.exadelproject
trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/beans/servers/AddSapServerBean.java
trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/beans/servers/ServerBean.java
trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/locale/Locale_pl.properties
trunk/code/CSAdminPanel/WebContent/pages/servers/CSServerAdd.jsp
trunk/code/CSAdminPanel/WebContent/pages/servers/CSServerEdit.jsp
trunk/code/CSCommon/src/org/commsuite/model/FakedSAPInstanceDef.java
trunk/code/CSCommon/src/org/commsuite/model/ws/WSSAPInstanceDef.java
trunk/code/CSMiddleware/src/org/commsuite/model/SAPInstanceDef.java
trunk/code/CSMiddleware/src/org/commsuite/sap/SAPCommManager.java
Modified: trunk/code/CSAdminPanel/.exadelproject
===================================================================
--- trunk/code/CSAdminPanel/.exadelproject 2006-08-30 19:49:57 UTC (rev 120)
+++ trunk/code/CSAdminPanel/.exadelproject 2006-09-02 14:15:46 UTC (rev 121)
@@ -14,9 +14,19 @@
<FILESYSTEM ENTITY="FileSystemFolder"
LOCATION="%exadel.eclipse.project%" NAME="CSAdminPanel"/>
<FILESYSTEM ENTITY="FileSystemJar"
- LOCATION="%exadel.workspace%/lib/myfaces-impl.jar" NAME="lib-myfaces-impl.jar"/>
+ LOCATION="%exadel.workspace%/lib/tomahawk.jar" NAME="lib-tomahawk.jar"/>
<FILESYSTEM ENTITY="FileSystemJar"
- LOCATION="%exadel.workspace%/lib/tomahawk.jar" NAME="lib-tomahawk.jar"/>
+ LOCATION="%exadel.workspace%/lib/commons-beanutils-1.7.0.jar" NAME="lib-commons-beanutils-1.7.0.jar"/>
+ <FILESYSTEM ENTITY="FileSystemJar"
+ LOCATION="%exadel.workspace%/lib/commons-digester-1.6.jar" NAME="lib-commons-digester-1.6.jar"/>
+ <FILESYSTEM ENTITY="FileSystemJar"
+ LOCATION="%exadel.workspace%/lib/commons-el-1.0.jar" NAME="lib-commons-el-1.0.jar"/>
+ <FILESYSTEM ENTITY="FileSystemJar"
+ LOCATION="%exadel.workspace%/lib/jstl-1.1.0.jar" NAME="lib-jstl-1.1.0.jar"/>
+ <FILESYSTEM ENTITY="FileSystemJar"
+ LOCATION="%exadel.workspace%/lib/myfaces-api-1.1.3.jar" NAME="lib-myfaces-api-1.1.3.jar"/>
+ <FILESYSTEM ENTITY="FileSystemJar"
+ LOCATION="%exadel.workspace%/lib/myfaces-impl-1.1.3.jar" NAME="lib-myfaces-impl-1.1.3.jar"/>
<WEB ENTITY="ExadelWeb" MODEL_PATH="/web.xml" SERVLET_VERSION="2.4">
<MODULE ENTITY="WebJSFModule" MODEL_PATH="/faces-config.xml"
ROOT="WEB-ROOT" SRC="src" URI="/WEB-INF/faces-config.xml"/>
Modified: trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/beans/servers/AddSapServerBean.java
===================================================================
--- trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/beans/servers/AddSapServerBean.java 2006-08-30 19:49:57 UTC (rev 120)
+++ trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/beans/servers/AddSapServerBean.java 2006-09-02 14:15:46 UTC (rev 121)
@@ -77,7 +77,8 @@
instance.setSystemNumber(this.systemNumber);
instance.setUnicode(this.unicode);
instance.setUser(this.user);
-
+ instance.setActiveInstance(this.activeInstance);
+ logger.debug("Instance is active: "+ this.activeInstance);
if (null == this.password) {
if (!this.confPassword.equals(this.password)) throw new IllegalArgumentException(PASSWORD_ERROR_CODE);
}
@@ -118,6 +119,7 @@
instance.setSystemNumber(this.systemNumber);
instance.setUnicode(this.unicode);
instance.setUser(this.user);
+ instance.setActiveInstance(this.activeInstance);
if (null == this.password) {
if (!this.confPassword.equals(this.password)) throw new IllegalArgumentException(PASSWORD_ERROR_CODE);
@@ -155,7 +157,7 @@
this.createInstanceFromFields(instance);
}
-
+ logger.debug("instance is active: "+ instance.isActiveInstance());
if (null != instance) {
ws.saveNewInstance(instance);
LanguageSelectionBean.showMessage(BeansUtils.MESSAGE_SERVER_SUCCESSFULL,
Modified: trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/beans/servers/ServerBean.java
===================================================================
--- trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/beans/servers/ServerBean.java 2006-08-30 19:49:57 UTC (rev 120)
+++ trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/beans/servers/ServerBean.java 2006-09-02 14:15:46 UTC (rev 121)
@@ -34,6 +34,8 @@
protected int maxConnectionsInPool;
protected boolean defaultInstance;
+
+ protected boolean activeInstance;
protected String name;
@@ -78,7 +80,15 @@
private int unicodeSearchIndex;
- public int getDefaultSearchIndex() {
+ public boolean isActiveInstance() {
+ return activeInstance;
+ }
+
+ public void setActiveInstance(boolean activeInstance) {
+ this.activeInstance = activeInstance;
+ }
+
+ public int getDefaultSearchIndex() {
return defaultSearchIndex;
}
Modified: trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/locale/Locale_pl.properties
===================================================================
--- trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/locale/Locale_pl.properties 2006-08-30 19:49:57 UTC (rev 120)
+++ trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/locale/Locale_pl.properties 2006-09-02 14:15:46 UTC (rev 121)
@@ -127,6 +127,7 @@
SERVER_LOAD_BALANCING_DISABLED=R\u00f3wnowa\u017cenie obci\u0105\u017ce\u0144: wy\u0142\u0105czone
SERVER_PROG_ID=Prog id
SERVER_UNICODE=Unicode
+SERVER_ACTIVE_INSTANCE=Uaktywnij
SERVER_GWHOST=GWHost
SERVER_GWSERVER=GWServer
SERVER_MANDANT=Klient(mandant)
@@ -293,4 +294,6 @@
COMMON_LEGEND_EMAIL=To pole jest obowi\u0105zkowe i musi zawierac unikatowy i istniej\u0105cy w systemie SAP R/3 adres e-mail u\u017cytkownika.
COMMON_LEGEND_MAX_CONNECTIONS=To pole jest obowi\u0105zkowe i musi byc liczb\u0105 ca\u0142kowit\u0105 z przedzia\u0142u <1 - 100>.
COMMON_LEGEND_POSTAL=Kod pocztowy w formacie: dd-ddd
-COMMON_LEGEND_PHONE=Numer telefonu
\ No newline at end of file
+COMMON_LEGEND_PHONE=Numer telefonu
+COMMON_LEGEND_ACTIVATE=Uaktywnia wybran\u0105 instancj\u0119. Tylko instancje aktywne mog\u0105 byc nast\u0119pnie uruchamiane lub zatrzymywane, \
+ r\u00f3wnie\u017c tylko instancje aktywne s\u0105 uruchamiane podczas startu serwera.
\ No newline at end of file
Modified: trunk/code/CSAdminPanel/WebContent/pages/servers/CSServerAdd.jsp
===================================================================
--- trunk/code/CSAdminPanel/WebContent/pages/servers/CSServerAdd.jsp 2006-08-30 19:49:57 UTC (rev 120)
+++ trunk/code/CSAdminPanel/WebContent/pages/servers/CSServerAdd.jsp 2006-09-02 14:15:46 UTC (rev 121)
@@ -109,6 +109,12 @@
<h:outputText value="#{Locale.SERVER_UNICODE}" styleClass="listView-header-title"/>
<h:selectBooleanCheckbox value="#{addSapServerBean.unicode}" />
+ <h:panelGrid columns="2">
+ <h:outputText value="#{Locale.SERVER_ACTIVE_INSTANCE}" styleClass="listView-header-title"/>
+ <h:outputText value="#" styleClass="legend"/>
+ </h:panelGrid>
+ <h:selectBooleanCheckbox value="#{addSapServerBean.activeInstance}" />
+
</h:panelGrid>
<h:panelGrid columns="2" styleClass="listView-entity">
@@ -238,6 +244,7 @@
<h:outputText value="***) #{Locale.COMMON_LEGEND_WITHOUT_LOAD_BALANCING}" />
<h:outputText value="****) #{Locale.COMMON_LEGEND_EMAIL}" />
<h:outputText value="*****) #{Locale.COMMON_LEGEND_MAX_CONNECTIONS}" />
+ <h:outputText value="# #{Locale.COMMON_LEGEND_ACTIVATE}" />
</h:panelGrid>
</h:form>
</h:panelGrid>
Modified: trunk/code/CSAdminPanel/WebContent/pages/servers/CSServerEdit.jsp
===================================================================
--- trunk/code/CSAdminPanel/WebContent/pages/servers/CSServerEdit.jsp 2006-08-30 19:49:57 UTC (rev 120)
+++ trunk/code/CSAdminPanel/WebContent/pages/servers/CSServerEdit.jsp 2006-09-02 14:15:46 UTC (rev 121)
@@ -109,6 +109,12 @@
<h:outputText value="#{Locale.SERVER_UNICODE}" styleClass="listView-header-title"/>
<h:selectBooleanCheckbox value="#{addSapServerBean.unicode}" />
+ <h:panelGrid columns="2">
+ <h:outputText value="#{Locale.SERVER_ACTIVE_INSTANCE}" styleClass="listView-header-title"/>
+ <h:outputText value="#" styleClass="legend"/>
+ </h:panelGrid>
+ <h:selectBooleanCheckbox value="#{addSapServerBean.activeInstance}" />
+
</h:panelGrid>
<h:panelGrid columns="2" styleClass="listView-entity">
Modified: trunk/code/CSCommon/src/org/commsuite/model/FakedSAPInstanceDef.java
===================================================================
--- trunk/code/CSCommon/src/org/commsuite/model/FakedSAPInstanceDef.java 2006-08-30 19:49:57 UTC (rev 120)
+++ trunk/code/CSCommon/src/org/commsuite/model/FakedSAPInstanceDef.java 2006-09-02 14:15:46 UTC (rev 121)
@@ -45,6 +45,7 @@
private String client;
private String adminEmail;
private Long id;
+ private boolean activeInstance;
public Long getId() {
return this.id;
@@ -178,4 +179,12 @@
this.maxConnectionsInPool = maxConnectionsInPool;
}
+ public void setActiveInstance(boolean active) {
+ this.activeInstance = active;
+ }
+
+ public boolean isActiveInstance() {
+ return this.activeInstance;
+ }
+
}
Modified: trunk/code/CSCommon/src/org/commsuite/model/ws/WSSAPInstanceDef.java
===================================================================
--- trunk/code/CSCommon/src/org/commsuite/model/ws/WSSAPInstanceDef.java 2006-08-30 19:49:57 UTC (rev 120)
+++ trunk/code/CSCommon/src/org/commsuite/model/ws/WSSAPInstanceDef.java 2006-09-02 14:15:46 UTC (rev 121)
@@ -91,5 +91,9 @@
public int getMaxConnectionsInPool();
public void setMaxConnectionsInPool(int maxConnectionsInPool);
+
+ public void setActiveInstance(boolean active);
+ public boolean isActiveInstance();
+
}
Modified: trunk/code/CSMiddleware/src/org/commsuite/model/SAPInstanceDef.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/model/SAPInstanceDef.java 2006-08-30 19:49:57 UTC (rev 120)
+++ trunk/code/CSMiddleware/src/org/commsuite/model/SAPInstanceDef.java 2006-09-02 14:15:46 UTC (rev 121)
@@ -181,6 +181,7 @@
this.systemNumber = wsInstance.getSystemNumber();
this.unicode = wsInstance.isUnicode();
this.user = wsInstance.getUser();
+ this.activeInstance = wsInstance.isActiveInstance();
}
/**
@@ -400,6 +401,7 @@
.append("systemNumber", this.systemNumber)
.append("unicode", this.unicode)
.append("user", this.user)
+ .append("activeInstance", this.activeInstance)
.toString();
}
@@ -430,6 +432,7 @@
.append(this.systemNumber, rhs.systemNumber)
.append(this.unicode, rhs.unicode)
.append(this.user, rhs.user)
+ .append(this.activeInstance, rhs.activeInstance)
.isEquals();
}
@@ -453,6 +456,7 @@
.append(this.systemNumber)
.append(this.unicode)
.append(this.user)
+ .append(this.activeInstance)
.toHashCode();
}
}
Modified: trunk/code/CSMiddleware/src/org/commsuite/sap/SAPCommManager.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/sap/SAPCommManager.java 2006-08-30 19:49:57 UTC (rev 120)
+++ trunk/code/CSMiddleware/src/org/commsuite/sap/SAPCommManager.java 2006-09-02 14:15:46 UTC (rev 121)
@@ -166,6 +166,7 @@
logger.info("SAPCommManager destroyed");
}
+ // TODO: should this method be sensitive on active field??
public void setSapInstances(Collection<SAPInstanceDef> sapInstances) {
// TODO: init sapComms collection with values from DB
@@ -185,7 +186,8 @@
sapComms.put(sapComm.getName(), sapComm);
}
}
-
+
+ // TODO: should this method be sensitive on active field??
public void setSapInstance(SAPInstanceDef instance) {
if (!isEnabled()) {
return;
@@ -216,8 +218,13 @@
logger.info("Starting instance: " + instanceName);
checkExistenceOfSAPInstance(instanceName);
final ISAPComm instance = sapComms.get(instanceName);
- instance.startServer();
- logger.info("Instance started: " + instanceName);
+ if (instance.isActiveInstance()) {
+ instance.startServer();
+ logger.info("Instance started: " + instanceName);
+ } else {
+ logger.warn("Instance is not active");
+ throw new RuntimeException("Unable to start inactive instance");
+ }
}
public void stopInstance(String instanceName) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|