teiid SVN: r962 - in trunk/console/src/main/java/com/metamatrix: console/ui/views/properties and 1 other directories.
by teiid-commits@lists.jboss.org
Author: shawkins
Date: 2009-05-17 17:44:36 -0400 (Sun, 17 May 2009)
New Revision: 962
Modified:
trunk/console/src/main/java/com/metamatrix/console/ui/util/ExpertPropertiedObjectPanelHolder.java
trunk/console/src/main/java/com/metamatrix/console/ui/views/properties/ConsolePropertyObjectId.java
trunk/console/src/main/java/com/metamatrix/toolbox/ui/widget/property/PropertiedObjectPanel.java
Log:
TEIID-606 changed all of the console property views to only have a concept of hiding expert properties.
Modified: trunk/console/src/main/java/com/metamatrix/console/ui/util/ExpertPropertiedObjectPanelHolder.java
===================================================================
--- trunk/console/src/main/java/com/metamatrix/console/ui/util/ExpertPropertiedObjectPanelHolder.java 2009-05-17 20:28:24 UTC (rev 961)
+++ trunk/console/src/main/java/com/metamatrix/console/ui/util/ExpertPropertiedObjectPanelHolder.java 2009-05-17 21:44:36 UTC (rev 962)
@@ -59,7 +59,7 @@
GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
if (expertCheckBoxChangeListener != null) {
- expertPropertiesCheckBox = new CheckBox("Include expert properties"); //$NON-NLS-1$
+ expertPropertiesCheckBox = new CheckBox("Include expert properties", thePanel.getShowExpertProperties()?CheckBox.SELECTED:CheckBox.DESELECTED); //$NON-NLS-1$
expertPropertiesCheckBox.addItemListener(expertCheckBoxChangeListener);
buttonPanel.add(expertPropertiesCheckBox);
} else {
Modified: trunk/console/src/main/java/com/metamatrix/console/ui/views/properties/ConsolePropertyObjectId.java
===================================================================
--- trunk/console/src/main/java/com/metamatrix/console/ui/views/properties/ConsolePropertyObjectId.java 2009-05-17 20:28:24 UTC (rev 961)
+++ trunk/console/src/main/java/com/metamatrix/console/ui/views/properties/ConsolePropertyObjectId.java 2009-05-17 21:44:36 UTC (rev 962)
@@ -122,7 +122,7 @@
Iterator iter = pd.iterator();
while ( iter.hasNext()){
PropertyDefinition propDefn = (PropertyDefinition)iter.next();
- boolean expert = propDefn.isExpert() && !propDefn.isRequired();
+ boolean expert = propDefn.isExpert() && (!propDefn.isRequired() || propDefn.hasDefaultValue());
if(((expert && isExpertProperties()) || (!expert && !isExpertProperties()) || isBothBEProperties()) && !propDefnsBE.contains(propDefn)){
propDefnsBE.add(propDefn);
}
Modified: trunk/console/src/main/java/com/metamatrix/toolbox/ui/widget/property/PropertiedObjectPanel.java
===================================================================
--- trunk/console/src/main/java/com/metamatrix/toolbox/ui/widget/property/PropertiedObjectPanel.java 2009-05-17 20:28:24 UTC (rev 961)
+++ trunk/console/src/main/java/com/metamatrix/toolbox/ui/widget/property/PropertiedObjectPanel.java 2009-05-17 21:44:36 UTC (rev 962)
@@ -654,7 +654,7 @@
if ( ! showHidden && (def.isHidden() || !def.isModifiable())) {
continue;
}
- if ( ! showExpert && def.isExpert() && !def.isRequired() ) {
+ if ( ! showExpert && def.isExpert() && (!def.isRequired() || def.hasDefaultValue())) {
continue;
}
if ( propertiesToFilterOut.contains(def) ) {
15 years, 7 months
teiid SVN: r961 - in trunk/console/src/main/java/com/metamatrix: console/ui/views/authorization and 5 other directories.
by teiid-commits@lists.jboss.org
Author: shawkins
Date: 2009-05-17 16:28:24 -0400 (Sun, 17 May 2009)
New Revision: 961
Removed:
trunk/console/src/main/java/com/metamatrix/console/ui/util/AbstractPropertiedObjectPanelHolder.java
trunk/console/src/main/java/com/metamatrix/console/ui/util/PropertiedObjectPanelHolder.java
Modified:
trunk/console/src/main/java/com/metamatrix/console/ui/util/ExpertPropertiedObjectPanelHolder.java
trunk/console/src/main/java/com/metamatrix/console/ui/util/POPWithButtons.java
trunk/console/src/main/java/com/metamatrix/console/ui/views/authorization/AuthenticationProviderPropertiesPanel.java
trunk/console/src/main/java/com/metamatrix/console/ui/views/authorization/NewAuthenticationProviderSpecificationPanel.java
trunk/console/src/main/java/com/metamatrix/console/ui/views/connectorbinding/BindingPropertiesPanel.java
trunk/console/src/main/java/com/metamatrix/console/ui/views/connectorbinding/NewBindingWizardSpecificationPanel.java
trunk/console/src/main/java/com/metamatrix/console/ui/views/deploy/ServiceDefinitionPropertiesPanel.java
trunk/console/src/main/java/com/metamatrix/console/ui/views/properties/ConsolePropertyObjectId.java
trunk/console/src/main/java/com/metamatrix/console/ui/views/resources/ResourcesMainPanel.java
trunk/console/src/main/java/com/metamatrix/toolbox/ui/widget/property/PropertiedObjectPanel.java
Log:
TEIID-606 changed all of the console property views to only have a concept of hiding expert properties.
Deleted: trunk/console/src/main/java/com/metamatrix/console/ui/util/AbstractPropertiedObjectPanelHolder.java
===================================================================
--- trunk/console/src/main/java/com/metamatrix/console/ui/util/AbstractPropertiedObjectPanelHolder.java 2009-05-17 11:59:58 UTC (rev 960)
+++ trunk/console/src/main/java/com/metamatrix/console/ui/util/AbstractPropertiedObjectPanelHolder.java 2009-05-17 20:28:24 UTC (rev 961)
@@ -1,51 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * See the COPYRIGHT.txt file distributed with this work for information
- * regarding copyright ownership. Some portions may be licensed
- * to Red Hat, Inc. under one or more contributor license agreements.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301 USA.
- */
-
-package com.metamatrix.console.ui.util;
-
-import javax.swing.JPanel;
-
-import com.metamatrix.toolbox.ui.widget.CheckBox;
-import com.metamatrix.toolbox.ui.widget.property.PropertiedObjectPanel;
-
-public abstract class AbstractPropertiedObjectPanelHolder extends JPanel {
- protected PropertiedObjectPanel thePanel;
- protected CheckBox optionalPropertiesCheckBox = null;
-
- public AbstractPropertiedObjectPanelHolder(PropertiedObjectPanel pnl) {
- super();
- thePanel = pnl;
- }
-
-
- public PropertiedObjectPanel getThePanel() {
- return thePanel;
- }
-
- public boolean isIncludingOptionalProperties() {
- return optionalPropertiesCheckBox.isSelected();
- }
-
- public void setIsIncludingOptionalProperties( boolean b ) {
- optionalPropertiesCheckBox.setSelected( b );
- }
-}
Modified: trunk/console/src/main/java/com/metamatrix/console/ui/util/ExpertPropertiedObjectPanelHolder.java
===================================================================
--- trunk/console/src/main/java/com/metamatrix/console/ui/util/ExpertPropertiedObjectPanelHolder.java 2009-05-17 11:59:58 UTC (rev 960)
+++ trunk/console/src/main/java/com/metamatrix/console/ui/util/ExpertPropertiedObjectPanelHolder.java 2009-05-17 20:28:24 UTC (rev 961)
@@ -33,16 +33,17 @@
import com.metamatrix.toolbox.ui.widget.CheckBox;
import com.metamatrix.toolbox.ui.widget.property.PropertiedObjectPanel;
-public class ExpertPropertiedObjectPanelHolder extends AbstractPropertiedObjectPanelHolder {
+public class ExpertPropertiedObjectPanelHolder extends JPanel {
protected CheckBox expertPropertiesCheckBox = null;
+ protected PropertiedObjectPanel thePanel;
public ExpertPropertiedObjectPanelHolder(PropertiedObjectPanel pnl,
- ItemListener expertCheckBoxChangeListener, ItemListener optionalCheckBoxChangeListener) {
- super(pnl);
- init(expertCheckBoxChangeListener, optionalCheckBoxChangeListener);
+ ItemListener expertCheckBoxChangeListener) {
+ this.thePanel = pnl;
+ init(expertCheckBoxChangeListener);
}
- protected void init(ItemListener expertCheckBoxChangeListener, ItemListener optionalCheckBoxChangeListener) {
+ protected void init(ItemListener expertCheckBoxChangeListener) {
setBorder(BorderFactory.createEtchedBorder());
GridBagLayout layout = new GridBagLayout();
setLayout(layout);
@@ -61,13 +62,12 @@
expertPropertiesCheckBox = new CheckBox("Include expert properties"); //$NON-NLS-1$
expertPropertiesCheckBox.addItemListener(expertCheckBoxChangeListener);
buttonPanel.add(expertPropertiesCheckBox);
+ } else {
+ layout.setConstraints(buttonPanel, new GridBagConstraints(0, 0, 1, 1,
+ 0.0, 0.0, GridBagConstraints.CENTER,
+ GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
}
- if (optionalCheckBoxChangeListener != null) {
- optionalPropertiesCheckBox = new CheckBox("Include optional properties", CheckBox.SELECTED); //$NON-NLS-1$
- optionalPropertiesCheckBox.addItemListener(optionalCheckBoxChangeListener);
- buttonPanel.add(optionalPropertiesCheckBox);
- }
}
public boolean isIncludingExpertProperties() {
@@ -77,4 +77,8 @@
public void setIsIncludingExpertProperties( boolean b ) {
expertPropertiesCheckBox.setSelected( b );
}
+
+ public PropertiedObjectPanel getThePanel() {
+ return thePanel;
+ }
}
Modified: trunk/console/src/main/java/com/metamatrix/console/ui/util/POPWithButtons.java
===================================================================
--- trunk/console/src/main/java/com/metamatrix/console/ui/util/POPWithButtons.java 2009-05-17 11:59:58 UTC (rev 960)
+++ trunk/console/src/main/java/com/metamatrix/console/ui/util/POPWithButtons.java 2009-05-17 20:28:24 UTC (rev 961)
@@ -49,7 +49,7 @@
public class POPWithButtons extends JPanel
implements PropertyChangeListener {
- private AbstractPropertiedObjectPanelHolder thePanel;
+ private ExpertPropertiedObjectPanelHolder thePanel;
private PropertiedObjectEditor theEditor;
private AbstractButton applyButton;
private AbstractButton resetButton;
@@ -59,7 +59,7 @@
defsMap = new HashMap();
private POPWithButtonsController controller;
- public POPWithButtons(AbstractPropertiedObjectPanelHolder pnl,
+ public POPWithButtons(ExpertPropertiedObjectPanelHolder pnl,
PropertiedObjectEditor edtr,
POPWithButtonsController ctrlr) {
super();
@@ -74,7 +74,7 @@
public POPWithButtons(PropertiedObjectPanel pnl,
PropertiedObjectEditor editor, POPWithButtonsController controller) {
- this(new PropertiedObjectPanelHolder(pnl, null), editor, controller);
+ this(new ExpertPropertiedObjectPanelHolder(pnl, null), editor, controller);
}
private void init() {
Deleted: trunk/console/src/main/java/com/metamatrix/console/ui/util/PropertiedObjectPanelHolder.java
===================================================================
--- trunk/console/src/main/java/com/metamatrix/console/ui/util/PropertiedObjectPanelHolder.java 2009-05-17 11:59:58 UTC (rev 960)
+++ trunk/console/src/main/java/com/metamatrix/console/ui/util/PropertiedObjectPanelHolder.java 2009-05-17 20:28:24 UTC (rev 961)
@@ -1,70 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * See the COPYRIGHT.txt file distributed with this work for information
- * regarding copyright ownership. Some portions may be licensed
- * to Red Hat, Inc. under one or more contributor license agreements.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301 USA.
- */
-
-package com.metamatrix.console.ui.util;
-
-import java.awt.BorderLayout;
-import java.awt.GridBagConstraints;
-import java.awt.GridBagLayout;
-import java.awt.Insets;
-import java.awt.event.ItemListener;
-
-import javax.swing.BorderFactory;
-import javax.swing.JPanel;
-
-import com.metamatrix.toolbox.ui.widget.CheckBox;
-import com.metamatrix.toolbox.ui.widget.property.PropertiedObjectPanel;
-
-public class PropertiedObjectPanelHolder extends AbstractPropertiedObjectPanelHolder {
- public PropertiedObjectPanelHolder(PropertiedObjectPanel pnl,
- ItemListener checkBoxChangeListener) {
- super(pnl);
- init(checkBoxChangeListener);
- }
-
- private void init(ItemListener checkBoxChangeListener) {
- setBorder(BorderFactory.createEtchedBorder());
- GridBagLayout layout = new GridBagLayout();
- setLayout(layout);
- add(thePanel);
- layout.setConstraints(thePanel, new GridBagConstraints(0, 1, 1, 1, 1.0, 1.0,
- GridBagConstraints.CENTER, GridBagConstraints.BOTH,
- new Insets(2, 2, 2, 2), 0, 0));
- JPanel topPanel = new JPanel();
- add(topPanel);
-
- topPanel.setLayout(new BorderLayout());
-
- if (checkBoxChangeListener != null) {
- optionalPropertiesCheckBox = new CheckBox("Include optional properties"); //$NON-NLS-1$
- optionalPropertiesCheckBox.addItemListener(checkBoxChangeListener);
- topPanel.add(optionalPropertiesCheckBox, BorderLayout.EAST);
- layout.setConstraints(topPanel, new GridBagConstraints(0, 0, 1, 1,
- 0.0, 0.0, GridBagConstraints.CENTER,
- GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0));
- } else {
- layout.setConstraints(topPanel, new GridBagConstraints(0, 0, 1, 1,
- 0.0, 0.0, GridBagConstraints.CENTER,
- GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
- }
- }
-}
Modified: trunk/console/src/main/java/com/metamatrix/console/ui/views/authorization/AuthenticationProviderPropertiesPanel.java
===================================================================
--- trunk/console/src/main/java/com/metamatrix/console/ui/views/authorization/AuthenticationProviderPropertiesPanel.java 2009-05-17 11:59:58 UTC (rev 960)
+++ trunk/console/src/main/java/com/metamatrix/console/ui/views/authorization/AuthenticationProviderPropertiesPanel.java 2009-05-17 20:28:24 UTC (rev 961)
@@ -187,7 +187,6 @@
getPropertiedObjectPanel().setShowInvalidProperties(true);
getPropertiedObjectPanel().setShowHiddenProperties(false);
getPropertiedObjectPanel().setShowExpertProperties(false);
- getPropertiedObjectPanel().setShowOptionalProperties(true);
if (!canModify) {
getPropertiedObjectPanel().setReadOnlyForced(true);
@@ -208,13 +207,7 @@
}
};
- ItemListener includeOptionalListener = new ItemListener() {
- public void itemStateChanged(ItemEvent ev) {
- includeOptionalStateChanged();
- }
- };
-
- popHolder = new ExpertPropertiedObjectPanelHolder(pop, includeExpertListener, includeOptionalListener);
+ popHolder = new ExpertPropertiedObjectPanelHolder(pop, includeExpertListener);
popWithButtons = new POPWithButtons(popHolder, poe, this);
pnlPOPShell.add(popWithButtons);
@@ -234,12 +227,6 @@
getPropertiedObjectPanel().refreshDisplay();
}
- private void includeOptionalStateChanged() {
- getPropertiedObjectPanel().setShowOptionalProperties(
- popHolder.isIncludingOptionalProperties());
- getPropertiedObjectPanel().refreshDisplay();
- }
-
public ComponentDefn getNewProvider() {
return providerDefn;
}
Modified: trunk/console/src/main/java/com/metamatrix/console/ui/views/authorization/NewAuthenticationProviderSpecificationPanel.java
===================================================================
--- trunk/console/src/main/java/com/metamatrix/console/ui/views/authorization/NewAuthenticationProviderSpecificationPanel.java 2009-05-17 11:59:58 UTC (rev 960)
+++ trunk/console/src/main/java/com/metamatrix/console/ui/views/authorization/NewAuthenticationProviderSpecificationPanel.java 2009-05-17 20:28:24 UTC (rev 961)
@@ -208,7 +208,6 @@
popThePanel.setShowInvalidProperties(true);
popThePanel.setShowHiddenProperties(false);
popThePanel.setShowExpertProperties(false);
- popThePanel.setShowOptionalProperties(true);
popThePanel.refreshDisplay();
popThePanel.createComponent();
@@ -221,14 +220,8 @@
}
};
- ItemListener includeOptionalListener = new ItemListener() {
- public void itemStateChanged(ItemEvent ev) {
- includeOptionalStateChanged();
- }
- };
- popHolder = new ExpertPropertiedObjectPanelHolder(popThePanel, includeExpertListener, includeOptionalListener);
+ popHolder = new ExpertPropertiedObjectPanelHolder(popThePanel, includeExpertListener);
popHolder.setIsIncludingExpertProperties(false);
- popHolder.setIsIncludingOptionalProperties(true);
pnlPOPShell.add(popHolder);
setInitialValues();
@@ -249,11 +242,6 @@
popThePanel.refreshDisplay();
}
- private void includeOptionalStateChanged() {
- popThePanel.setShowOptionalProperties(popHolder.isIncludingOptionalProperties());
- popThePanel.refreshDisplay();
- }
-
public AuthenticationProvider getNewAuthenticationProvider() {
return scdNewAuthenticationProvider;
}
Modified: trunk/console/src/main/java/com/metamatrix/console/ui/views/connectorbinding/BindingPropertiesPanel.java
===================================================================
--- trunk/console/src/main/java/com/metamatrix/console/ui/views/connectorbinding/BindingPropertiesPanel.java 2009-05-17 11:59:58 UTC (rev 960)
+++ trunk/console/src/main/java/com/metamatrix/console/ui/views/connectorbinding/BindingPropertiesPanel.java 2009-05-17 20:28:24 UTC (rev 961)
@@ -52,7 +52,7 @@
public class BindingPropertiesPanel extends JPanel
implements POPWithButtonsController {
private PropertiedObjectPanel pop;
- private PropertiedObjectPanelHolder popHolder;
+ private ExpertPropertiedObjectPanelHolder popHolder;
private POPWithButtons popWithButtons = null;
private TextFieldWidget txfConnectorName = new TextFieldWidget();
@@ -177,7 +177,6 @@
getPropertiedObjectPanel().setShowInvalidProperties(true);
getPropertiedObjectPanel().setShowHiddenProperties(false);
getPropertiedObjectPanel().setShowExpertProperties(true);
- getPropertiedObjectPanel().setShowOptionalProperties(false);
if (!canModify) {
getPropertiedObjectPanel().setReadOnlyForced(true);
@@ -186,23 +185,23 @@
getPropertiedObjectPanel().createComponent();
getPropertiedObjectPanel().refreshDisplay();
- boolean includeOptional = false;
+ boolean includeExpert = false;
if (popHolder != null) {
- includeOptional = popHolder.isIncludingOptionalProperties();
+ includeExpert = popHolder.isIncludingExpertProperties();
}
pnlPOPShell.removeAll();
ItemListener includeOptionalListener = new ItemListener() {
public void itemStateChanged(ItemEvent ev) {
- includeOptionalStateChanged();
+ includeExpertStateChanged();
}
};
- popHolder = new PropertiedObjectPanelHolder(pop, includeOptionalListener);
+ popHolder = new ExpertPropertiedObjectPanelHolder(pop, includeOptionalListener);
popWithButtons = new POPWithButtons(popHolder, poe, this);
pnlPOPShell.add(popWithButtons);
- popHolder.setIsIncludingOptionalProperties(includeOptional);
+ popHolder.setIsIncludingExpertProperties(includeExpert);
} catch(Exception e) {
ExceptionUtility.showMessage("Failed while creating Connector Binding Panel", //$NON-NLS-1$
@@ -211,9 +210,9 @@
}
- private void includeOptionalStateChanged() {
- getPropertiedObjectPanel().setShowOptionalProperties(
- popHolder.isIncludingOptionalProperties());
+ private void includeExpertStateChanged() {
+ getPropertiedObjectPanel().setShowExpertProperties(
+ popHolder.isIncludingExpertProperties());
getPropertiedObjectPanel().refreshDisplay();
}
Modified: trunk/console/src/main/java/com/metamatrix/console/ui/views/connectorbinding/NewBindingWizardSpecificationPanel.java
===================================================================
--- trunk/console/src/main/java/com/metamatrix/console/ui/views/connectorbinding/NewBindingWizardSpecificationPanel.java 2009-05-17 11:59:58 UTC (rev 960)
+++ trunk/console/src/main/java/com/metamatrix/console/ui/views/connectorbinding/NewBindingWizardSpecificationPanel.java 2009-05-17 20:28:24 UTC (rev 961)
@@ -52,8 +52,8 @@
import com.metamatrix.console.models.ModelManager;
import com.metamatrix.console.ui.layout.ConsoleMainFrame;
import com.metamatrix.console.ui.util.BasicWizardSubpanelContainer;
+import com.metamatrix.console.ui.util.ExpertPropertiedObjectPanelHolder;
import com.metamatrix.console.ui.util.InitialAndCurrentValues;
-import com.metamatrix.console.ui.util.PropertiedObjectPanelHolder;
import com.metamatrix.console.ui.util.WizardInterface;
import com.metamatrix.console.util.ExceptionUtility;
import com.metamatrix.console.util.StaticUtilities;
@@ -202,7 +202,6 @@
popThePanel.setShowInvalidProperties(true);
popThePanel.setShowHiddenProperties(false);
popThePanel.setShowExpertProperties(true);
- popThePanel.setShowOptionalProperties(false);
popThePanel.refreshDisplay();
popThePanel.createComponent();
@@ -212,10 +211,10 @@
ItemListener popChangeListener = new ItemListener() {
public void itemStateChanged(ItemEvent ev) {
- includeOptionalsChanged(ev);
+ includeExpertChanged(ev);
}
};
- pnlPOPShell.add(new PropertiedObjectPanelHolder(popThePanel, popChangeListener));
+ pnlPOPShell.add(new ExpertPropertiedObjectPanelHolder(popThePanel, popChangeListener));
setInitialValues();
popThePanel.addPropertyChangeListener(this);
@@ -230,9 +229,9 @@
}
}
- private void includeOptionalsChanged(ItemEvent ev) {
+ private void includeExpertChanged(ItemEvent ev) {
CheckBox cb = (CheckBox)ev.getSource();
- popThePanel.setShowOptionalProperties(cb.isSelected());
+ popThePanel.setShowExpertProperties(cb.isSelected());
popThePanel.refreshDisplay();
}
Modified: trunk/console/src/main/java/com/metamatrix/console/ui/views/deploy/ServiceDefinitionPropertiesPanel.java
===================================================================
--- trunk/console/src/main/java/com/metamatrix/console/ui/views/deploy/ServiceDefinitionPropertiesPanel.java 2009-05-17 11:59:58 UTC (rev 960)
+++ trunk/console/src/main/java/com/metamatrix/console/ui/views/deploy/ServiceDefinitionPropertiesPanel.java 2009-05-17 20:28:24 UTC (rev 961)
@@ -42,14 +42,12 @@
import com.metamatrix.console.models.ConfigurationPropertiedObjectEditor;
import com.metamatrix.console.models.ModelManager;
import com.metamatrix.console.ui.layout.ConsoleMainFrame;
+import com.metamatrix.console.ui.util.ExpertPropertiedObjectPanelHolder;
import com.metamatrix.console.ui.util.POPWithButtons;
import com.metamatrix.console.ui.util.POPWithButtonsController;
-import com.metamatrix.console.ui.util.PropertiedObjectPanelHolder;
import com.metamatrix.console.util.ExceptionUtility;
import com.metamatrix.console.util.LogContexts;
import com.metamatrix.console.util.StaticUtilities;
-import com.metamatrix.toolbox.ui.widget.LabelWidget;
-import com.metamatrix.toolbox.ui.widget.TextFieldWidget;
import com.metamatrix.toolbox.ui.widget.property.PropertiedObjectPanel;
@@ -57,7 +55,7 @@
public class ServiceDefinitionPropertiesPanel extends JPanel
implements POPWithButtonsController {
private PropertiedObjectPanel pop;
- private PropertiedObjectPanelHolder popHolder;
+ private ExpertPropertiedObjectPanelHolder popHolder;
private POPWithButtons popWithButtons = null;
// private TextFieldWidget txfServiceName = new TextFieldWidget();
@@ -182,7 +180,6 @@
getPropertiedObjectPanel().setShowInvalidProperties(true);
getPropertiedObjectPanel().setShowHiddenProperties(false);
getPropertiedObjectPanel().setShowExpertProperties(true);
- getPropertiedObjectPanel().setShowOptionalProperties(false);
if (!canModify) {
getPropertiedObjectPanel().setReadOnlyForced(true);
@@ -191,23 +188,23 @@
getPropertiedObjectPanel().createComponent();
getPropertiedObjectPanel().refreshDisplay();
- boolean includeOptional = false;
+ boolean includeExpert = false;
if (popHolder != null) {
- includeOptional = popHolder.isIncludingOptionalProperties();
+ includeExpert = popHolder.isIncludingExpertProperties();
}
pnlPOPShell.removeAll();
- ItemListener includeOptionalListener = new ItemListener() {
+ ItemListener includeExpertListener = new ItemListener() {
public void itemStateChanged(ItemEvent ev) {
includeOptionalStateChanged();
}
};
- popHolder = new PropertiedObjectPanelHolder(pop, includeOptionalListener);
+ popHolder = new ExpertPropertiedObjectPanelHolder(pop, includeExpertListener);
popWithButtons = new POPWithButtons(popHolder, poe, this);
pnlPOPShell.add(popWithButtons);
- popHolder.setIsIncludingOptionalProperties(includeOptional);
+ popHolder.setIsIncludingExpertProperties(includeExpert);
} catch(Exception e) {
ExceptionUtility.showMessage("Failed while creating Service Definition Panel", //$NON-NLS-1$
@@ -217,8 +214,8 @@
}
private void includeOptionalStateChanged() {
- getPropertiedObjectPanel().setShowOptionalProperties(
- popHolder.isIncludingOptionalProperties());
+ getPropertiedObjectPanel().setShowExpertProperties(
+ popHolder.isIncludingExpertProperties());
getPropertiedObjectPanel().refreshDisplay();
}
Modified: trunk/console/src/main/java/com/metamatrix/console/ui/views/properties/ConsolePropertyObjectId.java
===================================================================
--- trunk/console/src/main/java/com/metamatrix/console/ui/views/properties/ConsolePropertyObjectId.java 2009-05-17 11:59:58 UTC (rev 960)
+++ trunk/console/src/main/java/com/metamatrix/console/ui/views/properties/ConsolePropertyObjectId.java 2009-05-17 20:28:24 UTC (rev 961)
@@ -115,50 +115,18 @@
}
}
- else {
- //ystem.out.println("Not find groupPropertyDefination,should call getPropertyDefinitions in ConsolePropertiedEditor to gain groupPropertyDefination");
- }
-
}
private ArrayList filterBEpropDefns(Collection pd){
ArrayList propDefnsBE = new ArrayList();
- if (isBasicProperties()){
- Iterator iter = pd.iterator();
- while ( iter.hasNext()){
- PropertyDefinition propDefn = (PropertyDefinition)iter.next();
- if (!propDefn.isExpert()){
- if(!propDefnsBE.contains(propDefn)){
- propDefnsBE.add(propDefn);
- }
- }
+ Iterator iter = pd.iterator();
+ while ( iter.hasNext()){
+ PropertyDefinition propDefn = (PropertyDefinition)iter.next();
+ boolean expert = propDefn.isExpert() && !propDefn.isRequired();
+ if(((expert && isExpertProperties()) || (!expert && !isExpertProperties()) || isBothBEProperties()) && !propDefnsBE.contains(propDefn)){
+ propDefnsBE.add(propDefn);
}
- return propDefnsBE;
}
-
- if (isExpertProperties()){
- Iterator iter = pd.iterator();
- while ( iter.hasNext()){
- PropertyDefinition propDefn = (PropertyDefinition)iter.next();
- if (propDefn.isExpert()){
- if(!propDefnsBE.contains(propDefn)){
- propDefnsBE.add(propDefn);
- }
- }
- }
- return propDefnsBE;
- }
-
- if (isBothBEProperties()){
- Iterator iter = pd.iterator();
- while ( iter.hasNext()){
- PropertyDefinition propDefn = (PropertyDefinition)iter.next();
- if(!propDefnsBE.contains(propDefn)){
- propDefnsBE.add(propDefn);
- }
- }
- return propDefnsBE;
- }
return propDefnsBE;
}
Modified: trunk/console/src/main/java/com/metamatrix/console/ui/views/resources/ResourcesMainPanel.java
===================================================================
--- trunk/console/src/main/java/com/metamatrix/console/ui/views/resources/ResourcesMainPanel.java 2009-05-17 11:59:58 UTC (rev 960)
+++ trunk/console/src/main/java/com/metamatrix/console/ui/views/resources/ResourcesMainPanel.java 2009-05-17 20:28:24 UTC (rev 961)
@@ -56,9 +56,9 @@
import com.metamatrix.console.ui.layout.BasePanel;
import com.metamatrix.console.ui.layout.ConsoleMainFrame;
import com.metamatrix.console.ui.layout.WorkspacePanel;
+import com.metamatrix.console.ui.util.ExpertPropertiedObjectPanelHolder;
import com.metamatrix.console.ui.util.POPWithButtons;
import com.metamatrix.console.ui.util.POPWithButtonsController;
-import com.metamatrix.console.ui.util.PropertiedObjectPanelHolder;
import com.metamatrix.console.ui.views.DefaultConsoleTableComparator;
import com.metamatrix.console.util.DialogUtility;
import com.metamatrix.console.util.ExceptionUtility;
@@ -146,7 +146,7 @@
pop = new PropertiedObjectPanel(rpoe, manager.getEncryptor());
pop.setReadOnlyForced(!canModify);
pop.createComponent();
- PropertiedObjectPanelHolder popHolder = new PropertiedObjectPanelHolder(
+ ExpertPropertiedObjectPanelHolder popHolder = new ExpertPropertiedObjectPanelHolder(
pop, null);
popWithButtons = new POPWithButtons(popHolder, rpoe, this);
popWithButtons.setButtonsVisible(canModify);
Modified: trunk/console/src/main/java/com/metamatrix/toolbox/ui/widget/property/PropertiedObjectPanel.java
===================================================================
--- trunk/console/src/main/java/com/metamatrix/toolbox/ui/widget/property/PropertiedObjectPanel.java 2009-05-17 11:59:58 UTC (rev 960)
+++ trunk/console/src/main/java/com/metamatrix/toolbox/ui/widget/property/PropertiedObjectPanel.java 2009-05-17 20:28:24 UTC (rev 961)
@@ -86,6 +86,7 @@
*/
public class PropertiedObjectPanel extends JPanel
implements UIConstants {
+
//############################################################################################################################
//# Constants #
//############################################################################################################################
@@ -140,7 +141,6 @@
private boolean showToolTips = true;
private boolean showRequired = false;
private boolean showInvalid = false;
- private boolean showOptional = true;
private boolean readOnlyForced = false;
private Collection propertiesToFilterOut = Collections.EMPTY_LIST;
@@ -651,26 +651,20 @@
Iterator iter = defs.iterator();
while ( iter.hasNext() ) {
PropertyDefinition def = (PropertyDefinition) iter.next();
- boolean addToList = true;
- if ( ! showExpert && def.isExpert() ) {
- addToList = false;
+ if ( ! showHidden && (def.isHidden() || !def.isModifiable())) {
+ continue;
}
- if ( ! showHidden && def.isHidden() ) {
- addToList = false;
+ if ( ! showExpert && def.isExpert() && !def.isRequired() ) {
+ continue;
}
- if (!showOptional && !def.isRequired()) {
- addToList = false;
- }
if ( propertiesToFilterOut.contains(def) ) {
- addToList = false;
+ continue;
}
// Skip read-only password fields
if (def.isMasked() && (readOnlyForced || !def.isModifiable() || editor.isReadOnly(propObj))) {
- addToList = false;
+ continue;
}
- if ( addToList ) {
- result.add(def);
- }
+ result.add(def);
}
return result;
}
@@ -795,13 +789,6 @@
/**
@since 2.0
*/
- public boolean getShowOptionalProperties() {
- return showOptional;
- }
-
- /**
- @since 2.0
- */
public boolean getShowRequiredProperties() {
return showRequired;
}
@@ -1198,15 +1185,6 @@
}
/**
- Sets whether properties not marked as required (i.e., optional properties) should be shown.
- @param show True if optional properties should be shown. The default is true.
- @since 2.0
- */
- public void setShowOptionalProperties(final boolean show) {
- showOptional = show;
- }
-
- /**
Sets whether properties marked as required should be shown with a special indication.
@param showRequired True if required properties should be shown. The default is false.
@since 2.0
15 years, 7 months
teiid SVN: r960 - in trunk: server/src/main/java/com/metamatrix/common/messaging/jgroups and 7 other directories.
by teiid-commits@lists.jboss.org
Author: shawkins
Date: 2009-05-17 07:59:58 -0400 (Sun, 17 May 2009)
New Revision: 960
Added:
trunk/server/src/main/java/com/metamatrix/platform/registry/RegistryBinding.java
trunk/server/src/main/java/com/metamatrix/platform/service/controller/ServiceData.java
Modified:
trunk/common-internal/src/main/java/com/metamatrix/platform/admin/api/runtime/ServiceData.java
trunk/server/src/main/java/com/metamatrix/common/messaging/jgroups/JGroupsMessageBus.java
trunk/server/src/main/java/com/metamatrix/common/messaging/jgroups/RemoteProxy.java
trunk/server/src/main/java/com/metamatrix/platform/registry/ClusteredRegistryState.java
trunk/server/src/main/java/com/metamatrix/platform/registry/HostControllerRegistryBinding.java
trunk/server/src/main/java/com/metamatrix/platform/registry/ProcessMonitor.java
trunk/server/src/main/java/com/metamatrix/platform/registry/ProcessRegistryBinding.java
trunk/server/src/main/java/com/metamatrix/platform/registry/ServiceRegistryBinding.java
trunk/server/src/main/java/com/metamatrix/platform/service/api/ServiceInterface.java
trunk/server/src/main/java/com/metamatrix/platform/service/controller/AbstractService.java
trunk/server/src/main/java/com/metamatrix/platform/vm/controller/ProcessController.java
trunk/server/src/test/java/com/metamatrix/admin/server/FakeCacheAdmin.java
trunk/server/src/test/java/com/metamatrix/admin/server/FakeConfigurationService.java
trunk/server/src/test/java/com/metamatrix/admin/server/FakeQueryService.java
trunk/server/src/test/java/com/metamatrix/admin/server/FakeServerSessionService.java
trunk/server/src/test/java/com/metamatrix/admin/server/TestServerMonitoringAdminImpl.java
trunk/server/src/test/java/com/metamatrix/platform/registry/FakeRegistryUtil.java
trunk/server/src/test/java/com/metamatrix/platform/registry/TestServiceRegistryBinding.java
trunk/server/src/test/java/com/metamatrix/platform/service/controller/FakeService.java
Log:
TEIID-601 various fixes for better behavior when a process is killed
Modified: trunk/common-internal/src/main/java/com/metamatrix/platform/admin/api/runtime/ServiceData.java
===================================================================
--- trunk/common-internal/src/main/java/com/metamatrix/platform/admin/api/runtime/ServiceData.java 2009-05-17 00:02:22 UTC (rev 959)
+++ trunk/common-internal/src/main/java/com/metamatrix/platform/admin/api/runtime/ServiceData.java 2009-05-17 11:59:58 UTC (rev 960)
@@ -25,6 +25,7 @@
import java.util.Collection;
import java.util.Date;
+import com.metamatrix.api.exception.ExceptionHolder;
import com.metamatrix.common.config.api.ComponentDefnID;
import com.metamatrix.platform.service.api.ServiceID;
@@ -57,7 +58,7 @@
private Collection queueNames;
/** initialization Exception */
- private Throwable initError;
+ private ExceptionHolder initError;
/**
* Create new ServiceRegistryInstance
@@ -91,7 +92,9 @@
this.currentState = state;
this.stateChangeTime = time;
this.essential = essential;
- this.initError = initError;
+ if (initError != null) {
+ this.initError = new ExceptionHolder(initError);
+ }
computeHashCode();
}
@@ -128,7 +131,10 @@
}
public Throwable getInitError() {
- return this.initError;
+ if (this.initError != null) {
+ return this.initError.getException();
+ }
+ return null;
}
public boolean isEssential() {
Modified: trunk/server/src/main/java/com/metamatrix/common/messaging/jgroups/JGroupsMessageBus.java
===================================================================
--- trunk/server/src/main/java/com/metamatrix/common/messaging/jgroups/JGroupsMessageBus.java 2009-05-17 00:02:22 UTC (rev 959)
+++ trunk/server/src/main/java/com/metamatrix/common/messaging/jgroups/JGroupsMessageBus.java 2009-05-17 11:59:58 UTC (rev 960)
@@ -145,7 +145,11 @@
throw new RemoteMessagingException(PlatformPlugin.Util.getString("JGroupsMessageBus.noResponse")); //$NON-NLS-1$
}
- return rsp_list.getFirst();
+ Object result = rsp_list.getFirst();
+ if (result instanceof Throwable) {
+ throw (Throwable)result;
+ }
+ return result;
}
});
}
Modified: trunk/server/src/main/java/com/metamatrix/common/messaging/jgroups/RemoteProxy.java
===================================================================
--- trunk/server/src/main/java/com/metamatrix/common/messaging/jgroups/RemoteProxy.java 2009-05-17 00:02:22 UTC (rev 959)
+++ trunk/server/src/main/java/com/metamatrix/common/messaging/jgroups/RemoteProxy.java 2009-05-17 11:59:58 UTC (rev 960)
@@ -54,9 +54,9 @@
throw e.getTargetException();
}
}
- throw new ServiceNotFoundException();
+ throw new ServiceNotFoundException(PlatformPlugin.Util.getString("RemoteProxy.localCallFailed", methodName, classId)); //$NON-NLS-1$
} catch (Throwable t) {
- LogManager.logWarning(LogCommonConstants.CTX_PROXY, t, PlatformPlugin.Util.getString("RemoteProxy.localCallFailed", methodName, classId));
+ LogManager.logWarning(LogCommonConstants.CTX_PROXY, t, PlatformPlugin.Util.getString("RemoteProxy.localCallFailed", methodName, classId)); //$NON-NLS-1$
throw t;
}
}
Modified: trunk/server/src/main/java/com/metamatrix/platform/registry/ClusteredRegistryState.java
===================================================================
--- trunk/server/src/main/java/com/metamatrix/platform/registry/ClusteredRegistryState.java 2009-05-17 00:02:22 UTC (rev 959)
+++ trunk/server/src/main/java/com/metamatrix/platform/registry/ClusteredRegistryState.java 2009-05-17 11:59:58 UTC (rev 960)
@@ -65,6 +65,7 @@
private Cache addProcessNode(String hostName, String processName) throws CacheNodeNotFoundException {
Cache hostNode = getHostNode(hostName);
+ hostNode.removeChild(processName.toUpperCase());
Cache n = hostNode.addChild(processName.toUpperCase());
n.put(NAME, processName);
return n;
Modified: trunk/server/src/main/java/com/metamatrix/platform/registry/HostControllerRegistryBinding.java
===================================================================
--- trunk/server/src/main/java/com/metamatrix/platform/registry/HostControllerRegistryBinding.java 2009-05-17 00:02:22 UTC (rev 959)
+++ trunk/server/src/main/java/com/metamatrix/platform/registry/HostControllerRegistryBinding.java 2009-05-17 11:59:58 UTC (rev 960)
@@ -1,66 +1,35 @@
package com.metamatrix.platform.registry;
-import java.io.Serializable;
import java.util.Properties;
import com.metamatrix.common.messaging.MessageBus;
import com.metamatrix.server.HostManagement;
-import com.metamatrix.server.ResourceFinder;
-public class HostControllerRegistryBinding implements Serializable {
+public class HostControllerRegistryBinding extends RegistryBinding<HostManagement> {
- private transient HostManagement hostController;
- private transient MessageBus messageBus;
-
- /** remote reference */
- private Object hostControllerStub;
-
- private String hostName;
-
private Properties hostProperties;
-
public HostControllerRegistryBinding(String hostName, Properties properties, HostManagement controller, MessageBus bus) {
- this.messageBus = bus;
- this.hostName = hostName;
+ super(controller, hostName, bus);
this.hostProperties = properties;
- setHostController(controller);
}
- public String getHostName() {
- return this.hostName;
- }
-
- private synchronized void setHostController(HostManagement controller) {
- this.hostController = controller;
- if (this.hostControllerStub != null) {
- this.messageBus.unExport(hostControllerStub);
- hostControllerStub = null;
- }
- if (controller != null) {
- this.hostControllerStub = this.messageBus.export(controller, controller.getClass().getInterfaces());
- }
- }
-
- public synchronized HostManagement getHostController() {
- if (this.hostController != null) {
- return hostController;
- }
- if (this.hostControllerStub == null) {
+ @Override
+ public synchronized HostManagement getBindObject() {
+ HostManagement bindObject = super.getBindObject();
+ if (bindObject == null) {
throw new IllegalStateException("Cannot locate host controller. It may need to be started or restarted if jgroups properties have changed"); //$NON-NLS-1$
}
- // when exported to the remote, use remote's message bus instance.
- MessageBus bus = this.messageBus;
- if(bus == null) {
- bus = ResourceFinder.getMessageBus();
- }
- this.hostController = (HostManagement)bus.getRPCProxy(this.hostControllerStub);
- return this.hostController;
- }
-
+ return bindObject;
+ }
+
public Properties getProperties() {
Properties p = new Properties();
p.putAll(this.hostProperties);
return p;
}
+
+ public HostManagement getHostController() {
+ return getBindObject();
+ }
}
Modified: trunk/server/src/main/java/com/metamatrix/platform/registry/ProcessMonitor.java
===================================================================
--- trunk/server/src/main/java/com/metamatrix/platform/registry/ProcessMonitor.java 2009-05-17 00:02:22 UTC (rev 959)
+++ trunk/server/src/main/java/com/metamatrix/platform/registry/ProcessMonitor.java 2009-05-17 11:59:58 UTC (rev 960)
@@ -30,13 +30,12 @@
import com.google.inject.Singleton;
import com.google.inject.name.Named;
import com.metamatrix.common.log.LogManager;
+import com.metamatrix.common.messaging.RemoteMessagingException;
import com.metamatrix.common.util.LogCommonConstants;
import com.metamatrix.core.MetaMatrixRuntimeException;
import com.metamatrix.platform.registry.ClusteredRegistryState.CacheNodeNotFoundException;
import com.metamatrix.platform.service.api.ServiceID;
-import com.metamatrix.platform.service.api.ServiceInterface;
import com.metamatrix.platform.service.api.exception.ServiceException;
-import com.metamatrix.platform.service.api.exception.ServiceStateException;
import com.metamatrix.platform.vm.api.controller.ProcessManagement;
import com.metamatrix.platform.vm.controller.ServerEvents;
import com.metamatrix.server.Configuration;
@@ -91,20 +90,15 @@
for (ProcessRegistryBinding binding: vmBindings) {
ProcessManagement vm = binding.getProcessController();
- boolean alive = binding.isAlive();
-
try {
vm.ping();
binding.setAlive(true);
} catch (ServiceException e) {
// mark as not alive, then no services will be pinged from this vm
binding.setAlive(false);
+ } catch (RemoteMessagingException e) {
+ binding.setAlive(false);
}
-
- // if the vmstate changed then, update the registry.
- if (alive != binding.isAlive()) {
- processUpdated(binding);
- }
}
}
}, POLLING_INTERVAL_DEFAULT, POLLING_INTERVAL_DEFAULT);
@@ -117,16 +111,8 @@
List<ServiceRegistryBinding> bindings = registry.getServiceBindings(hostName, processName);
for (ServiceRegistryBinding binding:bindings) {
- ServiceInterface si = binding.getService();
- try {
- // when service in stopped state; this will be null
- // if shut down there will not be a binding for it.
- if(si != null) {
- binding.getService().checkState();
- }
- } catch (ServiceStateException e) {
- // OK to throw up, service will capture the error to logs.
- }
+ // the state of the service changed, then update the cache.
+ binding.checkState();
// the state of the service changed, then update the cache.
if (binding.isDirty()) {
Modified: trunk/server/src/main/java/com/metamatrix/platform/registry/ProcessRegistryBinding.java
===================================================================
--- trunk/server/src/main/java/com/metamatrix/platform/registry/ProcessRegistryBinding.java 2009-05-17 00:02:22 UTC (rev 959)
+++ trunk/server/src/main/java/com/metamatrix/platform/registry/ProcessRegistryBinding.java 2009-05-17 11:59:58 UTC (rev 960)
@@ -22,93 +22,35 @@
package com.metamatrix.platform.registry;
-import java.io.Serializable;
-
import com.metamatrix.common.config.api.VMComponentDefn;
import com.metamatrix.common.messaging.MessageBus;
import com.metamatrix.platform.vm.api.controller.ProcessManagement;
-import com.metamatrix.server.ResourceFinder;
/**
* This class is a container for ServiceRegistryBinding objects for
* all the services running in this VM
*/
-public class ProcessRegistryBinding implements Serializable {
+public class ProcessRegistryBinding extends RegistryBinding<ProcessManagement> {
- /** Host that this VM belongs to. */
- private String hostName;
-
/** Name of vm */
private String processName;
private boolean alive;
- private long startTime = System.currentTimeMillis();
-
- /**
- * Local reference to VMController, this is transient to prevent it from
- * being sent to other vm's. Remote vm's must use the stub to access vmController
- */
- private transient ProcessManagement processController;
-
- /** Remote reference to VMController */
- private Object vmControllerStub;
-
/** defines vm in configuration */
// TODO: this is part of configuration, this should be removed from here..
private VMComponentDefn vmComponent;
-
- private transient MessageBus messageBus;
public ProcessRegistryBinding(String hostName, String processName, VMComponentDefn deployedComponent, ProcessManagement vmController, MessageBus bus) {
- this.hostName = hostName;
+ super(vmController, hostName, bus);
this.processName = processName;
this.vmComponent = deployedComponent;
- this.processController = vmController;
- this.messageBus = bus;
- this.vmControllerStub = getStub(vmController);
}
- private Object getStub(ProcessManagement controller) {
- if (controller == null) {
- return null;
- }
- return this.messageBus.export(controller, new Class[] {ProcessManagement.class});
- }
-
- /**
- * Return reference for VMController.
- * If VMController is running in this VM then return local reference.
- * Else return remote reference.
- *
- * @return VMController reference
- */
- public synchronized ProcessManagement getProcessController() {
-
- // if vmController is null then this must be a remote vm so return the stub.
- if (this.processController != null) {
- return processController;
- }
- if (this.vmControllerStub == null) {
- return null;
- }
- // when exported to the remote, use remote's message bus instance.
- MessageBus bus = this.messageBus;
- if(bus == null) {
- bus = ResourceFinder.getMessageBus();
- }
- processController = (ProcessManagement)bus.getRPCProxy(this.vmControllerStub);
- return processController;
- }
-
public VMComponentDefn getDeployedComponent() {
return this.vmComponent;
}
- public String getHostName() {
- return hostName;
- }
-
public String getProcessName() {
return processName;
}
@@ -126,15 +68,11 @@
}
public String toString() {
- return "Process<" +this.hostName+"|"+ this.processName + ">"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ return "Process<" +this.getHostName()+"|"+ this.processName + ">"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
- public long getStartTime() {
- return startTime;
- }
-
- public void setStartTime(long startTime) {
- this.startTime = startTime;
- }
+ public ProcessManagement getProcessController() {
+ return getBindObject();
+ }
}
Added: trunk/server/src/main/java/com/metamatrix/platform/registry/RegistryBinding.java
===================================================================
--- trunk/server/src/main/java/com/metamatrix/platform/registry/RegistryBinding.java (rev 0)
+++ trunk/server/src/main/java/com/metamatrix/platform/registry/RegistryBinding.java 2009-05-17 11:59:58 UTC (rev 960)
@@ -0,0 +1,97 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+
+package com.metamatrix.platform.registry;
+
+import java.io.Serializable;
+
+import com.metamatrix.common.messaging.MessageBus;
+import com.metamatrix.server.ResourceFinder;
+
+/**
+ * This class is a container for ServiceRegistryBinding objects for
+ * all the services running in this VM
+ */
+public class RegistryBinding<T> implements Serializable {
+
+ private String hostName;
+ private long startTime = System.currentTimeMillis();
+ private Object stub;
+ private transient boolean local;
+ private transient T bindObject;
+ private transient MessageBus messageBus;
+
+ public RegistryBinding(T bindObject, String hostName,
+ MessageBus messageBus) {
+ this.bindObject = bindObject;
+ this.hostName = hostName;
+ this.messageBus = messageBus;
+ if (this.bindObject != null) {
+ this.stub = this.messageBus.export(this.bindObject, this.bindObject.getClass().getInterfaces());
+ }
+ this.local = true;
+ }
+
+ public synchronized T getBindObject() {
+ if (this.bindObject != null) {
+ return bindObject;
+ }
+ if (this.stub == null) {
+ return null;
+ }
+ // when exported to the remote, use remote's message bus instance.
+ this.bindObject = (T)this.getMessageBus().getRPCProxy(this.stub);
+ return this.bindObject;
+ }
+
+ public synchronized void invalidateBindObject() {
+ this.bindObject = null;
+ if (this.stub != null) {
+ this.getMessageBus().unExport(stub);
+ this.stub = null;
+ }
+ }
+
+ public String getHostName() {
+ return hostName;
+ }
+
+ public long getStartTime() {
+ return startTime;
+ }
+
+ public void setStartTime(long startTime) {
+ this.startTime = startTime;
+ }
+
+ public boolean isLocal() {
+ return local;
+ }
+
+ private MessageBus getMessageBus() {
+ if (this.messageBus == null) {
+ this.messageBus = ResourceFinder.getMessageBus();
+ }
+ return messageBus;
+ }
+}
+
Property changes on: trunk/server/src/main/java/com/metamatrix/platform/registry/RegistryBinding.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/server/src/main/java/com/metamatrix/platform/registry/ServiceRegistryBinding.java
===================================================================
--- trunk/server/src/main/java/com/metamatrix/platform/registry/ServiceRegistryBinding.java 2009-05-17 00:02:22 UTC (rev 959)
+++ trunk/server/src/main/java/com/metamatrix/platform/registry/ServiceRegistryBinding.java 2009-05-17 11:59:58 UTC (rev 960)
@@ -22,7 +22,6 @@
package com.metamatrix.platform.registry;
-import java.io.Serializable;
import java.lang.reflect.InvocationHandler;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
@@ -35,17 +34,21 @@
import com.metamatrix.common.config.api.DeployedComponent;
import com.metamatrix.common.messaging.MessageBus;
import com.metamatrix.common.queue.WorkerPoolStats;
+import com.metamatrix.platform.service.ServiceMessages;
+import com.metamatrix.platform.service.ServicePlugin;
import com.metamatrix.platform.service.api.ServiceID;
import com.metamatrix.platform.service.api.ServiceInterface;
import com.metamatrix.platform.service.api.ServiceState;
-import com.metamatrix.server.ResourceFinder;
+import com.metamatrix.platform.service.api.exception.ServiceException;
+import com.metamatrix.platform.service.api.exception.ServiceStateException;
+import com.metamatrix.platform.service.controller.ServiceData;
-public class ServiceRegistryBinding implements Serializable {
+public class ServiceRegistryBinding extends RegistryBinding<ServiceInterface> {
- private final class StateAwareProxy implements InvocationHandler {
+ public final static class StateAwareProxy implements InvocationHandler {
private final ServiceInterface proxiedService;
- private StateAwareProxy(ServiceInterface proxiedService) {
+ public StateAwareProxy(ServiceInterface proxiedService) {
this.proxiedService = proxiedService;
}
@@ -61,97 +64,46 @@
} catch (InvocationTargetException err) {
throw err.getTargetException();
}
-
- ServiceRegistryBinding.this.setInitException(proxiedService.getInitException());
- ServiceRegistryBinding.this.updateState(proxiedService.getCurrentState());
return returnObj;
}
}
-
- /** Identifies service for purpose of looking up in registry */
- private ServiceID serviceID;
-
- /** local reference to service, made transient so it will not be sent to remote registries */
- private transient ServiceInterface service;
- /** remote reference */
- private Object serviceStub;
-
- /** type of service */
- private String serviceType;
+ private ServiceData serviceData;
- /** component type */
- private String componentType;
-
- /** Name of deployed service */
- private String deployedName;
-
- /** Name of host this service is running on */
- private String hostName;
-
- /** Instance name */
- private String instanceName;
-
- /**
- * Current state of service, this is updated by the service framework
- * whenever the state changes
- */
- private int currentState;
-
- /** Time of the last state change */
- private Date stateChangeTime;
-
/** indicates if service is an essential service */
private boolean essential;
/** defines service in configuration */
private DeployedComponent deployedComponent;
-// /** identifies psc this service belongs to. */
-// private ProductServiceConfigID pscID;
-
/** collection of queue names for service */
private Collection queueNames;
- /** Exception during initialization */
- private Throwable initException;
+ public ServiceRegistryBinding(ServiceID serviceID, ServiceInterface si, String serviceType, String instanceName,
+ String componentType, String deployedName,
+ String hostName, DeployedComponent deployedComponent,
+ int state, Date time, boolean essential, MessageBus bus) {
+ super(si, hostName, bus);
+ this.serviceData = new ServiceData(ServiceState.STATE_NOT_INITIALIZED);
+ this.serviceData.setId(serviceID);
+ this.serviceData.setServiceType(serviceType);
+ this.serviceData.setInstanceName(instanceName);
+ this.deployedComponent = deployedComponent;
+ this.essential = essential;
+ }
- private transient MessageBus messageBus;
-
- private transient boolean dirty;
-
/**
* Create new ServiceRegistryInstance
- *
- * @param serviceID Identifies service
- * @param service ServiceInstance
- * @param serviceType
- * @param instanceName Instance name of service
- * @param componenetType
- * @param deployedName
- * @param hostName
- * @param state
- * @param time
- * @param essential, true indicates service is an essential service and cannot be shutdown if there are no other similiar services running.
*/
- public ServiceRegistryBinding(ServiceID serviceID, ServiceInterface si, String serviceType, String instanceName,
- String componentType, String deployedName,
- String hostName, DeployedComponent deployedComponent,
- int state, Date time, boolean essential, MessageBus bus) {
-
- this.serviceID = serviceID;
- this.serviceType = serviceType;
- this.instanceName = instanceName;
- this.componentType = componentType;
- this.deployedName = deployedName;
- this.hostName = hostName;
+ public ServiceRegistryBinding(ServiceInterface si, String hostName,
+ DeployedComponent deployedComponent, boolean essential,
+ MessageBus bus) {
+ super((ServiceInterface) Proxy.newProxyInstance(Thread
+ .currentThread().getContextClassLoader(), si.getClass().getInterfaces(),
+ new StateAwareProxy(si)), hostName, bus);
+ this.serviceData = si.getServiceData();
this.deployedComponent = deployedComponent;
- this.currentState = state;
- this.stateChangeTime = time;
this.essential = essential;
- this.messageBus = bus;
- this.setService(si);
-
}
/**
@@ -159,61 +111,36 @@
* @return ServiceID
*/
public ServiceID getServiceID() {
- return this.serviceID;
+ return this.serviceData.getId();
}
- /**
- * Return reference to service
- * If service is local then return local reference
- * Else return stub
- */
- public synchronized ServiceInterface getService() {
- if (this.service != null) {
- return service;
- }
- if (this.serviceStub == null) {
- return null;
- }
- // when exported to the remote, use remote's message bus instance.
- MessageBus bus = this.messageBus;
- if(bus == null) {
- bus = ResourceFinder.getMessageBus();
- }
- this.service = (ServiceInterface)bus.getRPCProxy(this.serviceStub);
- return this.service;
- }
-
public String getServiceType() {
- return this.serviceType;
+ return this.serviceData.getServiceType();
}
public String getInstanceName() {
- return this.instanceName;
+ return this.serviceData.getInstanceName();
}
- public String getComponentType() {
- return this.componentType;
- }
-
public String getDeployedName() {
- return this.deployedName;
+ return this.serviceData.getInstanceName();
}
- public String getHostName() {
- return this.hostName;
- }
-
public String getProcessName() {
- return this.serviceID.getProcessName();
+ return this.getServiceID().getProcessName();
}
public int getCurrentState() {
- return this.currentState;
+ return this.serviceData.getState();
}
public Date getStateChangeTime() {
- return this.stateChangeTime;
+ return this.serviceData.getStateChangeTime();
}
+
+ public Throwable getInitException() {
+ return this.serviceData.getInitException();
+ }
public boolean isEssential() {
return essential;
@@ -223,37 +150,42 @@
return this.deployedComponent;
}
-// public ProductServiceConfigID getPscID() {
-// return this.pscID;
-// }
-
public boolean isServiceBad() {
- return (currentState == ServiceState.STATE_CLOSED ||
- currentState == ServiceState.STATE_FAILED ||
- currentState == ServiceState.STATE_INIT_FAILED);
+ return (getCurrentState() == ServiceState.STATE_CLOSED ||
+ getCurrentState() == ServiceState.STATE_FAILED ||
+ getCurrentState() == ServiceState.STATE_INIT_FAILED);
}
public Collection getQueueNames() {
- if (this.queueNames == null) {
- this.queueNames = buildQueueNames(this.service);
+ try {
+ if (this.queueNames == null) {
+ this.queueNames = buildQueueNames(getBindObject());
+ }
+ } catch (ServiceException e) {
+ markServiceAsBad();
+ throw e;
}
return this.queueNames;
}
-
- public Throwable getInitException() {
- return this.initException;
- }
- public void setInitException(Throwable t) {
- this.initException = t;
+ public void checkState() {
+ //handle a stale process entry
+ if (!this.isLocal()) {
+ markServiceAsBad();
+ return;
+ }
+ ServiceInterface bindObject = getBindObject();
+ if (bindObject != null) {
+ try {
+ bindObject.checkState();
+ } catch (ServiceException e) {
+
+ }
+ }
}
public void updateState(int state) {
- if (this.currentState != state) {
- this.currentState = state;
- this.stateChangeTime = new Date();
- this.dirty = true;
- }
+ this.serviceData.updateState(state);
}
private Collection buildQueueNames(ServiceInterface si) {
@@ -273,54 +205,40 @@
}
public String toString() {
-
StringBuffer b = new StringBuffer("ServiceRegistryBinding: "); //$NON-NLS-1$
- b.append("\n\tserviceID: " + serviceID); //$NON-NLS-1$
- b.append("\n\tserviceType: " + serviceType); //$NON-NLS-1$
- b.append("\n\tinstanceName: " + instanceName); //$NON-NLS-1$
- b.append("\n\thostName: " + hostName); //$NON-NLS-1$
-// b.append("\n\tpscName: " + pscID); //$NON-NLS-1$
+ b.append("\n\tserviceID: " + getServiceID()); //$NON-NLS-1$
+ b.append("\n\tserviceType: " + getServiceType()); //$NON-NLS-1$
+ b.append("\n\tinstanceName: " + getInstanceName()); //$NON-NLS-1$
+ b.append("\n\thostName: " + getHostName()); //$NON-NLS-1$
b.append("\n\tDeployedComponent: " + deployedComponent); //$NON-NLS-1$
- b.append("\n\tcurrentState: " + currentState); //$NON-NLS-1$
+ b.append("\n\tcurrentState: " + getCurrentState()); //$NON-NLS-1$
b.append("\n\tessential: " + (essential?"true":"false")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-
- try {
- b.append("\n\tserviceStub className = " + serviceStub.getClass().getName()); //$NON-NLS-1$
- } catch (Exception e) {
- b.append("\n\tserviceStub className = null"); //$NON-NLS-1$
- }
return b.toString();
}
- private synchronized void setService(ServiceInterface service) {
- this.service = service;
- if (this.serviceStub != null) {
- this.messageBus.unExport(serviceStub);
- serviceStub = null;
- }
- if (service != null) {
- this.serviceStub = this.messageBus.export(service, service.getClass().getInterfaces());
- this.service = (ServiceInterface) Proxy.newProxyInstance(Thread
- .currentThread().getContextClassLoader(), service.getClass().getInterfaces(),
- new StateAwareProxy(service));
- }
- }
-
public boolean isActive() {
- return (this.currentState == ServiceState.STATE_OPEN || this.currentState == ServiceState.STATE_DATA_SOURCE_UNAVAILABLE);
+ return (this.getCurrentState() == ServiceState.STATE_OPEN || this.getCurrentState() == ServiceState.STATE_DATA_SOURCE_UNAVAILABLE);
}
public void markServiceAsBad() {
- setService(null);
+ invalidateBindObject();
updateState(ServiceState.STATE_FAILED);
}
-
+
+ public ServiceInterface getService() {
+ ServiceInterface result = getBindObject();
+ if (result == null) {
+ throw new ServiceStateException(ServiceMessages.SERVICE_0012, ServicePlugin.Util.getString(ServiceMessages.SERVICE_0012, this.serviceData.getInstanceName(), this.serviceData.getId()));
+ }
+ return result;
+ }
+
public void setDirty(boolean dirty) {
- this.dirty = dirty;
+ this.serviceData.setDirty(dirty);
}
public boolean isDirty() {
- return dirty;
+ return this.serviceData.isDirty();
}
-}
+}
Modified: trunk/server/src/main/java/com/metamatrix/platform/service/api/ServiceInterface.java
===================================================================
--- trunk/server/src/main/java/com/metamatrix/platform/service/api/ServiceInterface.java 2009-05-17 00:02:22 UTC (rev 959)
+++ trunk/server/src/main/java/com/metamatrix/platform/service/api/ServiceInterface.java 2009-05-17 11:59:58 UTC (rev 960)
@@ -29,6 +29,7 @@
import com.metamatrix.common.comm.ClientServiceRegistry;
import com.metamatrix.common.config.api.DeployedComponentID;
import com.metamatrix.common.queue.WorkerPoolStats;
+import com.metamatrix.platform.service.controller.ServiceData;
public interface ServiceInterface {
@@ -129,4 +130,6 @@
* There are reflective based calls on this
*/
void updateState(int state);
+
+ ServiceData getServiceData();
}
Modified: trunk/server/src/main/java/com/metamatrix/platform/service/controller/AbstractService.java
===================================================================
--- trunk/server/src/main/java/com/metamatrix/platform/service/controller/AbstractService.java 2009-05-17 00:02:22 UTC (rev 959)
+++ trunk/server/src/main/java/com/metamatrix/platform/service/controller/AbstractService.java 2009-05-17 11:59:58 UTC (rev 960)
@@ -58,38 +58,13 @@
//public abstract class AbstractService extends UnicastRemoteObject implements ServiceInterface, EventObjectListener {
public abstract class AbstractService implements ServiceInterface, EventObjectListener {
- // current state, default to not initialized.
- private int state = ServiceState.STATE_NOT_INITIALIZED;
-
- // Service type, used to look up in registry.
- private String serviceType;
-
- // Instance name
- private String instanceName;
-
- // ID of service
- private ServiceID id;
-
- // ID of this deployed component
- private DeployedComponentID deployedComponentID;
-
- // properties used to initialize service
+ private ServiceData data = new ServiceData(ServiceState.STATE_NOT_INITIALIZED);
private Properties props;
- // time service was initialized
- private Date startTime;
-
- // time current state was set
- private Date stateChangeTime;
-
- private Throwable initException = null;
-
- /**
+ /**
* Default constructor.
- * Set stateChangedTime
*/
public AbstractService() {
- stateChangeTime = new Date();
}
//--------------------------------------------------------------
@@ -115,19 +90,14 @@
throw new ServiceException(ServiceMessages.SERVICE_0001, ServicePlugin.Util.getString(ServiceMessages.SERVICE_0001));
}
- this.id = id;
- this.deployedComponentID = deployedComponentID;
this.props = props;
- serviceType = props.getProperty(ServicePropertyNames.COMPONENT_TYPE_NAME);
- instanceName = props.getProperty(ServicePropertyNames.INSTANCE_NAME);
-
- if (serviceType == null || serviceType.trim().length() == 0) {
+ if (data.getServiceType() == null || data.getServiceType().trim().length() == 0) {
throw new ServiceException(ServiceMessages.SERVICE_0002, ServicePlugin.Util.getString(ServiceMessages.SERVICE_0002, ServicePropertyNames.COMPONENT_TYPE_NAME ));
}
- logMessagePrivate(ServicePlugin.Util.getString(ServiceMessages.MSG_SERVICE_0001, instanceName));
- logMessagePrivate(ServicePlugin.Util.getString(ServiceMessages.MSG_SERVICE_0002, instanceName, System.getProperty("java.class.path"))); //$NON-NLS-1$
+ logMessagePrivate(ServicePlugin.Util.getString(ServiceMessages.MSG_SERVICE_0001, data.getInstanceName()));
+ logMessagePrivate(ServicePlugin.Util.getString(ServiceMessages.MSG_SERVICE_0002, data.getInstanceName(), System.getProperty("java.class.path"))); //$NON-NLS-1$
try {
Properties resourceProps = CurrentConfiguration.getInstance().getResourceProperties(getResourceName());
@@ -136,25 +106,20 @@
}
logServiceProperties(this.props);
- logMessagePrivate(ServicePlugin.Util.getString(ServiceMessages.MSG_SERVICE_0003, instanceName));
+ logMessagePrivate(ServicePlugin.Util.getString(ServiceMessages.MSG_SERVICE_0003, data.getInstanceName()));
// Initialize!
- logMessagePrivate(ServicePlugin.Util.getString(ServiceMessages.MSG_SERVICE_0004, serviceType));
+ logMessagePrivate(ServicePlugin.Util.getString(ServiceMessages.MSG_SERVICE_0004, data.getServiceType()));
initService(this.props);
registerForEvents();
logMessagePrivate(ServicePlugin.Util.getString(ServiceMessages.MSG_SERVICE_0005, getServiceType()));
- startTime = new Date();
+ data.setStartTime(new Date());
markAsOpen();
- setInitException(null);
- return;
-
} catch (Throwable e) {
setInitException(e);
throw new ServiceException(e, ServiceMessages.SERVICE_0004, ServicePlugin.Util.getString(ServiceMessages.SERVICE_0004, getServiceType()) );
- } finally {
- // Cleanup!
- }
+ }
}
/**
@@ -163,7 +128,7 @@
* @return String representing type of service.
*/
public final String getServiceType() {
- return serviceType;
+ return data.getServiceType();
}
/**
@@ -177,7 +142,7 @@
* @return int representing current state.
*/
public final int getCurrentState() {
- return state;
+ return data.getState();
}
/**
@@ -186,7 +151,7 @@
* @return Date representing time of state change.
*/
public final Date getStateChangeTime() {
- return this.stateChangeTime;
+ return this.data.getStateChangeTime();
}
/**
@@ -195,20 +160,10 @@
* @return ServiceID
*/
public final ServiceID getID() {
- return this.id;
+ return this.data.getId();
}
/**
- * Return DepoloyedComponentID of this service.
- *
- * @return deployedComponentID
- */
- public final DeployedComponentID getDeployedComponentID() {
- return this.deployedComponentID;
- }
-
-
- /**
* This method will gracefully shutdown the service.
* Sub classes of AbstractService class should implement
* unregisterForEvents(), closeService(), waitForServiceToClear() and
@@ -217,7 +172,7 @@
*/
public final void die() {
try {
- logMessagePrivate(ServicePlugin.Util.getString(ServiceMessages.MSG_SERVICE_0006, this.id));
+ logMessagePrivate(ServicePlugin.Util.getString(ServiceMessages.MSG_SERVICE_0006, this.data.getId()));
markAsClosed();
unregisterForEvents();
closeService();
@@ -241,7 +196,7 @@
markAsClosed();
unregisterForEvents();
}
- this.initException = null;
+ this.data.setInitException(null);
killService();
} catch (Exception e) {
throw new ServiceException(e, ServiceMessages.SERVICE_0005, ServicePlugin.Util.getString(ServiceMessages.SERVICE_0005, getServiceType()));
@@ -255,7 +210,7 @@
* @return Properties
*/
public final Properties getProperties() {
- return props;
+ return this.props;
}
/**
@@ -264,7 +219,7 @@
* @return Date containing time service started.
*/
public final Date getStartTime() {
- return startTime;
+ return data.getStartTime();
}
/**
@@ -273,14 +228,14 @@
* @return String Host name
*/
public final String getHostname() {
- return this.id.getHostName();
+ return this.data.getId().getHostName();
}
/**
* @see com.metamatrix.platform.service.api.ServiceInterface#getProcessName()
*/
public final String getProcessName(){
- return this.id.getProcessName();
+ return this.data.getId().getProcessName();
}
/**
@@ -289,7 +244,7 @@
* @return String instance name
*/
public final String getInstanceName() {
- return this.instanceName;
+ return this.data.getInstanceName();
}
@@ -311,23 +266,23 @@
public void checkState() throws ServiceStateException {
- if (state == ServiceState.STATE_OPEN) {
+ if (data.getState() == ServiceState.STATE_OPEN) {
return;
}
- if (state == ServiceState.STATE_NOT_INITIALIZED) {
- throw new ServiceNotInitializedException(ServiceMessages.SERVICE_0009, ServicePlugin.Util.getString(ServiceMessages.SERVICE_0009, this.getServiceName(), id));
+ if (data.getState() == ServiceState.STATE_NOT_INITIALIZED) {
+ throw new ServiceNotInitializedException(ServiceMessages.SERVICE_0009, ServicePlugin.Util.getString(ServiceMessages.SERVICE_0009, this.getServiceName(), data.getId()));
}
- if (state == ServiceState.STATE_CLOSED) {
- throw new ServiceClosedException(ServiceMessages.SERVICE_0010, ServicePlugin.Util.getString(ServiceMessages.SERVICE_0010, this.getServiceName(), id));
+ if (data.getState() == ServiceState.STATE_CLOSED) {
+ throw new ServiceClosedException(ServiceMessages.SERVICE_0010, ServicePlugin.Util.getString(ServiceMessages.SERVICE_0010, this.getServiceName(), data.getId()));
}
- if (state == ServiceState.STATE_DATA_SOURCE_UNAVAILABLE) {
- throw new ServiceClosedException(ServiceMessages.SERVICE_0069, ServicePlugin.Util.getString(ServiceMessages.SERVICE_0069, this.getServiceName(), id));
+ if (data.getState() == ServiceState.STATE_DATA_SOURCE_UNAVAILABLE) {
+ throw new ServiceClosedException(ServiceMessages.SERVICE_0069, ServicePlugin.Util.getString(ServiceMessages.SERVICE_0069, this.getServiceName(), data.getId()));
}
- throw new ServiceStateException(ServiceMessages.SERVICE_0012, ServicePlugin.Util.getString(ServiceMessages.SERVICE_0012, this.getServiceName(), id));
+ throw new ServiceStateException(ServiceMessages.SERVICE_0012, ServicePlugin.Util.getString(ServiceMessages.SERVICE_0012, this.getServiceName(), data.getId()));
}
/**
@@ -348,21 +303,21 @@
* Return true if service has been initialized.
*/
public final boolean isInitialized() {
- return state != ServiceState.STATE_NOT_INITIALIZED;
+ return data.getState() != ServiceState.STATE_NOT_INITIALIZED;
}
/**
* Return true if service is open
*/
public final boolean isOpen() {
- return state == ServiceState.STATE_OPEN;
+ return data.getState() == ServiceState.STATE_OPEN;
}
/**
* Return true if service is closed.
*/
public final boolean isClosed() {
- return state == ServiceState.STATE_CLOSED;
+ return data.getState() == ServiceState.STATE_CLOSED;
}
@@ -403,7 +358,7 @@
* the resource name will probably be defined as a static variable called RESOURCE_NAME.
*/
protected String getResourceName() {
- return serviceType;
+ return data.getServiceType();
}
/**
@@ -566,7 +521,6 @@
'0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'
};
-
/**
* Update state and stateChangedTime with new state;
* If newState == state then do nothing.
@@ -574,10 +528,7 @@
* @param int new state of service
*/
public synchronized void updateState(int newState) {
- if (state != newState) {
- state = newState;
- stateChangeTime = new Date();
- }
+ data.updateState(newState);
}
/**
@@ -586,21 +537,26 @@
* @param Throwable
* */
public void setInitException(Throwable error) {
- this.initException = error;
+ this.data.setInitException(error);
if (error != null) {
- state = ServiceState.STATE_INIT_FAILED;
+ data.updateState(ServiceState.STATE_INIT_FAILED);
}
}
public Throwable getInitException() {
- return this.initException;
+ return this.data.getInitException();
}
/**
* Return name of service (instance name)
*/
protected String getServiceName() {
- return instanceName;
+ return data.getInstanceName();
}
+ @Override
+ public ServiceData getServiceData() {
+ return data;
+ }
+
}
Added: trunk/server/src/main/java/com/metamatrix/platform/service/controller/ServiceData.java
===================================================================
--- trunk/server/src/main/java/com/metamatrix/platform/service/controller/ServiceData.java (rev 0)
+++ trunk/server/src/main/java/com/metamatrix/platform/service/controller/ServiceData.java 2009-05-17 11:59:58 UTC (rev 960)
@@ -0,0 +1,118 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+
+package com.metamatrix.platform.service.controller;
+
+import java.io.Serializable;
+import java.util.Date;
+
+import com.metamatrix.platform.service.api.ServiceID;
+
+public class ServiceData implements Serializable {
+ private int state;
+ private String serviceType;
+ private String instanceName;
+ private ServiceID id;
+ private Date startTime;
+ private Date stateChangeTime = new Date();
+ private Throwable initException;
+ private transient boolean dirty;
+
+ public ServiceData(int state) {
+ this.state = state;
+ }
+
+ public int getState() {
+ return state;
+ }
+
+ public String getServiceType() {
+ return serviceType;
+ }
+
+ public void setServiceType(String serviceType) {
+ this.serviceType = serviceType;
+ }
+
+ public String getInstanceName() {
+ return instanceName;
+ }
+
+ public void setInstanceName(String instanceName) {
+ this.instanceName = instanceName;
+ }
+
+ public ServiceID getId() {
+ return id;
+ }
+
+ public void setId(ServiceID id) {
+ this.id = id;
+ }
+
+ public Date getStartTime() {
+ return startTime;
+ }
+
+ void setStartTime(Date startTime) {
+ this.startTime = startTime;
+ }
+
+ public Date getStateChangeTime() {
+ return stateChangeTime;
+ }
+
+ void setStateChangeTime(Date stateChangeTime) {
+ this.stateChangeTime = stateChangeTime;
+ }
+
+ public Throwable getInitException() {
+ return initException;
+ }
+
+ void setInitException(Throwable initException) {
+ this.initException = initException;
+ }
+
+ public boolean isDirty() {
+ return dirty;
+ }
+
+ public void setDirty(boolean dirty) {
+ this.dirty = dirty;
+ }
+
+ /**
+ * Update state and stateChangedTime with new state;
+ * If newState == state then do nothing.
+ *
+ * @param int new state of service
+ */
+ public synchronized void updateState(int newState) {
+ if (state != newState) {
+ this.state = newState;
+ this.dirty = true;
+ setStateChangeTime(new Date());
+ }
+ }
+
+}
\ No newline at end of file
Property changes on: trunk/server/src/main/java/com/metamatrix/platform/service/controller/ServiceData.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/server/src/main/java/com/metamatrix/platform/vm/controller/ProcessController.java
===================================================================
--- trunk/server/src/main/java/com/metamatrix/platform/vm/controller/ProcessController.java 2009-05-17 00:02:22 UTC (rev 959)
+++ trunk/server/src/main/java/com/metamatrix/platform/vm/controller/ProcessController.java 2009-05-17 11:59:58 UTC (rev 960)
@@ -100,6 +100,7 @@
import com.metamatrix.platform.service.api.ServiceInterface;
import com.metamatrix.platform.service.api.ServiceState;
import com.metamatrix.platform.service.api.exception.ServiceException;
+import com.metamatrix.platform.service.controller.ServiceData;
import com.metamatrix.platform.service.controller.ServicePropertyNames;
import com.metamatrix.platform.util.ErrorMessageKeys;
import com.metamatrix.platform.util.LogMessageKeys;
@@ -202,7 +203,7 @@
this.clientServices.registerClientService(ConfigurationAdminAPI.class, wrapAdminService(ConfigurationAdminAPI.class, ConfigurationAdminAPIImpl.getInstance(this.registry)), PlatformAdminConstants.CTX_CONFIGURATION_ADMIN_API);
this.clientServices.registerClientService(RuntimeStateAdminAPI.class, wrapAdminService(RuntimeStateAdminAPI.class, RuntimeStateAdminAPIImpl.getInstance(this.registry, hostManagement)), PlatformAdminConstants.CTX_RUNTIME_STATE_ADMIN_API);
this.clientServices.registerClientService(AuthorizationAdminAPI.class, wrapAdminService(AuthorizationAdminAPI.class, AuthorizationAdminAPIImpl.getInstance()), PlatformAdminConstants.CTX_AUTHORIZATION_ADMIN_API);
- this.clientServices.registerClientService(ExtensionSourceAdminAPI.class, wrapAdminService(ExtensionSourceAdminAPI.class, ExtensionSourceAdminAPIImpl.getInstance()), PlatformAdminConstants.CTX_ADMIN_API);
+ this.clientServices.registerClientService(ExtensionSourceAdminAPI.class, wrapAdminService(ExtensionSourceAdminAPI.class, ExtensionSourceAdminAPIImpl.getInstance()), PlatformAdminConstants.CTX_EXTENSION_SOURCE_ADMIN_API);
this.clientServices.registerClientService(RuntimeMetadataAdminAPI.class, wrapAdminService(RuntimeMetadataAdminAPI.class, RuntimeMetadataAdminAPIImpl.getInstance()), PlatformAdminConstants.CTX_RUNTIME_METADATA_ADMIN_API);
}
@@ -727,16 +728,19 @@
}
serviceInstanceName = serviceProps.getProperty(ServicePropertyNames.INSTANCE_NAME);
- String componentType = serviceProps.getProperty(ServicePropertyNames.COMPONENT_TYPE_NAME);
String serviceType = serviceProps.getProperty(ServicePropertyNames.SERVICE_NAME);
- String routingID = serviceProps.getProperty(ServicePropertyNames.SERVICE_ROUTING_ID);
boolean essential = PropertiesUtils.getBooleanProperty(serviceProps, ServicePropertyNames.SERVICE_ESSENTIAL, false);
// Create an instance of serviceClass
final ServiceInterface service = (ServiceInterface) Thread.currentThread().getContextClassLoader().loadClass(serviceClass).newInstance();
+ ServiceData serviceData = service.getServiceData();
+ serviceData.setId(serviceID);
+ serviceData.setServiceType(serviceProps.getProperty(ServicePropertyNames.COMPONENT_TYPE_NAME));
+ serviceData.setInstanceName(serviceProps.getProperty(ServicePropertyNames.INSTANCE_NAME));
+
// Create ServiceRegistryBinding and register
- final ServiceRegistryBinding binding = new ServiceRegistryBinding(serviceID, service, routingID,serviceInstanceName, componentType, serviceInstanceName,host.getFullName(), deployedComponent, service.getCurrentState(), service.getStateChangeTime(),essential, this.messageBus);
+ final ServiceRegistryBinding binding = new ServiceRegistryBinding(service, host.getFullName(), deployedComponent, essential, this.messageBus);
logMessage(PlatformPlugin.Util.getString("ServiceController.0",serviceInstanceName)); //$NON-NLS-1$
@@ -746,7 +750,8 @@
final Object[] param1 = new Object[] { serviceID };
DeployedComponentID deployedComponentID = (DeployedComponentID) deployedComponent.getID();
logMessage(PlatformPlugin.Util.getString("ServiceController.1",param1)); //$NON-NLS-1$
- binding.getService().init(serviceID, deployedComponentID, serviceProps, serverListenerRegistry);
+
+ service.init(serviceID, deployedComponentID, serviceProps, serverListenerRegistry);
logMessage(PlatformPlugin.Util.getString("ServiceController.2",param1)); //$NON-NLS-1$
logMessage(PlatformPlugin.Util.getString("ServiceController.3",param1)); //$NON-NLS-1$
Modified: trunk/server/src/test/java/com/metamatrix/admin/server/FakeCacheAdmin.java
===================================================================
--- trunk/server/src/test/java/com/metamatrix/admin/server/FakeCacheAdmin.java 2009-05-17 00:02:22 UTC (rev 959)
+++ trunk/server/src/test/java/com/metamatrix/admin/server/FakeCacheAdmin.java 2009-05-17 11:59:58 UTC (rev 960)
@@ -40,6 +40,7 @@
import com.metamatrix.platform.service.api.CacheAdmin;
import com.metamatrix.platform.service.api.ServiceID;
import com.metamatrix.platform.service.api.ServiceInterface;
+import com.metamatrix.platform.service.controller.ServiceData;
public class FakeCacheAdmin implements CacheAdmin, ServiceInterface {
@@ -153,5 +154,10 @@
public Throwable getInitException() {
return null;
}
+
+ @Override
+ public ServiceData getServiceData() {
+ return null;
+ }
}
Modified: trunk/server/src/test/java/com/metamatrix/admin/server/FakeConfigurationService.java
===================================================================
--- trunk/server/src/test/java/com/metamatrix/admin/server/FakeConfigurationService.java 2009-05-17 00:02:22 UTC (rev 959)
+++ trunk/server/src/test/java/com/metamatrix/admin/server/FakeConfigurationService.java 2009-05-17 11:59:58 UTC (rev 960)
@@ -74,6 +74,7 @@
import com.metamatrix.platform.PlatformPlugin;
import com.metamatrix.platform.config.api.service.ConfigurationServiceInterface;
import com.metamatrix.platform.service.api.ServiceID;
+import com.metamatrix.platform.service.controller.ServiceData;
public class FakeConfigurationService implements ConfigurationServiceInterface {
@@ -786,5 +787,10 @@
public Throwable getInitException() {
return null;
}
+
+ @Override
+ public ServiceData getServiceData() {
+ return null;
+ }
}
Modified: trunk/server/src/test/java/com/metamatrix/admin/server/FakeQueryService.java
===================================================================
--- trunk/server/src/test/java/com/metamatrix/admin/server/FakeQueryService.java 2009-05-17 00:02:22 UTC (rev 959)
+++ trunk/server/src/test/java/com/metamatrix/admin/server/FakeQueryService.java 2009-05-17 11:59:58 UTC (rev 960)
@@ -49,6 +49,7 @@
import com.metamatrix.platform.security.api.MetaMatrixSessionID;
import com.metamatrix.platform.security.api.SessionToken;
import com.metamatrix.platform.service.api.ServiceID;
+import com.metamatrix.platform.service.controller.ServiceData;
import com.metamatrix.server.query.service.QueryServiceInterface;
import com.metamatrix.server.serverapi.RequestInfo;
@@ -289,5 +290,10 @@
public void terminateTransaction(Xid transactionId) throws AdminException {
}
+
+ @Override
+ public ServiceData getServiceData() {
+ return null;
+ }
}
Modified: trunk/server/src/test/java/com/metamatrix/admin/server/FakeServerSessionService.java
===================================================================
--- trunk/server/src/test/java/com/metamatrix/admin/server/FakeServerSessionService.java 2009-05-17 00:02:22 UTC (rev 959)
+++ trunk/server/src/test/java/com/metamatrix/admin/server/FakeServerSessionService.java 2009-05-17 11:59:58 UTC (rev 960)
@@ -44,6 +44,7 @@
import com.metamatrix.platform.security.api.MetaMatrixSessionInfo;
import com.metamatrix.platform.security.api.service.SessionServiceInterface;
import com.metamatrix.platform.service.api.ServiceID;
+import com.metamatrix.platform.service.controller.ServiceData;
import com.metamatrix.platform.util.ProductInfoConstants;
public class FakeServerSessionService implements SessionServiceInterface {
@@ -264,5 +265,10 @@
public Throwable getInitException() {
return null;
}
+
+ @Override
+ public ServiceData getServiceData() {
+ return null;
+ }
}
Modified: trunk/server/src/test/java/com/metamatrix/admin/server/TestServerMonitoringAdminImpl.java
===================================================================
--- trunk/server/src/test/java/com/metamatrix/admin/server/TestServerMonitoringAdminImpl.java 2009-05-17 00:02:22 UTC (rev 959)
+++ trunk/server/src/test/java/com/metamatrix/admin/server/TestServerMonitoringAdminImpl.java 2009-05-17 11:59:58 UTC (rev 960)
@@ -47,7 +47,6 @@
import com.metamatrix.admin.objects.MMService;
import com.metamatrix.admin.objects.MMSession;
import com.metamatrix.admin.objects.MMSystem;
-import com.metamatrix.common.config.api.ServiceComponentDefn;
import com.metamatrix.common.config.api.SharedResource;
import com.metamatrix.platform.registry.ClusteredRegistryState;
import com.metamatrix.platform.registry.FakeRegistryUtil;
Modified: trunk/server/src/test/java/com/metamatrix/platform/registry/FakeRegistryUtil.java
===================================================================
--- trunk/server/src/test/java/com/metamatrix/platform/registry/FakeRegistryUtil.java 2009-05-17 00:02:22 UTC (rev 959)
+++ trunk/server/src/test/java/com/metamatrix/platform/registry/FakeRegistryUtil.java 2009-05-17 11:59:58 UTC (rev 960)
@@ -128,7 +128,7 @@
BasicDeployedComponent deployedComponent = new BasicDeployedComponent(deployedComponentID1, Configuration.NEXT_STARTUP_ID, vm.getDeployedComponent().getHostID(), (VMComponentDefnID)vm.getDeployedComponent().getID(), connectorBindingID1, ConnectorBindingType.CONNECTOR_TYPE_ID);
deployedComponent.setDescription(name);
- return new ServiceRegistryBinding(sid, new FakeCacheAdmin(sid), type,"instance-"+id, null, name, vm.getHostName(), deployedComponent, ServiceState.STATE_OPEN, new Date(), false, new NoOpMessageBus()); //$NON-NLS-1$
+ return new ServiceRegistryBinding(sid, new FakeCacheAdmin(sid), type,name, null, name, vm.getHostName(), deployedComponent, ServiceState.STATE_OPEN, new Date(), false, new NoOpMessageBus()); //$NON-NLS-1$
}
static HostControllerRegistryBinding buildHostRegistryBinding(String name) {
Modified: trunk/server/src/test/java/com/metamatrix/platform/registry/TestServiceRegistryBinding.java
===================================================================
--- trunk/server/src/test/java/com/metamatrix/platform/registry/TestServiceRegistryBinding.java 2009-05-17 00:02:22 UTC (rev 959)
+++ trunk/server/src/test/java/com/metamatrix/platform/registry/TestServiceRegistryBinding.java 2009-05-17 11:59:58 UTC (rev 960)
@@ -22,20 +22,15 @@
package com.metamatrix.platform.registry;
-import java.util.Date;
+import java.lang.reflect.Proxy;
import java.util.Properties;
import junit.framework.TestCase;
-import com.metamatrix.admin.server.FakeConfiguration;
-import com.metamatrix.common.config.api.DeployedComponent;
-import com.metamatrix.common.messaging.NoOpMessageBus;
-import com.metamatrix.platform.service.api.ServiceID;
import com.metamatrix.platform.service.api.ServiceInterface;
import com.metamatrix.platform.service.api.ServiceState;
import com.metamatrix.platform.service.api.exception.ServiceClosedException;
import com.metamatrix.platform.service.controller.AbstractService;
-import com.metamatrix.server.query.service.QueryService;
public class TestServiceRegistryBinding extends TestCase {
@@ -74,24 +69,21 @@
public void testStateCheckingProxy() throws Exception {
FakeServiceImpl service = new FakeServiceImpl();
- ProcessRegistryBinding vmBinding2 = FakeRegistryUtil.buildVMRegistryBinding("2.2.2.2", "process2"); //$NON-NLS-1$ //$NON-NLS-2$
- ServiceID sid1 = new ServiceID(5, vmBinding2.getHostName(), vmBinding2.getProcessName());
- ServiceRegistryBinding binding = new ServiceRegistryBinding(sid1, service, QueryService.SERVICE_NAME,
- "dqp2", "QueryService", //$NON-NLS-1$ //$NON-NLS-2$
- "dqp2", "2.2.2.2",(DeployedComponent)new FakeConfiguration().deployedComponents.get(4), //$NON-NLS-1$ //$NON-NLS-2$
- ServiceState.STATE_CLOSED,
- new Date(),
- false, new NoOpMessageBus());
+ FakeServiceInterface fakeServiceInterface = (FakeServiceInterface) Proxy
+ .newProxyInstance(Thread.currentThread()
+ .getContextClassLoader(),
+ new Class[] { FakeServiceInterface.class },
+ new ServiceRegistryBinding.StateAwareProxy(service));
- assertEquals(1, ((FakeServiceInterface)binding.getService()).doSomething(1));
+ assertEquals(1, fakeServiceInterface.doSomething(1));
service.die();
//ensure that check state is not called through the proxy
- ((FakeServiceInterface)binding.getService()).die();
+ fakeServiceInterface.die();
try {
- ((FakeServiceInterface)binding.getService()).doSomething(1);
+ fakeServiceInterface.doSomething(1);
fail("expected exception"); //$NON-NLS-1$
} catch (ServiceClosedException e) {
//expected
Modified: trunk/server/src/test/java/com/metamatrix/platform/service/controller/FakeService.java
===================================================================
--- trunk/server/src/test/java/com/metamatrix/platform/service/controller/FakeService.java 2009-05-17 00:02:22 UTC (rev 959)
+++ trunk/server/src/test/java/com/metamatrix/platform/service/controller/FakeService.java 2009-05-17 11:59:58 UTC (rev 960)
@@ -111,4 +111,8 @@
public Throwable getInitException() {
return null;
}
+ @Override
+ public ServiceData getServiceData() {
+ return null;
+ }
}
15 years, 7 months
teiid SVN: r959 - trunk/server/src/main/java/com/metamatrix/platform/admin/apiimpl.
by teiid-commits@lists.jboss.org
Author: shawkins
Date: 2009-05-16 20:02:22 -0400 (Sat, 16 May 2009)
New Revision: 959
Modified:
trunk/server/src/main/java/com/metamatrix/platform/admin/apiimpl/RuntimeStateAdminAPIHelper.java
trunk/server/src/main/java/com/metamatrix/platform/admin/apiimpl/RuntimeStateAdminAPIImpl.java
Log:
removing unused code
Modified: trunk/server/src/main/java/com/metamatrix/platform/admin/apiimpl/RuntimeStateAdminAPIHelper.java
===================================================================
--- trunk/server/src/main/java/com/metamatrix/platform/admin/apiimpl/RuntimeStateAdminAPIHelper.java 2009-05-16 15:49:37 UTC (rev 958)
+++ trunk/server/src/main/java/com/metamatrix/platform/admin/apiimpl/RuntimeStateAdminAPIHelper.java 2009-05-17 00:02:22 UTC (rev 959)
@@ -37,7 +37,6 @@
import com.metamatrix.api.exception.MetaMatrixComponentException;
import com.metamatrix.api.exception.MultipleException;
import com.metamatrix.api.exception.security.AuthorizationException;
-import com.metamatrix.common.actions.ModificationException;
import com.metamatrix.common.config.api.Configuration;
import com.metamatrix.common.config.api.ConfigurationID;
import com.metamatrix.common.config.api.ServiceComponentDefnID;
Modified: trunk/server/src/main/java/com/metamatrix/platform/admin/apiimpl/RuntimeStateAdminAPIImpl.java
===================================================================
--- trunk/server/src/main/java/com/metamatrix/platform/admin/apiimpl/RuntimeStateAdminAPIImpl.java 2009-05-16 15:49:37 UTC (rev 958)
+++ trunk/server/src/main/java/com/metamatrix/platform/admin/apiimpl/RuntimeStateAdminAPIImpl.java 2009-05-17 00:02:22 UTC (rev 959)
@@ -299,8 +299,6 @@
LogManager.logInfo(LogPlatformConstants.CTX_RUNTIME_ADMIN, ServicePlugin.Util.getString(LogMessageKeys.ADMIN_0019, new Object[] {serviceID}));
- // Validate caller's session
- SessionToken token = AdminAPIHelper.validateSession();
helper.restartService(serviceID);
}
15 years, 7 months
teiid SVN: r958 - in trunk: engine/src/main/java/org/teiid/dqp/internal/cache and 1 other directory.
by teiid-commits@lists.jboss.org
Author: shawkins
Date: 2009-05-16 11:49:37 -0400 (Sat, 16 May 2009)
New Revision: 958
Modified:
trunk/common-core/src/main/java/com/metamatrix/api/exception/ExceptionHolder.java
trunk/engine/src/main/java/org/teiid/dqp/internal/cache/DQPContextCache.java
Log:
removing unused imports
Modified: trunk/common-core/src/main/java/com/metamatrix/api/exception/ExceptionHolder.java
===================================================================
--- trunk/common-core/src/main/java/com/metamatrix/api/exception/ExceptionHolder.java 2009-05-16 13:13:23 UTC (rev 957)
+++ trunk/common-core/src/main/java/com/metamatrix/api/exception/ExceptionHolder.java 2009-05-16 15:49:37 UTC (rev 958)
@@ -10,7 +10,6 @@
import java.io.ObjectOutputStream;
import java.util.ArrayList;
import java.util.Arrays;
-import java.util.Collection;
import java.util.List;
import com.metamatrix.core.CorePlugin;
Modified: trunk/engine/src/main/java/org/teiid/dqp/internal/cache/DQPContextCache.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/dqp/internal/cache/DQPContextCache.java 2009-05-16 13:13:23 UTC (rev 957)
+++ trunk/engine/src/main/java/org/teiid/dqp/internal/cache/DQPContextCache.java 2009-05-16 15:49:37 UTC (rev 958)
@@ -28,8 +28,6 @@
import com.metamatrix.cache.CacheConfiguration;
import com.metamatrix.cache.CacheFactory;
import com.metamatrix.cache.CacheConfiguration.Policy;
-import com.metamatrix.dqp.message.RequestID;
-import com.metamatrix.platform.security.api.SessionToken;
@Singleton
public class DQPContextCache {
15 years, 7 months
teiid SVN: r957 - in trunk/common-internal/src/main/java/com/metamatrix/common: stats and 1 other directory.
by teiid-commits@lists.jboss.org
Author: vhalbert(a)redhat.com
Date: 2009-05-16 09:13:23 -0400 (Sat, 16 May 2009)
New Revision: 957
Added:
trunk/common-internal/src/main/java/com/metamatrix/common/stats/
trunk/common-internal/src/main/java/com/metamatrix/common/stats/ConnectionPoolStats.java
Log:
Teiid-580 - adding support for monitoring connector connection pools - this is the stats class that will be responsibile for passing the info from the server to the client
Added: trunk/common-internal/src/main/java/com/metamatrix/common/stats/ConnectionPoolStats.java
===================================================================
--- trunk/common-internal/src/main/java/com/metamatrix/common/stats/ConnectionPoolStats.java (rev 0)
+++ trunk/common-internal/src/main/java/com/metamatrix/common/stats/ConnectionPoolStats.java 2009-05-16 13:13:23 UTC (rev 957)
@@ -0,0 +1,145 @@
+package com.metamatrix.common.stats;
+
+import java.io.Serializable;
+
+
+public class ConnectionPoolStats implements Serializable {
+
+ public static final int NON_XA_POOL_TYPE = 0;
+ public static final int XA_POOL_TYPE = 1;
+
+ /**
+ * @since 6.1
+ */
+ private static final long serialVersionUID = -2341549955193216875L;
+
+ /**
+ * This will the name of the connector binding
+ */
+ private String connectorBindingName;
+
+
+ /**
+ * This will be identifier used in the registry to identify the connector
+ * binding and in which host and process that it's running in
+ */
+ private String connectorBindingIdentifier;
+
+
+ private int poolType;
+
+
+ // current state
+ /**
+ * Number of connections currently in use by a client
+ */
+ private int connectionInUse;
+ /**
+ * Number of connections waiting for use by a client
+ */
+ private int connectionsWaiting;
+ /**
+ * Total number of connections currently in the pool
+ */
+ private int totalConnections;
+
+
+ // total counts never reset
+ /**
+ * Total number of connections that have been destroyed since the inception of the pool
+ */
+ private int connectionsDestroyed;
+ /**
+ * Total number of connections that have been created since the inception of the pool
+ */
+ private int connectionsCreated;
+
+ /**
+ * Constructor for ConnectionPoolStats
+ * @param poolType is the connection pool type {@link #NON_XA_POOL_TYPE} or {@link #XA_POOL_TYPE}
+ */
+ public ConnectionPoolStats(int poolType) {
+ this.poolType = poolType;
+ }
+
+ public boolean isXAPoolType() {
+ return (this.poolType==1?true:false);
+ }
+
+ public String getConnectorBindingName() {
+ return connectorBindingName;
+ }
+
+ public void setConnectorBindingName(String bindingName) {
+ this.connectorBindingName = bindingName;
+ }
+
+
+ public String getConnectorBindingIdentifier() {
+ return connectorBindingIdentifier;
+ }
+
+ public void setConnectorBindingIdentifier(String identifier) {
+ this.connectorBindingIdentifier = identifier;
+ }
+
+ public int getConnectionsInuse() {
+ return this.connectionInUse;
+ }
+
+ public int getConnectionsWaiting() {
+ return this.connectionsWaiting;
+ }
+
+ public long getConnectionsCreated() {
+ return this.connectionsCreated;
+ }
+
+ public long getConnectionsDestroyed() {
+ return this.connectionsDestroyed;
+ }
+
+ public int getTotalConnections() {
+ return this.totalConnections;
+ }
+
+ public void setConnectionsInUse(int inUseConnections) {
+ this.connectionInUse = inUseConnections;
+ }
+
+ public void setConnectionsWaiting(int waitingConnections) {
+ this.connectionsWaiting = waitingConnections;
+ }
+
+ public void setTotalConnections(int totalConnections) {
+ this.totalConnections = totalConnections;
+ }
+
+ public void setConnectionsDestroyed(int connectionsDestroyed) {
+ this.connectionsDestroyed = connectionsDestroyed;
+ }
+
+ public void setConnectionsCreated(int connectionsCreated) {
+ this.connectionsCreated = connectionsCreated;
+ }
+
+ @Override
+ /**
+ * Get string for display purposes
+ * @see java.lang.Object#toString()
+ * @since 6.1
+ */
+ public String toString() {
+ StringBuffer str = new StringBuffer();
+
+ str.append(this.connectorBindingIdentifier + " ConnectionPoolStats:\n"); //$NON-NLS-1$
+ str.append("\tisXAPoolType = " + isXAPoolType()); //$NON-NLS-1$
+ str.append("\ttotalConnections = " + this.totalConnections); //$NON-NLS-1$
+ str.append("\tinUseConnections = " + this.connectionInUse); //$NON-NLS-1$
+ str.append("\twaitingConnections = " + connectionsWaiting); //$NON-NLS-1$
+ str.append("\tconnectionsCreated = " + connectionsCreated); //$NON-NLS-1$
+ str.append("\tconnectionsDestroyed = " + connectionsDestroyed); //$NON-NLS-1$
+ return str.toString();
+ }
+
+}
Property changes on: trunk/common-internal/src/main/java/com/metamatrix/common/stats/ConnectionPoolStats.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
15 years, 7 months
teiid SVN: r956 - trunk/common-core/src/main/java/com/metamatrix/common/classloader.
by teiid-commits@lists.jboss.org
Author: shawkins
Date: 2009-05-16 08:54:00 -0400 (Sat, 16 May 2009)
New Revision: 956
Modified:
trunk/common-core/src/main/java/com/metamatrix/common/classloader/PostDelegatingClassLoader.java
Log:
TEIID-600 renaming non to post delegating and changing common extension to be a delegating classloader.
Modified: trunk/common-core/src/main/java/com/metamatrix/common/classloader/PostDelegatingClassLoader.java
===================================================================
--- trunk/common-core/src/main/java/com/metamatrix/common/classloader/PostDelegatingClassLoader.java 2009-05-15 21:56:27 UTC (rev 955)
+++ trunk/common-core/src/main/java/com/metamatrix/common/classloader/PostDelegatingClassLoader.java 2009-05-16 12:54:00 UTC (rev 956)
@@ -33,7 +33,7 @@
* then check it's parent ClassLoader, which is the reverse
* of the delegation model.
*/
-public class PostDelegatingClassLoader extends URLClassLoader {
+public class PostDelegatingClassLoader extends URLFilteringClassLoader {
public PostDelegatingClassLoader(URL[] urls, ClassLoader parent) {
super(urls, parent);
15 years, 7 months
teiid SVN: r955 - in trunk: embedded/src/main/java/com/metamatrix/dqp/embedded/services and 2 other directories.
by teiid-commits@lists.jboss.org
Author: rareddy
Date: 2009-05-15 17:56:27 -0400 (Fri, 15 May 2009)
New Revision: 955
Modified:
trunk/embedded/src/main/java/com/metamatrix/dqp/embedded/configuration/ExtensionModuleReader.java
trunk/embedded/src/main/java/com/metamatrix/dqp/embedded/services/EmbeddedConfigurationService.java
trunk/embedded/src/main/java/com/metamatrix/dqp/embedded/services/EmbeddedDataService.java
trunk/embedded/src/test/java/com/metamatrix/dqp/embedded/services/TestEmbeddedConfigurationService.java
trunk/engine/src/main/java/com/metamatrix/dqp/service/ConfigurationService.java
Log:
TEIID-600: Adding the "ConnectorClasspath" entries into "dqp.extension.CommonClasspath" in the embedded mode.
Modified: trunk/embedded/src/main/java/com/metamatrix/dqp/embedded/configuration/ExtensionModuleReader.java
===================================================================
--- trunk/embedded/src/main/java/com/metamatrix/dqp/embedded/configuration/ExtensionModuleReader.java 2009-05-15 20:59:59 UTC (rev 954)
+++ trunk/embedded/src/main/java/com/metamatrix/dqp/embedded/configuration/ExtensionModuleReader.java 2009-05-15 21:56:27 UTC (rev 955)
@@ -29,17 +29,18 @@
import java.net.MalformedURLException;
import java.net.URL;
import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.LinkedHashSet;
import java.util.List;
+import java.util.Set;
import java.util.StringTokenizer;
import com.metamatrix.api.exception.MetaMatrixComponentException;
import com.metamatrix.common.config.api.ExtensionModule;
import com.metamatrix.common.config.model.BasicExtensionModule;
-import com.metamatrix.common.log.LogManager;
import com.metamatrix.common.protocol.URLHelper;
import com.metamatrix.common.util.ByteArrayHelper;
import com.metamatrix.dqp.embedded.DQPEmbeddedPlugin;
-import com.metamatrix.dqp.util.LogConstants;
/**
@@ -135,10 +136,10 @@
* @throws MalformedURLException
* @since 4.3
*/
- public static List<URL> resolveExtensionClasspath(String extClassPath, URL[] contexts)
+ public static Set<URL> resolveExtensionClasspath(String extClassPath, URL[] contexts)
throws IOException {
- List<URL> urls = new ArrayList<URL>();
+ Set<URL> urls = new LinkedHashSet<URL>();
StringTokenizer st = new StringTokenizer(extClassPath, ";"); //$NON-NLS-1$
while (st.hasMoreTokens()) {
String extModule = st.nextToken();
Modified: trunk/embedded/src/main/java/com/metamatrix/dqp/embedded/services/EmbeddedConfigurationService.java
===================================================================
--- trunk/embedded/src/main/java/com/metamatrix/dqp/embedded/services/EmbeddedConfigurationService.java 2009-05-15 20:59:59 UTC (rev 954)
+++ trunk/embedded/src/main/java/com/metamatrix/dqp/embedded/services/EmbeddedConfigurationService.java 2009-05-15 21:56:27 UTC (rev 955)
@@ -38,6 +38,8 @@
import java.util.Set;
import java.util.StringTokenizer;
+import org.teiid.connector.internal.ConnectorPropertyNames;
+
import com.metamatrix.api.exception.MetaMatrixComponentException;
import com.metamatrix.common.application.ApplicationEnvironment;
import com.metamatrix.common.application.exception.ApplicationInitializationException;
@@ -50,10 +52,8 @@
import com.metamatrix.common.config.api.ConnectorBinding;
import com.metamatrix.common.config.api.ConnectorBindingType;
import com.metamatrix.common.config.api.ExtensionModule;
-import com.metamatrix.common.config.model.BasicComponentType;
import com.metamatrix.common.config.model.BasicConnectorBinding;
import com.metamatrix.common.log.LogManager;
-import com.metamatrix.common.object.PropertyDefinition;
import com.metamatrix.common.protocol.URLHelper;
import com.metamatrix.common.util.PropertiesUtils;
import com.metamatrix.common.util.crypto.CryptoException;
@@ -222,15 +222,28 @@
/**
* @see com.metamatrix.dqp.service.ConfigurationService#getCommonExtensionClasspath()
*/
- public List<URL> getCommonExtensionClasspath() {
+ public Set<URL> getCommonExtensionClasspath() {
String classpath= userPreferences.getProperty(DQPEmbeddedProperties.COMMON_EXTENSION_CLASPATH);
+
+ // add the "ConnectorClasspath" to the common extension path
+ Collection<ConnectorBinding> bindings = this.loadedConnectorBindings.values();
+ for (ConnectorBinding b:bindings) {
+ if (classpath == null) {
+ classpath = b.getProperty(ConnectorPropertyNames.CONNECTOR_CLASSPATH);
+ }
+ else {
+ classpath += ";"; //$NON-NLS-1$
+ classpath += b.getProperty(ConnectorPropertyNames.CONNECTOR_CLASSPATH);
+ }
+ }
+
if (valid(classpath)) {
try {
return ExtensionModuleReader.resolveExtensionClasspath(classpath, getExtensionPath());
} catch (IOException e) {
DQPEmbeddedPlugin.logError(e, "EmbeddedConfigurationService.udf_classspath_failure", new Object[] {}); //$NON-NLS-1$
}
- }
+ }
return null;
}
@@ -900,7 +913,7 @@
public void loadUDF() throws MetaMatrixComponentException {
URL udfFile = getUDFFile();
if(udfFile != null && exists(udfFile)) {
- List<URL> urls = getCommonExtensionClasspath();
+ Set<URL> urls = getCommonExtensionClasspath();
try {
// un-register the old UDF model, if there is one.
Modified: trunk/embedded/src/main/java/com/metamatrix/dqp/embedded/services/EmbeddedDataService.java
===================================================================
--- trunk/embedded/src/main/java/com/metamatrix/dqp/embedded/services/EmbeddedDataService.java 2009-05-15 20:59:59 UTC (rev 954)
+++ trunk/embedded/src/main/java/com/metamatrix/dqp/embedded/services/EmbeddedDataService.java 2009-05-15 21:56:27 UTC (rev 955)
@@ -24,13 +24,13 @@
import java.net.URL;
import java.util.ArrayList;
-import java.util.Arrays;
import java.util.Collection;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Properties;
+import java.util.Set;
import java.util.concurrent.atomic.AtomicInteger;
import org.teiid.connector.api.ConnectorException;
@@ -566,10 +566,10 @@
DQPEmbeddedPlugin.logInfo("DataService.useClassloader", new Object[] {classPath}); //$NON-NLS-1$
- List<URL> userPath = ExtensionModuleReader.resolveExtensionClasspath(classPath, getConfigurationService().getExtensionPath());
+ Set<URL> userPath = ExtensionModuleReader.resolveExtensionClasspath(classPath, getConfigurationService().getExtensionPath());
// since we are using the extensions, get the common extension path
- List<URL> commonExtensionPath = getConfigurationService().getCommonExtensionClasspath();
+ Set<URL> commonExtensionPath = getConfigurationService().getCommonExtensionClasspath();
ArrayList<URL> urlPath = new ArrayList<URL>();
urlPath.addAll(userPath);
Modified: trunk/embedded/src/test/java/com/metamatrix/dqp/embedded/services/TestEmbeddedConfigurationService.java
===================================================================
--- trunk/embedded/src/test/java/com/metamatrix/dqp/embedded/services/TestEmbeddedConfigurationService.java 2009-05-15 20:59:59 UTC (rev 954)
+++ trunk/embedded/src/test/java/com/metamatrix/dqp/embedded/services/TestEmbeddedConfigurationService.java 2009-05-15 21:56:27 UTC (rev 955)
@@ -31,9 +31,12 @@
import java.util.List;
import java.util.Map;
import java.util.Properties;
+import java.util.Set;
import junit.framework.TestCase;
+import org.teiid.connector.internal.ConnectorPropertyNames;
+
import com.metamatrix.api.exception.MetaMatrixComponentException;
import com.metamatrix.common.application.ApplicationEnvironment;
import com.metamatrix.common.config.api.ComponentType;
@@ -533,11 +536,12 @@
modules = service.getExtensionModules();
assertEquals(2, modules.size());
-
- // test common class path; also makes sure that the conect in position (1) has the newly added module
+
+ // test common class path; also makes sure that the connect in position (1) has the newly added module
service.userPreferences.setProperty("dqp.extension.CommonClasspath", "extensionjar:added-ext.jar;extensionjar:extfile.jar"); //$NON-NLS-1$ //$NON-NLS-2$
- assertEquals("mmfile:target/scratch/dqp/foo/added-ext.jar", service.getCommonExtensionClasspath().get(0).toString()); //$NON-NLS-1$
- assertEquals("mmfile:target/scratch/dqp/bar/extfile.jar", service.getCommonExtensionClasspath().get(1).toString()); //$NON-NLS-1$
+ Iterator<URL> i = service.getCommonExtensionClasspath().iterator();
+ assertEquals("mmfile:target/scratch/dqp/foo/added-ext.jar", i.next().toString()); //$NON-NLS-1$
+ assertEquals("mmfile:target/scratch/dqp/bar/extfile.jar", i.next().toString()); //$NON-NLS-1$
// test delete
service.deleteExtensionModule("added-ext.jar"); //$NON-NLS-1$
@@ -554,4 +558,39 @@
f.delete();
}
+ public void testCommonExtensionPath() throws Exception{
+ Properties p = EmbeddedTestUtil.getProperties();
+ File f = new File("target/scratch/dqp/bar"); //$NON-NLS-1$
+ f.mkdirs();
+ FileWriter fw = new FileWriter("target/scratch/dqp/bar/extfile.jar"); //$NON-NLS-1$
+ fw.write("testing extension modules"); //$NON-NLS-1$
+ fw.flush();
+ fw.close();
+
+ fw = new FileWriter("target/scratch/dqp/bar/driver.jar"); //$NON-NLS-1$
+ fw.write("testing extension modules"); //$NON-NLS-1$
+ fw.flush();
+ fw.close();
+
+ p.setProperty("dqp.extensions", "./foo/;./bar/"); //$NON-NLS-1$ //$NON-NLS-2$
+ service.userPreferences = p;
+
+ assertNull(service.getCommonExtensionClasspath());
+
+ p.setProperty(DQPEmbeddedProperties.COMMON_EXTENSION_CLASPATH, "extensionjar:extfile.jar"); //$NON-NLS-1$
+
+ Set<URL> urls = service.getCommonExtensionClasspath();
+ assertEquals("mmfile:target/scratch/dqp/bar/extfile.jar", urls.iterator().next().toString()); //$NON-NLS-1$
+
+ BasicConnectorBinding binding = new BasicConnectorBinding(new ConfigurationID("foo"), new ConnectorBindingID(new ConfigurationID("foo"), "foo"), new ComponentTypeID("foo type")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ Properties props = new Properties();
+ props.setProperty(ConnectorPropertyNames.CONNECTOR_CLASSPATH, "extensionjar:driver.jar"); //$NON-NLS-1$
+ binding.setProperties(props);
+ service.loadedConnectorBindings.put("Foo", binding); //$NON-NLS-1$
+
+ Iterator<URL> i = service.getCommonExtensionClasspath().iterator();
+
+ assertEquals("mmfile:target/scratch/dqp/bar/extfile.jar", i.next().toString()); //$NON-NLS-1$
+ assertEquals("mmfile:target/scratch/dqp/bar/driver.jar", i.next().toString()); //$NON-NLS-1$
+ }
}
Modified: trunk/engine/src/main/java/com/metamatrix/dqp/service/ConfigurationService.java
===================================================================
--- trunk/engine/src/main/java/com/metamatrix/dqp/service/ConfigurationService.java 2009-05-15 20:59:59 UTC (rev 954)
+++ trunk/engine/src/main/java/com/metamatrix/dqp/service/ConfigurationService.java 2009-05-15 21:56:27 UTC (rev 955)
@@ -102,7 +102,7 @@
* files are loaded usually as the extension modules.
* @return URL[] - Classpath for the UDF jar files
*/
- public List<URL> getCommonExtensionClasspath();
+ public Set<URL> getCommonExtensionClasspath();
/**
* URL to Log file name
15 years, 7 months
teiid SVN: r954 - trunk/build/assembly/embedded.
by teiid-commits@lists.jboss.org
Author: rareddy
Date: 2009-05-15 16:59:59 -0400 (Fri, 15 May 2009)
New Revision: 954
Modified:
trunk/build/assembly/embedded/build-configuration.xml
Log:
TEIID-600: moving all the connector-* jars into "lib" directory of the kits and keeping only the connector dependencies in the "extensions". Also, removed the "connector-xxx.jar" file and "connector_patch.jar" from the "ConnectorTypeClasspath" as libraries specified in here are loaded with post-delegation model.
Modified: trunk/build/assembly/embedded/build-configuration.xml
===================================================================
--- trunk/build/assembly/embedded/build-configuration.xml 2009-05-15 20:59:30 UTC (rev 953)
+++ trunk/build/assembly/embedded/build-configuration.xml 2009-05-15 20:59:59 UTC (rev 954)
@@ -18,9 +18,16 @@
</unzip>
<move todir="${kit.dir}/extensions">
<fileset dir="${extensions.dir}/unzipped">
- <include name="**/*.jar"/>
+ <exclude name="**/connector-*.jar"/>
+ <exclude name="**/*.xml"/>
</fileset>
</move>
+
+ <move todir="${kit.dir}/lib">
+ <fileset dir="${extensions.dir}/unzipped">
+ <include name="**/connector-*.jar"/>
+ </fileset>
+ </move>
<!-- add all the cdk files, and then add the combined fragment to the config.xml -->
<concat destfile="${extensions.dir}/unzipped/all-cdks.xml">
15 years, 7 months
teiid SVN: r953 - in trunk/connectors: connector-ldap/src/main/resources and 4 other directories.
by teiid-commits@lists.jboss.org
Author: rareddy
Date: 2009-05-15 16:59:30 -0400 (Fri, 15 May 2009)
New Revision: 953
Modified:
trunk/connectors/connector-jdbc/src/main/resources/connector-jdbc.xml
trunk/connectors/connector-ldap/src/main/resources/connector-ldap.xml
trunk/connectors/connector-loopback/src/main/resources/connector-loopback.xml
trunk/connectors/connector-salesforce/src/main/resources/connector-salesforce.xml
trunk/connectors/connector-text/src/main/resources/connector-text.xml
trunk/connectors/connector-xml/src/main/resources/connector-xml.xml
Log:
TEIID-600: moving all the connector-* jars into "lib" directory of the kits and keeping only the connector dependencies in the "extensions". Also, removed the "connector-xxx.jar" file and "connector_patch.jar" from the "ConnectorTypeClasspath" as libraries specified in here are loaded with post-delegation model.
Modified: trunk/connectors/connector-jdbc/src/main/resources/connector-jdbc.xml
===================================================================
--- trunk/connectors/connector-jdbc/src/main/resources/connector-jdbc.xml 2009-05-15 18:09:13 UTC (rev 952)
+++ trunk/connectors/connector-jdbc/src/main/resources/connector-jdbc.xml 2009-05-15 20:59:30 UTC (rev 953)
@@ -1,5 +1,5 @@
<ComponentType Name="JDBC Connector" ComponentTypeCode="2" Deployable="true" Deprecated="false" Monitorable="false" SuperComponentType="Connector" ParentComponentType="Connectors" LastChangedBy="ConfigurationStartup" LastChangedDate="2008-10-31T10:26:19.952-06:00" CreatedBy="ConfigurationStartup" CreationDate="2008-10-31T10:26:19.952-06:00">
- <PropertyDefinition Name="ConnectorTypeClassPath" DisplayName="Connector Type Class Path" ShortDescription="Connector Type classpath (defined by system, do not modify)" DefaultValue="extensionjar:connector_patch.jar;extensionjar:${project.artifactId}-${project.version}.jar;${classpath}" Multiplicity="0..1" IsExpert="true" IsModifiable="false" IsHidden="true" />
+ <PropertyDefinition Name="ConnectorTypeClassPath" DisplayName="Connector Type Class Path" ShortDescription="Connector Type classpath (defined by system, do not modify)" DefaultValue="${classpath}" Multiplicity="0..1" IsExpert="true" IsModifiable="false" IsHidden="true" />
<PropertyDefinition Name="UseBindVariables" DisplayName="Use prepared statements and bind variables" ShortDescription="" DefaultValue="false" PropertyType="Boolean" IsExpert="true" />
<PropertyDefinition Name="ExtensionCapabilityClass" DisplayName="Extension Capability Class" ShortDescription="" IsExpert="true" />
<PropertyDefinition Name="ConnectorClass" DisplayName="Connector Class" ShortDescription="" DefaultValue="org.teiid.connector.jdbc.JDBCConnector" Multiplicity="1" IsExpert="true" />
Modified: trunk/connectors/connector-ldap/src/main/resources/connector-ldap.xml
===================================================================
--- trunk/connectors/connector-ldap/src/main/resources/connector-ldap.xml 2009-05-15 18:09:13 UTC (rev 952)
+++ trunk/connectors/connector-ldap/src/main/resources/connector-ldap.xml 2009-05-15 20:59:30 UTC (rev 953)
@@ -1,6 +1,6 @@
<ComponentType Name="LDAP Connector" ComponentTypeCode="2" Deployable="true" Deprecated="false" Monitorable="false" SuperComponentType="Connector" ParentComponentType="Connectors" LastChangedBy="ConfigurationStartup" LastChangedDate="2008-10-31T10:26:19.946-06:00" CreatedBy="ConfigurationStartup" CreationDate="2008-10-31T10:26:19.946-06:00">
<PropertyDefinition Name="ConnectorClassPath" DisplayName="Class Path" ShortDescription="" Multiplicity="0..1" IsPreferred="true"/>
- <PropertyDefinition Name="ConnectorTypeClassPath" DisplayName="Connector Type Class Path" ShortDescription="Connector Type classpath (defined by system, do not modify)" DefaultValue="extensionjar:connector_patch.jar;extensionjar:${project.artifactId}-${project.version}.jar;${classpath}" Multiplicity="0..1" IsExpert="true" IsModifiable="false" IsHidden="true" />
+ <PropertyDefinition Name="ConnectorTypeClassPath" DisplayName="Connector Type Class Path" ShortDescription="Connector Type classpath (defined by system, do not modify)" DefaultValue="${classpath}" Multiplicity="0..1" IsExpert="true" IsModifiable="false" IsHidden="true" />
<PropertyDefinition Name="SearchDefaultBaseDN" DisplayName="Default Search Base DN" ShortDescription="Default Base DN for LDAP Searches" IsExpert="true" />
<PropertyDefinition Name="LdapAdminUserDN" DisplayName="Ldap Admin User DN" ShortDescription="User DN for the LDAP admin account." DefaultValue="cn=<>,ou=<>,dc=<>" Multiplicity="1" IsPreferred="true" />
<PropertyDefinition Name="Standard" DisplayName="Standard Type" ShortDescription="Standard Built-in Connector Type" DefaultValue="true" PropertyType="Boolean" IsExpert="true" IsModifiable="false" />
Modified: trunk/connectors/connector-loopback/src/main/resources/connector-loopback.xml
===================================================================
--- trunk/connectors/connector-loopback/src/main/resources/connector-loopback.xml 2009-05-15 18:09:13 UTC (rev 952)
+++ trunk/connectors/connector-loopback/src/main/resources/connector-loopback.xml 2009-05-15 20:59:30 UTC (rev 953)
@@ -1,6 +1,6 @@
<ComponentType Name="Loopback Connector" ComponentTypeCode="2" Deployable="true" Deprecated="false" Monitorable="false" SuperComponentType="Connector" ParentComponentType="Connectors" LastChangedBy="ConfigurationStartup" LastChangedDate="2008-10-31T10:26:19.945-06:00" CreatedBy="ConfigurationStartup" CreationDate="2008-10-31T10:26:19.945-06:00">
<PropertyDefinition Name="ConnectorClassPath" DisplayName="Class Path" ShortDescription="" Multiplicity="0..1" IsPreferred="true"/>
- <PropertyDefinition Name="ConnectorTypeClassPath" DisplayName="Connector Type Class Path" ShortDescription="Connector Type classpath (defined by system, do not modify)" DefaultValue="extensionjar:connector_patch.jar;extensionjar:${project.artifactId}-${project.version}.jar;${classpath}" Multiplicity="0..1" IsExpert="true" IsModifiable="false" IsHidden="true" />
+ <PropertyDefinition Name="ConnectorTypeClassPath" DisplayName="Connector Type Class Path" ShortDescription="Connector Type classpath (defined by system, do not modify)" DefaultValue="${classpath}" Multiplicity="0..1" IsExpert="true" IsModifiable="false" IsHidden="true" />
<PropertyDefinition Name="CapabilitiesClass" DisplayName="Capabilities Class" ShortDescription="" DefaultValue="com.metamatrix.connector.loopback.LoopbackCapabilities" Multiplicity="1" IsExpert="true" />
<PropertyDefinition Name="WaitTime" DisplayName="Max Random Wait Time" ShortDescription="" DefaultValue="0" Multiplicity="1" IsExpert="true" />
<PropertyDefinition Name="ConnectorClass" DisplayName="Connector Class" ShortDescription="" DefaultValue="com.metamatrix.connector.loopback.LoopbackConnector" Multiplicity="1" IsExpert="true" />
Modified: trunk/connectors/connector-salesforce/src/main/resources/connector-salesforce.xml
===================================================================
--- trunk/connectors/connector-salesforce/src/main/resources/connector-salesforce.xml 2009-05-15 18:09:13 UTC (rev 952)
+++ trunk/connectors/connector-salesforce/src/main/resources/connector-salesforce.xml 2009-05-15 20:59:30 UTC (rev 953)
@@ -1,6 +1,6 @@
<ComponentType Name="Salesforce Connector" ComponentTypeCode="2" Deployable="true" Deprecated="false" Monitorable="false" SuperComponentType="Connector" ParentComponentType="Connectors" LastChangedDate="2008-10-31T10:26:19.916-06:00" CreationDate="2008-10-31T10:26:19.916-06:00">
<PropertyDefinition Name="ConnectorClassPath" DisplayName="Class Path" ShortDescription="" Multiplicity="0..1" IsPreferred="true"/>
- <PropertyDefinition Name="ConnectorTypeClassPath" DisplayName="Connector Type Class Path" ShortDescription="Connector Type classpath (defined by system, do not modify)" DefaultValue="extensionjar:connector_patch.jar;extensionjar:${project.artifactId}-${project.version}.jar;${classpath}" Multiplicity="0..1" IsExpert="true" IsModifiable="false" IsHidden="true" />
+ <PropertyDefinition Name="ConnectorTypeClassPath" DisplayName="Connector Type Class Path" ShortDescription="Connector Type classpath (defined by system, do not modify)" DefaultValue="${classpath}" Multiplicity="0..1" IsExpert="true" IsModifiable="false" IsHidden="true" />
<PropertyDefinition Name="username" DisplayName="User Name" ShortDescription="Name value for Salesforce authentication" DefaultValue="" Multiplicity="1" IsPreferred="true" />
<PropertyDefinition Name="ConnectorStateClass" DisplayName="Connector State Class" ShortDescription="" DefaultValue="com.metamatrix.connector.salesforce.ConnectorState" Multiplicity="1" IsExpert="true" />
<PropertyDefinition Name="ConnectorClass" DisplayName="Connector Class" ShortDescription="" DefaultValue="com.metamatrix.connector.salesforce.Connector" Multiplicity="1" IsExpert="true" />
Modified: trunk/connectors/connector-text/src/main/resources/connector-text.xml
===================================================================
--- trunk/connectors/connector-text/src/main/resources/connector-text.xml 2009-05-15 18:09:13 UTC (rev 952)
+++ trunk/connectors/connector-text/src/main/resources/connector-text.xml 2009-05-15 20:59:30 UTC (rev 953)
@@ -1,6 +1,6 @@
<ComponentType Name="Text File Connector" ComponentTypeCode="2" Deployable="true" Deprecated="false" Monitorable="false" SuperComponentType="Connector" ParentComponentType="Connectors" LastChangedBy="ConfigurationStartup" LastChangedDate="2008-10-31T10:26:19.945-06:00" CreatedBy="ConfigurationStartup" CreationDate="2008-10-31T10:26:19.945-06:00">
<PropertyDefinition Name="ConnectorClassPath" DisplayName="Class Path" ShortDescription="" Multiplicity="0..1" IsPreferred="true"/>
- <PropertyDefinition Name="ConnectorTypeClassPath" DisplayName="Connector Type Class Path" ShortDescription="Connector Type classpath (defined by system, do not modify)" DefaultValue="extensionjar:connector_patch.jar;extensionjar:${project.artifactId}-${project.version}.jar;${classpath}" Multiplicity="0..1" IsExpert="true" IsModifiable="false" IsHidden="true"/>
+ <PropertyDefinition Name="ConnectorTypeClassPath" DisplayName="Connector Type Class Path" ShortDescription="Connector Type classpath (defined by system, do not modify)" DefaultValue="${classpath}" Multiplicity="0..1" IsExpert="true" IsModifiable="false" IsHidden="true"/>
<PropertyDefinition Name="PartialStartupAllowed" DisplayName="Partial Startup Allowed" ShortDescription="" DefaultValue="true" Multiplicity="1" PropertyType="Boolean" IsExpert="true" IsPreferred="true" />
<PropertyDefinition Name="Standard" DisplayName="Standard Type" ShortDescription="Standard Built-in Connector Type" DefaultValue="true" PropertyType="Boolean" IsExpert="true" IsModifiable="false" />
<PropertyDefinition Name="DescriptorFile" DisplayName="Text File Descriptor" ShortDescription="" Multiplicity="1" IsPreferred="true" />
Modified: trunk/connectors/connector-xml/src/main/resources/connector-xml.xml
===================================================================
--- trunk/connectors/connector-xml/src/main/resources/connector-xml.xml 2009-05-15 18:09:13 UTC (rev 952)
+++ trunk/connectors/connector-xml/src/main/resources/connector-xml.xml 2009-05-15 20:59:30 UTC (rev 953)
@@ -1,6 +1,6 @@
<ComponentType Name="XML Connector" ComponentTypeCode="2" Deployable="true" Deprecated="false" Monitorable="false" SuperComponentType="Connector" ParentComponentType="Connectors" LastChangedDate="2008-10-31T10:26:19.917-06:00" CreationDate="2008-10-31T10:26:19.917-06:00">
<PropertyDefinition Name="ConnectorClassPath" DisplayName="Class Path" ShortDescription="" Multiplicity="0..1" IsPreferred="true"/>
- <PropertyDefinition Name="ConnectorTypeClassPath" DisplayName="Connector Type Class Path" ShortDescription="Connector Type classpath (defined by system, do not modify)" DefaultValue="extensionjar:connector_patch.jar;extensionjar:${project.artifactId}-${project.version}.jar;${classpath}" Multiplicity="0..1" IsExpert="true" IsModifiable="false" IsHidden="true"/>
+ <PropertyDefinition Name="ConnectorTypeClassPath" DisplayName="Connector Type Class Path" ShortDescription="Connector Type classpath (defined by system, do not modify)" DefaultValue="${classpath}" Multiplicity="0..1" IsExpert="true" IsModifiable="false" IsHidden="true"/>
</ComponentType>
<ComponentType Name="XML File Connector" ComponentTypeCode="2" Deployable="true" Deprecated="false" Monitorable="false" SuperComponentType="XML Connector" ParentComponentType="Connectors" LastChangedDate="2008-10-31T10:26:19.917-06:00" CreationDate="2008-10-31T10:26:19.917-06:00">
15 years, 7 months