You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by xu...@apache.org on 2009/03/13 09:21:06 UTC
svn commit: r753156 [3/6] - in /geronimo/server/trunk/plugins:
activemq/activemq-portlets/src/main/resources/
activemq/activemq-portlets/src/main/webapp/WEB-INF/
activemq/activemq-portlets/src/main/webapp/WEB-INF/view/jmsmanager/server/
activemq/active...
Modified: geronimo/server/trunk/plugins/openejb/openejb-portlets/src/main/java/org/apache/geronimo/console/ejbserver/EjbHelper.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/openejb/openejb-portlets/src/main/java/org/apache/geronimo/console/ejbserver/EjbHelper.java?rev=753156&r1=753155&r2=753156&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/openejb/openejb-portlets/src/main/java/org/apache/geronimo/console/ejbserver/EjbHelper.java (original)
+++ geronimo/server/trunk/plugins/openejb/openejb-portlets/src/main/java/org/apache/geronimo/console/ejbserver/EjbHelper.java Fri Mar 13 08:21:04 2009
@@ -17,15 +17,19 @@
package org.apache.geronimo.console.ejbserver;
import java.lang.reflect.Method;
-import java.text.MessageFormat;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Properties;
-import java.util.ResourceBundle;
import java.util.Set;
import java.util.TreeMap;
+import java.text.MessageFormat;
+
+import javax.servlet.http.HttpServletRequest;
+import org.apache.geronimo.console.BaseRemoteProxy;
+import org.apache.geronimo.console.message.CommonMessage;
+import org.apache.geronimo.console.message.JSCommonMessage;
import org.apache.geronimo.console.util.KernelManagementHelper;
import org.apache.geronimo.gbean.AbstractName;
import org.apache.geronimo.gbean.AbstractNameQuery;
@@ -56,7 +60,7 @@
import org.slf4j.LoggerFactory;
@RemoteProxy
-public class EjbHelper {
+public class EjbHelper extends BaseRemoteProxy {
private static final Logger log = LoggerFactory.getLogger(EjbHelper.class);
@@ -96,8 +100,7 @@
private ContainerSystem containerSystem;
private OpenEjbConfiguration configuration;
- private Kernel kernel;
- private ResourceBundle resourceBundle;
+ private Kernel kernel;
private KernelManagementHelper helper = null;
public EjbHelper() {
initContainerSystem();
@@ -110,7 +113,6 @@
ContainerSystem.class);
configuration = SystemInstance.get().getComponent(
OpenEjbConfiguration.class);
- resourceBundle = ResourceBundle.getBundle(BUNDLE_NAME);
}
@RemoteMethod
@@ -188,7 +190,7 @@
}
@RemoteMethod
- public List<EjbInformation> getContainerInfo(String containerId) {
+ public List<EjbInformation> getContainerInfo(String containerId, HttpServletRequest request) {
containerId = replaceEscapes(containerId);
Container container = containerSystem.getContainer(containerId);
if (container == null)
@@ -210,22 +212,22 @@
for (ContainerInfo containerInfo : containerInfos) {
if (containerInfo.id.equals(containerId)) {
information = new EjbInformation();
- information.setName(resourceBundle.getString(CC_KEY));
+ information.setName(getLocalizedString(request, BUNDLE_NAME, CC_KEY));
information.setId("ContainerClass");
information.setValue(containerInfo.className);
infos.add(information);
information = new EjbInformation();
- information.setName(resourceBundle.getString(CI_KEY));
+ information.setName(getLocalizedString(request, BUNDLE_NAME, CI_KEY));
information.setId("ContainerId");
information.setValue(containerInfo.id);
infos.add(information);
information = new EjbInformation();
- information.setName(resourceBundle.getString(CD_KEY));
+ information.setName(getLocalizedString(request, BUNDLE_NAME, CD_KEY));
information.setId("ContainerDesc");
information.setValue(containerInfo.description);
infos.add(information);
information = new EjbInformation();
- information.setName(resourceBundle.getString(DN_KEY));
+ information.setName(getLocalizedString(request, BUNDLE_NAME, DN_KEY));
information.setId("DisplayName");
information.setValue(containerInfo.displayName);
infos.add(information);
@@ -276,8 +278,8 @@
}
@RemoteMethod
- public Status setContainerProperty(String containerId, String propertyKey,
- String propertyValue) {
+ public JSCommonMessage setContainerProperty(String containerId, String propertyKey,
+ String propertyValue, HttpServletRequest request) {
propertyKey = propertyKey.trim();
propertyValue = propertyValue.trim();
@@ -295,18 +297,18 @@
try {
Integer.parseInt(propertyValue);
} catch (NumberFormatException nfe) {
- return new Status(MessageFormat.format(resourceBundle.getString("portlet.openejb.view.message1"),propertyKey));
+ return new JSCommonMessage(CommonMessage.Type.Error, getLocalizedString(request, BUNDLE_NAME, "portlet.openejb.view.numeric", propertyKey), null);
}
} else if (STRICTPOOLING.equals(propertyKey)) {
if (!propertyValue.equalsIgnoreCase(TRUE)
&& !propertyValue.equalsIgnoreCase(FALSE)) {
- return new Status(MessageFormat.format(resourceBundle.getString("portlet.openejb.view.message2"),propertyKey));
+ return new JSCommonMessage(CommonMessage.Type.Error, getLocalizedString(request, BUNDLE_NAME, "portlet.openejb.view.boolean", propertyKey), null);
}
} else {
try {
EjbHelper.class.getClassLoader().loadClass(propertyValue);
} catch (ClassNotFoundException e) {
- return new Status(MessageFormat.format(resourceBundle.getString("portlet.openejb.view.message3"),propertyKey));
+ return new JSCommonMessage(CommonMessage.Type.Error, getLocalizedString(request, BUNDLE_NAME, "portlet.openejb.view.invalid", propertyKey), null);
}
}
@@ -355,18 +357,18 @@
}
}
} catch (GBeanNotFoundException e) {
- return new Status(
- resourceBundle.getString("portlet.openejb.view.errorMessage1"));
+ return new JSCommonMessage(CommonMessage.Type.Error,
+ getLocalizedString(request, BUNDLE_NAME, "portlet.openejb.view.unchanged", propertyKey), null);
} catch (NoSuchAttributeException e) {
- return new Status(
- resourceBundle.getString("portlet.openejb.view.errorMessage1"));
+ return new JSCommonMessage(CommonMessage.Type.Error,
+ getLocalizedString(request, BUNDLE_NAME, "portlet.openejb.view.unchanged", propertyKey), null);
} catch (Exception e) {
- return new Status(
- resourceBundle.getString("portlet.openejb.view.errorMessage1"));
+ return new JSCommonMessage(CommonMessage.Type.Error,
+ getLocalizedString(request, BUNDLE_NAME, "portlet.openejb.view.unchanged", propertyKey), null);
}
}
}
- return new Status(resourceBundle.getString("portlet.openejb.view.message4"));
+ return new JSCommonMessage(CommonMessage.Type.Warn, getLocalizedString(request, BUNDLE_NAME, "portlet.openejb.view.restart"), null);
}
private GBeanData getGBeanDataFromConfiguration(AbstractName absName){
@@ -376,43 +378,43 @@
}
@RemoteMethod
public List<EjbInformation> getDeploymentInfo(String containerId,
- String deploymentId) {
+ String deploymentId, HttpServletRequest request) {
Container container = containerSystem.getContainer(containerId);
DeploymentInfo deploymentInfo = container
.getDeploymentInfo(deploymentId);
List<EjbInformation> informations = new ArrayList<EjbInformation>();
EjbInformation information = new EjbInformation();
- information.setName(resourceBundle.getString(BEANCLASSNAME_KEY));
+ information.setName(getLocalizedString(request, BUNDLE_NAME, BEANCLASSNAME_KEY));
information.setValue(deploymentInfo.getBeanClass().getName());
informations.add(information);
if (deploymentInfo.getBusinessLocalInterface() != null) {
information = new EjbInformation();
- information.setName(resourceBundle.getString(BLI_KEY));
+ information.setName(getLocalizedString(request, BUNDLE_NAME, BLI_KEY));
information.setValue(appendMultipleInterfaces(deploymentInfo
.getBusinessLocalInterfaces()));
informations.add(information);
}
if (deploymentInfo.getBusinessRemoteInterface() != null) {
information = new EjbInformation();
- information.setName(resourceBundle.getString(BRI_KEY));
+ information.setName(getLocalizedString(request, BUNDLE_NAME, BRI_KEY));
information.setValue(appendMultipleInterfaces(deploymentInfo
.getBusinessRemoteInterfaces()));
informations.add(information);
}
information = new EjbInformation();
- information.setName(resourceBundle.getString(DEPLOYMENTID_KEY));
+ information.setName(getLocalizedString(request, BUNDLE_NAME, DEPLOYMENTID_KEY));
information.setValue(deploymentId);
informations.add(information);
;
information = new EjbInformation();
- information.setName(resourceBundle.getString(EJBNAME_KEY));
+ information.setName(getLocalizedString(request, BUNDLE_NAME, EJBNAME_KEY));
information.setValue(deploymentInfo.getEjbName());
informations.add(information);
if (deploymentInfo.getHomeInterface() != null) {
information = new EjbInformation();
information.setValue(deploymentInfo.getHomeInterface().getName());
- information.setName(resourceBundle.getString(EJBHOMEI_KEY));
+ information.setName(getLocalizedString(request, BUNDLE_NAME, EJBHOMEI_KEY));
informations.add(information);
}
if (!container.getContainerType().equals(ContainerType.MESSAGE_DRIVEN)) {
@@ -433,14 +435,14 @@
}
information.setValue(names.substring(0, names.length() - 1));
} catch (Exception e) {
- log.error(resourceBundle.getString("portlet.openejb.view.errorMessage2"), e);
+ log.error("Exception when trying to get JNDI name", e);
}
- information.setName(resourceBundle.getString(JNDINAMES_KEY));
+ information.setName(getLocalizedString(request, BUNDLE_NAME, JNDINAMES_KEY));
informations.add(information);
}
if (deploymentInfo.getLocalHomeInterface() != null) {
information = new EjbInformation();
- information.setName(resourceBundle.getString(LHI_KEY));
+ information.setName(getLocalizedString(request, BUNDLE_NAME, LHI_KEY));
information.setValue(deploymentInfo.getLocalHomeInterface()
.getName());
informations.add(information);
@@ -448,35 +450,35 @@
if (deploymentInfo.getLocalInterface() != null) {
information = new EjbInformation();
- information.setName(resourceBundle.getString(LI_KEY));
+ information.setName(getLocalizedString(request, BUNDLE_NAME, LI_KEY));
information.setValue(deploymentInfo.getLocalInterface().getName());
informations.add(information);
}
if (deploymentInfo.getRemoteInterface() != null) {
information = new EjbInformation();
- information.setName(resourceBundle.getString(RI_KEY));
+ information.setName(getLocalizedString(request, BUNDLE_NAME, RI_KEY));
information.setValue(deploymentInfo.getRemoteInterface().getName());
informations.add(information);
}
if (deploymentInfo.getPrimaryKeyClass() != null) {
information = new EjbInformation();
- information.setName(resourceBundle.getString(PKC_KEY));
+ information.setName(getLocalizedString(request, BUNDLE_NAME, PKC_KEY));
information.setValue(deploymentInfo.getPrimaryKeyClass().getName());
informations.add(information);
}
if (deploymentInfo.getPrimaryKeyField() != null) {
information = new EjbInformation();
- information.setName(resourceBundle.getString(PKF_KEY));
+ information.setName(getLocalizedString(request, BUNDLE_NAME, PKF_KEY));
information.setValue(deploymentInfo.getPrimaryKeyField());
informations.add(information);
}
if (deploymentInfo.getServiceEndpointInterface() != null) {
information = new EjbInformation();
- information.setName(resourceBundle.getString(SEI_KEY));
+ information.setName(getLocalizedString(request, BUNDLE_NAME, SEI_KEY));
information.setValue(deploymentInfo.getServiceEndpointInterface()
.getName());
informations.add(information);
@@ -523,13 +525,13 @@
try {
data = kernel.getGBeanData((AbstractName) obj);
} catch (GBeanNotFoundException e) {
- log.error(MessageFormat.format(resourceBundle.getString("portlet.openejb.view.errorMessage3")
+ log.error(MessageFormat.format("GBeanNotFoundException for GBean Name: {0}"
, (AbstractName) obj), e);
} catch (InternalKernelException e) {
- log.error(MessageFormat.format(resourceBundle.getString("portlet.openejb.view.errorMessage4")
+ log.error(MessageFormat.format("InternalKernelException for GBean Name: {0}"
, (AbstractName) obj), e);
} catch (IllegalStateException e) {
- log.error(MessageFormat.format(resourceBundle.getString("portlet.openejb.view.errorMessage5")
+ log.error(MessageFormat.format("IllegalStateException for GBean Name: {0}"
, (AbstractName) obj), e);
}
if (containerId.equals(EjbContainer.getId(data.getAbstractName()))
Modified: geronimo/server/trunk/plugins/openejb/openejb-portlets/src/main/resources/openejb-portlet.properties
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/openejb/openejb-portlets/src/main/resources/openejb-portlet.properties?rev=753156&r1=753155&r2=753156&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/openejb/openejb-portlets/src/main/resources/openejb-portlet.properties (original)
+++ geronimo/server/trunk/plugins/openejb/openejb-portlets/src/main/resources/openejb-portlet.properties Fri Mar 13 08:21:04 2009
@@ -82,6 +82,7 @@
portlet.openejb.help.strictpoolingdesc = StrictPooling tells the container what to do when the pool reaches it's maximum size and there are incoming requests that need instances.With strict pooling, requests will have to wait for instances to become available. The pool size will never grow beyond the the set PoolSize value.Without strict pooling, the container will create temporary instances to meet demand. The instances will last for just one method invocation and then are removed. Default value is true.
portlet.openejb.help.title = The EJB Server portlet allows you to see the different OpenEJB containers deployed on the server. It allows you to set the configurable attributes of those containers as well as view information on the EJBs that are deployed on that container.
portlet.openejb.view.beanclassname = Bean Class Name
+portlet.openejb.view.boolean = The value of {0} should be either true or false.
portlet.openejb.view.businesslocalinterfaces = Business Local Interfaces
portlet.openejb.view.businessremoteinterfaces = Business Remote Interfaces
portlet.openejb.view.containerclass = Container Class
@@ -91,22 +92,18 @@
portlet.openejb.view.displayname = Display Name
portlet.openejb.view.ejbhomeinterface = EJB Home Interface
portlet.openejb.view.ejbname = EJB Name
-portlet.openejb.view.errorMessage1 = An unexpected error has occurred and the value cannot be set
-portlet.openejb.view.errorMessage2 = Exception when trying to get JNDI name
-portlet.openejb.view.errorMessage3 = GBeanNotFoundException for GBean Name: {0}
-portlet.openejb.view.errorMessage4 = InternalKernelException for GBean Name: {0}
-portlet.openejb.view.errorMessage5 = IllegalStateException for GBean Name: {0}
+portlet.openejb.view.invalid = The value of {0} is not valid
portlet.openejb.view.jndinames = JNDI Names
portlet.openejb.view.localhomeinterface = Local Home Interface
portlet.openejb.view.localinterface = Local Interface
-portlet.openejb.view.message1 = The value of {0} should be Numeric;
-portlet.openejb.view.message2 = The value of {0} should be either true or false
-portlet.openejb.view.message3 = The value of {0} is not valid
-portlet.openejb.view.message4 = Please restart the openejb configuration for the changes to take effect
-portlet.openejb.view.message5 = The openejb configuration should be restarted for the changes that were made to the fields to take effect. The changed fields are now shown in red color.
portlet.openejb.view.name = Name
+portlet.openejb.view.numeric = The value of {0} should be Numeric.
portlet.openejb.view.primarykeyclass = Primary Key Class
portlet.openejb.view.primarykeyfield = Primary Key Field
portlet.openejb.view.remoteinterface = Remote Interface
+portlet.openejb.view.restart = Please restart the openejb configuration for the changes to take effect.
portlet.openejb.view.sepinterface = Service EndPoint Interface
+portlet.openejb.view.unchanged = An unexpected error has occurred and the value cannot be set.
+portlet.openejb.view.unrestarted = The openejb configuration should be restarted for the changes that were made to the fields to take effect. The changed fields are now shown in red color.
+portlet.openejb.view.update = Update
portlet.openejb.view.value = Value
Modified: geronimo/server/trunk/plugins/openejb/openejb-portlets/src/main/resources/openejb-portlet_zh.properties
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/openejb/openejb-portlets/src/main/resources/openejb-portlet_zh.properties?rev=753156&r1=753155&r2=753156&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/openejb/openejb-portlets/src/main/resources/openejb-portlet_zh.properties (original)
+++ geronimo/server/trunk/plugins/openejb/openejb-portlets/src/main/resources/openejb-portlet_zh.properties Fri Mar 13 08:21:04 2009
@@ -82,6 +82,7 @@
portlet.openejb.help.strictpoolingdesc = StrictPooling\u8BBE\u7F6E\u4E86\u5F53\u5BB9\u5668\u5728Bean\u6C60\u8FBE\u5230\u5176\u4E0A\u9650\u5E76\u4E14\u4ECD\u6709\u65B0\u7684\u8BF7\u6C42\u65F6\u7684\u884C\u4E3A. \u4F7F\u7528StrictPooling\u5C5E\u6027\u65F6, \u8BF7\u6C42\u4F1A\u5904\u4E8E\u7B49\u5F85\u72B6\u6001\u76F4\u5230\u6709\u53EF\u7528\u7684\u5B9E\u4F8B, \u6C60\u7684\u5927\u5C0F\u4E0D\u4F1A\u8D85\u8FC7\u5176\u4E0A\u9650. \u4E0D\u4F7F\u7528StrictPooling\u5C5E\u6027, \u5BB9\u5668\u4F1A\u521B\u5EFA\u4E34\u65F6\u7684\u5B9E\u4F8B\u6765\u6EE1\u8DB3\u8981\u6C42. \u8FD9\u4E9B\u5B9E\u4F8B\u4F1A\u5728\u4E00\u6B21\u65B9\u6CD5\u8C03\u7528\u7ED3\u675F\u540E\u5220\u9664. \u9ED8\u8BA4\u4F7F\u7528StrictPooling\u5C5E\u6027.
portlet.openejb.help.title = EJB\u670D\u52A1\u5668Portlet\u53EF\u4EE5\u67E5\u770B\u90E8\u7F72\u5728\u670D\u52A1\u5668\u4E0A\u7684\u4E0D\u540COpenEJB\u5BB9\u5668\u7684\u4FE1\u606F, \u540C\u65F6\u5B83\u8FD8\u5141\u8BB8\u8BBE\u7F6E\u8FD9\u4E9B\u5BB9\u5668\u7684\u53EF\u914D\u7F6E\u5C5E\u6027.
portlet.openejb.view.beanclassname = Bean\u7C7B\u540D
+portlet.openejb.view.boolean = {0}\u7684\u503C\u5E94\u8BE5\u8BBE\u7F6E\u4E3Atrue\u6216\u8005false\u3002
portlet.openejb.view.businesslocalinterfaces = \u672C\u5730\u4E1A\u52A1\u63A5\u53E3
portlet.openejb.view.businessremoteinterfaces = \u8FDC\u7A0B\u4E1A\u52A1\u63A5\u53E3
portlet.openejb.view.containerclass = \u5BB9\u5668\u7C7B
@@ -89,24 +90,20 @@
portlet.openejb.view.containerid = \u5BB9\u5668Id
portlet.openejb.view.deploymentid = \u90E8\u7F72Id
portlet.openejb.view.displayname = \u663E\u793A\u540D\u79F0
-portlet.openejb.view.ejbhomeinterface = EJB Home \u63A5\u53E3
-portlet.openejb.view.ejbname = EJB Home
-portlet.openejb.view.errorMessage1 = \u53D1\u751F\u4E86\u4E0D\u53EF\u9884\u6599\u7684\u9519\u8BEF, \u76F8\u5173\u503C\u6CA1\u6709\u88AB\u4FEE\u6539\u3002
-portlet.openejb.view.errorMessage2 = \u5728\u83B7\u53D6 JNDI \u540D\u79F0\u65F6\u53D1\u751F\u9519\u8BEF
-portlet.openejb.view.errorMessage3 = \u5728\u83B7\u53D6 {0} \u65F6\u53D1\u751F\u4E86GBeanNotFoundException
-portlet.openejb.view.errorMessage4 = \u5728\u83B7\u53D6{0}\u65F6\u53D1\u751F\u4E86 InternalKernelException
-portlet.openejb.view.errorMessage5 = \u5728\u83B7\u53D6{0}\u65F6\u53D1\u751F\u4E86 IllegalStateException
+portlet.openejb.view.ejbhomeinterface = EJB Home\u63A5\u53E3
+portlet.openejb.view.ejbname = EJB\u540D\u79F0
+portlet.openejb.view.invalid = {0}\u7684\u503C\u65E0\u6548
portlet.openejb.view.jndinames = JNDI\u540D\u79F0
portlet.openejb.view.localhomeinterface = \u672C\u5730Home\u63A5\u53E3
portlet.openejb.view.localinterface = \u672C\u5730\u63A5\u53E3
-portlet.openejb.view.message1 = {0}\u7684\u503C\u5E94\u8BE5\u662F\u6570\u5B57;
-portlet.openejb.view.message2 = {0}\u7684\u503C\u5E94\u8BE5\u8BBE\u7F6E\u4E3Atrue\u6216\u8005false
-portlet.openejb.view.message3 = {0}\u7684\u503C\u65E0\u6548
-portlet.openejb.view.message4 = OpenEJB \u9700\u8981\u91CD\u542F\u4EE5\u4F7F\u914D\u7F6E\u751F\u6548\u3002
-portlet.openejb.view.message5 = OpenEJB\u914D\u7F6E\u6A21\u5757\u9700\u8981\u91CD\u542F\u4EE5\u4F7F\u5C5E\u6027\u4FEE\u6539\u751F\u6548, \u4FEE\u6539\u4E86\u7684\u5C5E\u6027\u4EE5\u7EA2\u8272\u663E\u793A.
portlet.openejb.view.name = \u540D\u79F0
+portlet.openejb.view.numeric = {0}\u7684\u503C\u5E94\u8BE5\u662F\u6570\u5B57\u3002
portlet.openejb.view.primarykeyclass = \u4E3B\u952E\u7C7B
portlet.openejb.view.primarykeyfield = \u4E3B\u952E\u5B57\u6BB5
portlet.openejb.view.remoteinterface = \u8FDC\u7A0B\u63A5\u53E3
+portlet.openejb.view.restart = OpenEJB\u9700\u8981\u91CD\u542F\u4EE5\u4F7F\u914D\u7F6E\u751F\u6548\u3002
portlet.openejb.view.sepinterface = \u670D\u52A1\u7EC8\u7AEF\u63A5\u53E3
+portlet.openejb.view.unchanged = \u53D1\u751F\u4E86\u4E0D\u53EF\u9884\u6599\u7684\u9519\u8BEF, {0}\u7684\u503C\u6CA1\u6709\u88AB\u4FEE\u6539\u3002
+portlet.openejb.view.unrestarted = OpenEJB\u914D\u7F6E\u6A21\u5757\u9700\u8981\u91CD\u542F\u4EE5\u4F7F\u5C5E\u6027\u4FEE\u6539\u751F\u6548, \u4FEE\u6539\u4E86\u7684\u5C5E\u6027\u4EE5\u7EA2\u8272\u663E\u793A\u3002
+portlet.openejb.view.update = \u66F4\u65B0
portlet.openejb.view.value = \u503C
Modified: geronimo/server/trunk/plugins/openejb/openejb-portlets/src/main/webapp/WEB-INF/view/ejbserver/view.jsp
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/openejb/openejb-portlets/src/main/webapp/WEB-INF/view/ejbserver/view.jsp?rev=753156&r1=753155&r2=753156&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/openejb/openejb-portlets/src/main/webapp/WEB-INF/view/ejbserver/view.jsp (original)
+++ geronimo/server/trunk/plugins/openejb/openejb-portlets/src/main/webapp/WEB-INF/view/ejbserver/view.jsp Fri Mar 13 08:21:04 2009
@@ -23,7 +23,6 @@
<fmt:setBundle basename="openejb-portlet"/>
<portlet:defineObjects/>
-<fmt:setBundle basename="openejb-portlet"/>
<% String dwrForwarderServlet = "/console/dwr6"; %>
<script type='text/javascript' src='<%= dwrForwarderServlet %>/interface/EjbHelper.js'></script>
<script type='text/javascript' src='<%= dwrForwarderServlet %>/engine.js'></script>
@@ -57,26 +56,17 @@
var data = '';
var containerPropertyValue = '';
- EjbHelper.getEjbInformation({callback:createStore,async:false});
-
- function errh(errorObj) {
- alert(errorObj.message);
- }
-
+ EjbHelper.getEjbInformation({callback:createStore,async:false});
function check(curr,last) {
-
- var cr = curr.split(".");
+ var cr = curr.split(".");
var ls = last.split(".");
-
for (var i =0; i < cr.length; i++)
if(parseInt(cr[i]) < parseInt(ls[i]))
return false;
-
return true;
}
-
-
+
function createStore(treeDat){
var json = dojo.toJson(treeDat);
data = {data:""};
@@ -85,9 +75,9 @@
}
- /**
- * DWR table render option
- */
+ /**
+ * DWR table render option
+ */
var tableOption = {
rowCreator: function(options) {
var row = document.createElement('tr');
@@ -103,44 +93,42 @@
return td;
},
escapeHtml:false
- }
-
-function updateEjbInfoTable(ejbInfos){
- var containerId = "";
- var showDialogFlag = false;
- DWRUtil.removeAllRows('ejbInfoTableBody');
- DWRUtil.addRows(
- 'ejbInfoTableBody',
- ejbInfos,
- [
- function(info) {
- if(info.editable == "true" && info.dirty == "true"){
- showDialogFlag = true;
- return "<div style='width:100%;display:inline;'><p id='" + info.id + "para' style='color: red'>" + info.name + "</p></div>";
- } else {
- return "<div style='width:100%;display:inline;'><p id='" + info.id + "para'>" + info.name + "</p></div>";
- }
- },
- function(info) {
- var value = info.value;
- var name = info.name;
- if(info.id == "ContainerId"){
- containerId = info.value;
- }
- if(info.editable == "true"){
- return "<div style='width:100%;display:inline;'><input type='text' id="+info.id + " name="+info.name + " value="+info.value+" widgetId="+info.id+" dojoType='Textbox' /><button dojoType='Button' onclick=updateValues('"+escape(containerId)+"','"+info.id+"','"+info.value+"')>Update!</button></div> "
- } else {
- return "<div style='width:100%'>" + info.value + "</div>";
- }
- }
- ],
- tableOption
- );
- if(showDialogFlag)
- alert("<fmt:message key="portlet.openejb.view.message5"/>");
+ }
-
- }
+ function updateEjbInfoTable(ejbInfos){
+ var containerId = "";
+ var showDialogFlag = false;
+ DWRUtil.removeAllRows('ejbInfoTableBody');
+ DWRUtil.addRows(
+ 'ejbInfoTableBody',
+ ejbInfos,
+ [
+ function(info) {
+ if(info.editable == "true" && info.dirty == "true"){
+ showDialogFlag = true;
+ return "<div style='width:100%;display:inline;'><p id='" + info.id + "para' style='color: red'>" + info.name + "</p></div>";
+ } else {
+ return "<div style='width:100%;display:inline;'><p id='" + info.id + "para'>" + info.name + "</p></div>";
+ }
+ },
+ function(info) {
+ var value = info.value;
+ var name = info.name;
+ if(info.id == "ContainerId"){
+ containerId = info.value;
+ }
+ if(info.editable == "true"){
+ return "<div style='width:100%;display:inline;'><input type='text' id="+info.id + " name="+info.name + " value="+info.value+" widgetId="+info.id+" dojoType='Textbox' /><button dojoType='Button' onclick=updateValues('"+escape(containerId)+"','"+info.id+"','"+info.value+"')><fmt:message key="portlet.openejb.view.update"/></button></div> "
+ } else {
+ return "<div style='width:100%'>" + info.value + "</div>";
+ }
+ }
+ ],
+ tableOption
+ );
+ if(showDialogFlag)
+ addWarningMessage("<portlet:namespace/>", "<fmt:message key='portlet.openejb.view.unrestarted'/>");
+ }
function getCurrentValue(value){
containerPropertyValue = value;
@@ -159,14 +147,16 @@
}
}
- function updateResult(status){
- alert(status.message);
+ function updateResult(msg){
+ addCommonMessage("<portlet:namespace/>", msg);
}
document.body.className="soria";
</script>
+<div id="<portlet:namespace/>CommonMsgContainer"></div><br>
+
<div dojoType="dijit.tree.ForestStoreModel" jsId="storeModel"
store="serverStore"
rootId="Ejb Containers" rootLabel="Ejb Containers" childrenAttrs="children"></div>
Modified: geronimo/server/trunk/plugins/openejb/openejb-portlets/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/openejb/openejb-portlets/src/main/webapp/WEB-INF/web.xml?rev=753156&r1=753155&r2=753156&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/openejb/openejb-portlets/src/main/webapp/WEB-INF/web.xml (original)
+++ geronimo/server/trunk/plugins/openejb/openejb-portlets/src/main/webapp/WEB-INF/web.xml Fri Mar 13 08:21:04 2009
@@ -41,10 +41,10 @@
<param-name>classes</param-name>
<param-value>
org.apache.geronimo.console.ejbserver.EjbInformation,
- org.apache.geronimo.console.ejbserver.TreeEntry,
- org.apache.geronimo.console.ejbserver.EjbHelper,
- org.apache.geronimo.console.ejbserver.Status,
- org.apache.geronimo.console.ejbserver.Tree
+ org.apache.geronimo.console.ejbserver.TreeEntry,
+ org.apache.geronimo.console.ejbserver.EjbHelper,
+ org.apache.geronimo.console.ejbserver.Tree,
+ org.apache.geronimo.console.message.JSCommonMessage
</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
Modified: geronimo/server/trunk/plugins/system-database/sysdb-portlets/src/main/java/org/apache/geronimo/console/databasemanager/wizard/DatabasePoolPortlet.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/system-database/sysdb-portlets/src/main/java/org/apache/geronimo/console/databasemanager/wizard/DatabasePoolPortlet.java?rev=753156&r1=753155&r2=753156&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/system-database/sysdb-portlets/src/main/java/org/apache/geronimo/console/databasemanager/wizard/DatabasePoolPortlet.java (original)
+++ geronimo/server/trunk/plugins/system-database/sysdb-portlets/src/main/java/org/apache/geronimo/console/databasemanager/wizard/DatabasePoolPortlet.java Fri Mar 13 08:21:04 2009
@@ -194,6 +194,7 @@
private PortletRequestDispatcher importUploadView;
private PortletRequestDispatcher importStatusView;
private PortletRequestDispatcher usageView;
+ private Map<String, String> rarPathMap;
public void init(PortletConfig portletConfig) throws PortletException {
super.init(portletConfig);
@@ -209,6 +210,22 @@
importUploadView = portletConfig.getPortletContext().getRequestDispatcher(IMPORT_UPLOAD_VIEW);
importStatusView = portletConfig.getPortletContext().getRequestDispatcher(IMPORT_STATUS_VIEW);
usageView = portletConfig.getPortletContext().getRequestDispatcher(USAGE_VIEW);
+ rarPathMap = new HashMap<String, String>();
+ rarPathMap.put("TranQL XA Resource Adapter for DB2", "tranql-connector-db2-xa");
+ rarPathMap.put("TranQL Client Local Transaction Resource Adapter for Apache Derby", "tranql-connector-derby-client-local");
+ rarPathMap.put("TranQL Client XA Resource Adapter for Apache Derby", "tranql-connector-derby-client-xa");
+// rarPathMap.put("TranQL Embedded Local Transaction Resource Adapter for Apache Derby", "tranql-connector-derby-embed-local");
+// rarPathMap.put("TranQL Embedded XA Resource Adapter for Apache Derby", "tranql-connector-derby-embed-xa");
+ rarPathMap.put("TranQL Embedded XA Resource Adapter for Apache Derby", "tranql-connector-derby-embed-local");
+ rarPathMap.put("TranQL XA Resource Adapter for Informix", "tranql-connector-informix-xa");
+ rarPathMap.put("TranQL Client Local Transaction Resource Adapter for MySQL", "tranql-connector-mysql-local");
+ rarPathMap.put("TranQL Client XA Resource Adapter for MySQL", "tranql-connector-mysql-xa");
+ rarPathMap.put("TranQL Local Resource Adapter for Oracle", "tranql-connector-oracle-local");
+ rarPathMap.put("TranQL XA Resource Adapter for Oracle", "tranql-connector-oracle-xa");
+ rarPathMap.put("TranQL Local Resource Adapter for PostgreSQL", "tranql-connector-postgresql-local");
+ rarPathMap.put("TranQL XA Resource Adapter for PostgreSQL", "tranql-connector-postgresql-xa");
+ rarPathMap.put("TranQL XA Resource Adapter for SQLServer 2000", "tranql-connector-sqlserver2000-xa");
+ rarPathMap.put("TranQL XA Resource Adapter for SQLServer 2005", "tranql-connector-sqlserver2005-xa");
}
public void destroy() {
@@ -224,6 +241,7 @@
importUploadView = null;
importStatusView = null;
usageView = null;
+ rarPathMap.clear();
super.destroy();
}
@@ -262,8 +280,7 @@
if (results == null) {
results = loadConfigPropertiesByPath(request, rarPath);
session.setAttribute(CONFIG_SESSION_KEY + "-" + rarPath, results, PortletSession.APPLICATION_SCOPE);
- session.setAttribute(CONFIG_SESSION_KEY + "-" + results.displayName, results,
- PortletSession.APPLICATION_SCOPE);
+ session.setAttribute(CONFIG_SESSION_KEY + "-" + results.displayName, results, PortletSession.APPLICATION_SCOPE);
}
return results;
} else if (displayName != null && !displayName.equals(
@@ -271,7 +288,7 @@
ResourceAdapterParams results = (ResourceAdapterParams) session.getAttribute(
CONFIG_SESSION_KEY + "-" + displayName, PortletSession.APPLICATION_SCOPE);
if (results == null) {
- results = loadConfigPropertiesByAbstractName(request, adapterAbstractName);
+ results = loadConfigPropertiesByAbstractName(request, rarPathMap.get(displayName), adapterAbstractName);
session.setAttribute(CONFIG_SESSION_KEY + "-" + displayName, results, PortletSession.APPLICATION_SCOPE);
}
return results;
@@ -577,8 +594,7 @@
}
}
}
- return new ResourceAdapterParams(adapterName, adapterDesc,
- configs.toArray(new ConfigParam[configs.size()]));
+ return new ResourceAdapterParams(adapterName, adapterDesc, rarPath.substring(11, rarPath.length()-5), configs.toArray(new ConfigParam[configs.size()]));
} catch (Exception e) {
log.error("Unable to read configuration properties", e);
return null;
@@ -587,7 +603,7 @@
}
}
- private ResourceAdapterParams loadConfigPropertiesByAbstractName(PortletRequest request, String abstractName) {
+ private ResourceAdapterParams loadConfigPropertiesByAbstractName(PortletRequest request, String rarPath, String abstractName) {
ResourceAdapterModule module = (ResourceAdapterModule) PortletManager.getManagedBean(request,
new AbstractName(URI.create(abstractName)));
String dd = module.getDeploymentDescriptor();
@@ -623,7 +639,7 @@
}
}
}
- return new ResourceAdapterParams(displayName, description, all.toArray(new ConfigParam[all.size()]));
+ return new ResourceAdapterParams(displayName, description, rarPath, all.toArray(new ConfigParam[all.size()]));
} catch (Exception e) {
log.error("Unable to read resource adapter DD", e);
return null;
@@ -781,6 +797,7 @@
data.getAdapterDisplayName(), renderRequest.getParameter("adapterAbstractName"));
data.adapterDisplayName = params.getDisplayName();
data.adapterDescription = params.getDescription();
+ data.adapterRarPath = params.getRarPath();
Map<String, ConfigParam> map = new HashMap<String, ConfigParam>();
boolean more = false;
for (int i = 0; i < params.getConfigParams().length; i++) {
@@ -1322,6 +1339,7 @@
private String abstractName;
private String adapterDisplayName;
private String adapterDescription;
+ private String adapterRarPath;
private String rarPath;
private String transactionType;
private String importSource;
@@ -1554,6 +1572,10 @@
return adapterDescription;
}
+ public String getAdapterRarPath() {
+ return adapterRarPath;
+ }
+
public String getRarPath() {
return rarPath;
}
@@ -1665,11 +1687,13 @@
public static class ResourceAdapterParams {
private String displayName;
private String description;
+ private String rarPath;
private ConfigParam[] configParams;
- public ResourceAdapterParams(String displayName, String description, ConfigParam[] configParams) {
+ public ResourceAdapterParams(String displayName, String description, String rarPath, ConfigParam[] configParams) {
this.displayName = displayName;
this.description = description;
+ this.rarPath = rarPath;
this.configParams = configParams;
}
@@ -1680,6 +1704,10 @@
public String getDescription() {
return description;
}
+
+ public String getRarPath() {
+ return rarPath;
+ }
public ConfigParam[] getConfigParams() {
return configParams;
Modified: geronimo/server/trunk/plugins/system-database/sysdb-portlets/src/main/resources/portletinfo.properties
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/system-database/sysdb-portlets/src/main/resources/portletinfo.properties?rev=753156&r1=753155&r2=753156&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/system-database/sysdb-portlets/src/main/resources/portletinfo.properties (original)
+++ geronimo/server/trunk/plugins/system-database/sysdb-portlets/src/main/resources/portletinfo.properties Fri Mar 13 08:21:04 2009
@@ -37,6 +37,11 @@
sysdb.errorMsg06 = Error encountered while deleting database.
sysdb.errorMsg07 = SQL command can't be empty.
sysdb.errorMsg08 = Error encountered while executing SQL command(s).
+sysdb.errorMsg09 = Unable to deploy: {0}.
+sysdb.errorMsg10 = Unable to load driver {0}.
+sysdb.errorMsg11 = The import operation failed!
sysdb.infoMsg01 = Database created: <b>{0}</b>.
sysdb.infoMsg02 = Database deleted: <b>{0}</b>.
sysdb.infoMsg03 = SQL command(s) executed successfully.
+sysdb.infoMsg04 = Connected to {0}.
+sysdb.warnMsg01 = There are no database pools defined.
Modified: geronimo/server/trunk/plugins/system-database/sysdb-portlets/src/main/resources/portletinfo_zh.properties
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/system-database/sysdb-portlets/src/main/resources/portletinfo_zh.properties?rev=753156&r1=753155&r2=753156&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/system-database/sysdb-portlets/src/main/resources/portletinfo_zh.properties (original)
+++ geronimo/server/trunk/plugins/system-database/sysdb-portlets/src/main/resources/portletinfo_zh.properties Fri Mar 13 08:21:04 2009
@@ -37,6 +37,11 @@
sysdb.errorMsg06 = \u5220\u9664\u6570\u636E\u5E93\u65F6\u9047\u5230\u9519\u8BEF\u3002
sysdb.errorMsg07 = \u7A7ASQL\u547D\u4EE4\u3002
sysdb.errorMsg08 = \u6267\u884CSQL\u547D\u4EE4\u65F6\u9047\u5230\u9519\u8BEF\u3002
+sysdb.errorMsg09 = \u65E0\u6CD5\u90E8\u7F72:{0}\u3002
+sysdb.errorMsg10 = \u65E0\u6CD5\u52A0\u8F7D\u9A71\u52A8{0}\u3002
+sysdb.errorMsg11 = \u5BFC\u5165\u8FDE\u63A5\u6C60\u5931\u8D25\uFF01
sysdb.infoMsg01 = \u5DF2\u521B\u5EFA\u6570\u636E\u5E93\uFF1A<b>{0}</b>\u3002
sysdb.infoMsg02 = \u5DF2\u5220\u9664\u6570\u636E\u5E93\uFF1A<b>{0}</b>\u3002
sysdb.infoMsg03 = SQL\u547D\u4EE4\u6267\u884C\u6210\u529F\u3002
+sysdb.infoMsg04 = \u8FDE\u63A5\u5230{0}\u3002
+sysdb.warnMsg01 = \u4E0D\u5B58\u5728\u9884\u5B9A\u4E49\u7684\u6570\u636E\u5E93\u8FDE\u63A5\u6C60\u3002