riftsaw SVN: r1177 - in trunk: runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/engine/ode and 2 other directories.
by riftsaw-commits@lists.jboss.org
Author: objectiser
Date: 2010-12-02 09:37:45 -0500 (Thu, 02 Dec 2010)
New Revision: 1177
Modified:
trunk/console/integration/src/main/java/org/jboss/soa/bpel/console/SVGPlugin.java
trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/engine/ode/BPELEngineImpl.java
trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/EndpointManager.java
trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/WebServiceClient.java
trunk/runtime/uddi/src/main/java/org/jboss/soa/bpel/uddi/UDDIRegistrationImpl.java
Log:
Change API for server config factory.
Modified: trunk/console/integration/src/main/java/org/jboss/soa/bpel/console/SVGPlugin.java
===================================================================
--- trunk/console/integration/src/main/java/org/jboss/soa/bpel/console/SVGPlugin.java 2010-12-02 12:05:03 UTC (rev 1176)
+++ trunk/console/integration/src/main/java/org/jboss/soa/bpel/console/SVGPlugin.java 2010-12-02 14:37:45 UTC (rev 1177)
@@ -69,7 +69,7 @@
public SVGPlugin() {
// host & port resolution
- ServerConfig serverConfig = ServerConfigFactory.getServerConfig();
+ ServerConfig serverConfig = ServerConfigFactory.createServerConfig();
this.webServiceHost = serverConfig.getWebServiceHost();
this.webServicePort = serverConfig.getWebServicePort();
Modified: trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/engine/ode/BPELEngineImpl.java
===================================================================
--- trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/engine/ode/BPELEngineImpl.java 2010-12-02 12:05:03 UTC (rev 1176)
+++ trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/engine/ode/BPELEngineImpl.java 2010-12-02 14:37:45 UTC (rev 1177)
@@ -485,7 +485,7 @@
protected Scheduler createScheduler() {
- String clusterNodeName=ServerConfigFactory.getServerConfig().getClusterNodeName();
+ String clusterNodeName=ServerConfigFactory.createServerConfig().getClusterNodeName();
__log.info("Scheduler node name: "+clusterNodeName);
Modified: trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/EndpointManager.java
===================================================================
--- trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/EndpointManager.java 2010-12-02 12:05:03 UTC (rev 1176)
+++ trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/EndpointManager.java 2010-12-02 14:37:45 UTC (rev 1177)
@@ -92,7 +92,7 @@
public EndpointManager(ExecutionEnvironment executionEnvironment)
{
this.executionEnvironment = executionEnvironment;
- this.serverConfig = ServerConfigFactory.getServerConfig();
+ this.serverConfig = ServerConfigFactory.createServerConfig();
if (isUDDIRegistration()) {
try {
uddiRegistration = UDDIClientFactory.newInstance(executionEnvironment.getOdeConfig().getProperties());
Modified: trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/WebServiceClient.java
===================================================================
--- trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/WebServiceClient.java 2010-12-02 12:05:03 UTC (rev 1176)
+++ trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/WebServiceClient.java 2010-12-02 14:37:45 UTC (rev 1177)
@@ -53,6 +53,7 @@
import org.jboss.soa.bpel.runtime.engine.ode.UDDIClientFactory;
import org.jboss.soa.bpel.runtime.engine.ode.UDDIRegistration;
import org.jboss.soa.dsp.EndpointMetaData;
+import org.jboss.soa.dsp.server.ServerConfig;
import org.jboss.soa.dsp.server.jboss.ServerConfigFactory;
import org.jboss.soa.dsp.ws.DOMWriter;
import org.jboss.soa.dsp.ws.JavaUtils;
@@ -114,11 +115,12 @@
private synchronized void initialize() {
if (isUDDILookup()) {
try {
- String webServiceHost = ServerConfigFactory.getServerConfig().getWebServiceHost();
- int webServicePort = ServerConfigFactory.getServerConfig().getWebServicePort();
+ ServerConfig serverConfig=ServerConfigFactory.createServerConfig();
+ String webServiceHost = serverConfig.getWebServiceHost();
+ int webServicePort = serverConfig.getWebServicePort();
URL url = new URL("http://" + webServiceHost + ":" + webServicePort);
if (isWebserviceSecure()) {
- int secureWebServicePort = ServerConfigFactory.getServerConfig().getWebServicePort();
+ int secureWebServicePort = serverConfig.getWebServicePort();
url = new URL("https://" + webServiceHost + ":" + secureWebServicePort);
}
//give the user the option to override
Modified: trunk/runtime/uddi/src/main/java/org/jboss/soa/bpel/uddi/UDDIRegistrationImpl.java
===================================================================
--- trunk/runtime/uddi/src/main/java/org/jboss/soa/bpel/uddi/UDDIRegistrationImpl.java 2010-12-02 12:05:03 UTC (rev 1176)
+++ trunk/runtime/uddi/src/main/java/org/jboss/soa/bpel/uddi/UDDIRegistrationImpl.java 2010-12-02 14:37:45 UTC (rev 1177)
@@ -46,6 +46,7 @@
import org.apache.juddi.v3.client.transport.TransportException;
import org.jboss.soa.bpel.runtime.engine.ode.UDDIRegistration;
import org.jboss.soa.bpel.runtime.ws.WebServiceClient;
+import org.jboss.soa.dsp.server.ServerConfig;
import org.jboss.soa.dsp.server.jboss.ServerConfigFactory;
import org.jboss.soa.dsp.ws.WSDLReference;
import org.uddi.api_v3.AccessPoint;
@@ -200,7 +201,7 @@
if (bpelClerk!=null) {
try {
Properties properties = bpelClerk.getUDDINode().getProperties();
- properties.put("nodeName", ServerConfigFactory.getServerConfig().getUddiNodeName());
+ properties.put("nodeName", ServerConfigFactory.createServerConfig().getUddiNodeName());
//Constructing the bindingKey
String bindingKey = TokenResolver.replaceTokens(DEFAULT_BINDING_KEY_FORMAT + bindingName, properties);
if (properties.containsKey(BINDING_KEY_FORMAT)) {
@@ -251,7 +252,7 @@
String serviceName, String portName, URL accessUrl)
throws DispositionReportFaultMessage, RemoteException, ConfigurationException, TransportException {
Properties properties = clerk.getUDDINode().getProperties();
- properties.put("nodeName", ServerConfigFactory.getServerConfig().getUddiNodeName());
+ properties.put("nodeName", ServerConfigFactory.createServerConfig().getUddiNodeName());
//Constructing the serviceKey
String serviceKey = TokenResolver.replaceTokens(DEFAULT_SERVICE_KEY_FORMAT + serviceName, properties);
@@ -521,11 +522,12 @@
private String getDefaultWebServiceBaseUrl() {
try {
- String webServiceHost = ServerConfigFactory.getServerConfig().getWebServiceHost();
- int webServicePort = ServerConfigFactory.getServerConfig().getWebServicePort();
+ ServerConfig serverConfig=ServerConfigFactory.createServerConfig();
+ String webServiceHost = serverConfig.getWebServiceHost();
+ int webServicePort = serverConfig.getWebServicePort();
URL theURL = new URL("http://" + webServiceHost + ":" + webServicePort);
if (Boolean.valueOf(properties.getProperty(WebServiceClient.BPEL_WEBSERVICE_SECURE, "false"))) {
- int secureWebServicePort = ServerConfigFactory.getServerConfig().getWebServicePort();
+ int secureWebServicePort = serverConfig.getWebServicePort();
theURL = new URL("https://" + webServiceHost + ":" + secureWebServicePort);
}
return theURL.toExternalForm();
14 years, 3 months
riftsaw SVN: r1176 - in dsp/trunk: jboss/src/main/java/org/jboss/soa/dsp/server/jboss and 4 other directories.
by riftsaw-commits@lists.jboss.org
Author: objectiser
Date: 2010-12-02 07:05:03 -0500 (Thu, 02 Dec 2010)
New Revision: 1176
Added:
dsp/trunk/api/src/main/java/org/jboss/soa/dsp/server/ServerConfigLocator.java
dsp/trunk/samples/deployer/src/main/webapp/WEB-INF/classes/
dsp/trunk/samples/deployer/src/main/webapp/WEB-INF/classes/dsp.properties
Modified:
dsp/trunk/jboss/src/main/java/org/jboss/soa/dsp/server/jboss/ServerConfigFactory.java
dsp/trunk/samples/deployer/lib/dsp-api-1.0.0-SNAPSHOT.jar
dsp/trunk/samples/deployer/lib/dsp-jboss-1.0.0-SNAPSHOT.jar
dsp/trunk/samples/deployer/src/main/java/org/jboss/soa/dsp/example/DSPExampleForm.java
dsp/trunk/samples/deployer/src/main/java/org/jboss/soa/dsp/example/DeployStore.java
dsp/trunk/samples/deployer/src/main/java/org/jboss/soa/dsp/example/WSDeployer.java
Log:
Made the DSP example deployer target platform independent, configured through a property file.
Added: dsp/trunk/api/src/main/java/org/jboss/soa/dsp/server/ServerConfigLocator.java
===================================================================
--- dsp/trunk/api/src/main/java/org/jboss/soa/dsp/server/ServerConfigLocator.java (rev 0)
+++ dsp/trunk/api/src/main/java/org/jboss/soa/dsp/server/ServerConfigLocator.java 2010-12-02 12:05:03 UTC (rev 1176)
@@ -0,0 +1,34 @@
+/*
+ * Copyright 2010 Red Hat, Inc
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+package org.jboss.soa.dsp.server;
+
+import org.jboss.soa.dsp.server.ServerConfig;
+
+/**
+ * Factory used to return an instance of the server configuration.
+ *
+ */
+public interface ServerConfigLocator {
+
+ /**
+ * This method returns an instance of the server configuration.
+ *
+ * @return The service configuration
+ */
+ public ServerConfig getServerConfig();
+
+}
\ No newline at end of file
Modified: dsp/trunk/jboss/src/main/java/org/jboss/soa/dsp/server/jboss/ServerConfigFactory.java
===================================================================
--- dsp/trunk/jboss/src/main/java/org/jboss/soa/dsp/server/jboss/ServerConfigFactory.java 2010-12-02 03:38:19 UTC (rev 1175)
+++ dsp/trunk/jboss/src/main/java/org/jboss/soa/dsp/server/jboss/ServerConfigFactory.java 2010-12-02 12:05:03 UTC (rev 1176)
@@ -27,15 +27,19 @@
*
* @since 08-May-2006
*/
-public class ServerConfigFactory
+public class ServerConfigFactory implements org.jboss.soa.dsp.server.ServerConfigLocator
{
/** The default bean name */
public static String BEAN_NAME = "org.jboss.soa.dsp:service=ServerConfig";
- public static ServerConfig getServerConfig()
+ public static ServerConfig createServerConfig()
{
return new KernelAwareSPIFactory().getKernelProvidedSPI(
BEAN_NAME, ServerConfig.class
);
}
+
+ public ServerConfig getServerConfig() {
+ return(createServerConfig());
+ }
}
\ No newline at end of file
Modified: dsp/trunk/samples/deployer/lib/dsp-api-1.0.0-SNAPSHOT.jar
===================================================================
(Binary files differ)
Modified: dsp/trunk/samples/deployer/lib/dsp-jboss-1.0.0-SNAPSHOT.jar
===================================================================
(Binary files differ)
Modified: dsp/trunk/samples/deployer/src/main/java/org/jboss/soa/dsp/example/DSPExampleForm.java
===================================================================
--- dsp/trunk/samples/deployer/src/main/java/org/jboss/soa/dsp/example/DSPExampleForm.java 2010-12-02 03:38:19 UTC (rev 1175)
+++ dsp/trunk/samples/deployer/src/main/java/org/jboss/soa/dsp/example/DSPExampleForm.java 2010-12-02 12:05:03 UTC (rev 1176)
@@ -1,19 +1,18 @@
/*
- * JBoss, Home of Professional Open Source
- * Copyright 2009, Red Hat Middleware LLC, and others contributors as indicated
- * by the @authors tag. All rights reserved.
- * See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A
- * 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,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
+ * Copyright 2010 Red Hat, Inc
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
*/
package org.jboss.soa.dsp.example;
Modified: dsp/trunk/samples/deployer/src/main/java/org/jboss/soa/dsp/example/DeployStore.java
===================================================================
--- dsp/trunk/samples/deployer/src/main/java/org/jboss/soa/dsp/example/DeployStore.java 2010-12-02 03:38:19 UTC (rev 1175)
+++ dsp/trunk/samples/deployer/src/main/java/org/jboss/soa/dsp/example/DeployStore.java 2010-12-02 12:05:03 UTC (rev 1176)
@@ -1,19 +1,18 @@
/*
- * JBoss, Home of Professional Open Source
- * Copyright 2009, Red Hat Middleware LLC, and others contributors as indicated
- * by the @authors tag. All rights reserved.
- * See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A
- * 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,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
+ * Copyright 2010 Red Hat, Inc
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
*/
package org.jboss.soa.dsp.example;
Modified: dsp/trunk/samples/deployer/src/main/java/org/jboss/soa/dsp/example/WSDeployer.java
===================================================================
--- dsp/trunk/samples/deployer/src/main/java/org/jboss/soa/dsp/example/WSDeployer.java 2010-12-02 03:38:19 UTC (rev 1175)
+++ dsp/trunk/samples/deployer/src/main/java/org/jboss/soa/dsp/example/WSDeployer.java 2010-12-02 12:05:03 UTC (rev 1176)
@@ -18,15 +18,16 @@
import java.io.File;
import java.net.URL;
+import java.util.ResourceBundle;
import java.util.UUID;
+import java.util.logging.Level;
import javax.xml.namespace.QName;
import org.jboss.soa.dsp.EndpointMetaData;
import org.jboss.soa.dsp.ServiceEndpointReference;
-import org.jboss.soa.dsp.deployer.jboss.JBossServiceDeployer;
+import org.jboss.soa.dsp.deployer.ServiceDeployer;
import org.jboss.soa.dsp.server.ServerConfig;
-import org.jboss.soa.dsp.server.jboss.ServerConfigFactory;
import org.jboss.soa.dsp.ws.BaseWebServiceEndpoint;
import org.jboss.soa.dsp.ws.DeploymentBuilder;
import org.jboss.soa.dsp.ws.WSDLParser;
@@ -35,6 +36,11 @@
public class WSDeployer {
+ private static java.util.logging.Logger _log=java.util.logging.Logger.getLogger(WSDeployer.class.getPackage().getName());
+
+ private static final String DSP_SERVER_CONFIG_LOCATOR = "dsp.server.config.locator";
+ private static final String DSP_SERVICE_DEPLOYER = "dsp.service.deployer";
+
public WSDeployer() {
}
@@ -58,11 +64,11 @@
javax.wsdl.Service service=(javax.wsdl.Service)wsdl.getServices().values().iterator().next();
- System.out.println("SERVICE="+service);
+ _log.info("SERVICE="+service);
javax.wsdl.Port port=(javax.wsdl.Port)service.getPorts().values().iterator().next();
- System.out.println("PORT="+port);
+ _log.info("PORT="+port);
EndpointMetaData metaData=new EndpointMetaData(service.getQName(),
port.getName(), new QName("http://www.example.org", "ProcessId"),
@@ -72,9 +78,9 @@
providerFactory.createProvider(metaData, wsdlRef, cl,
null, ExampleWebServiceFactory.class);
- System.out.println("PROVIDER="+providerImpl);
+ _log.info("PROVIDER="+providerImpl);
- ServerConfig serverConfig=ServerConfigFactory.getServerConfig();
+ ServerConfig serverConfig=getServerConfig();
File warArchive = new DeploymentBuilder(serverConfig)
.setEndpoint(metaData.getEndpointId())
@@ -82,26 +88,85 @@
.setProvider(providerImpl)
.build();
- System.out.println("War Archive="+warArchive);
+ _log.info("War Archive="+warArchive);
URL serviceUrl = new WSDLParser(wsdlRef.getDefinition()).getServiceLocationURL(metaData.getServiceName(),
metaData.getPortName());
- System.out.println("Service URL="+serviceUrl);
+ _log.info("Service URL="+serviceUrl);
- JBossServiceDeployer deployer=new JBossServiceDeployer();
+ ServiceDeployer deployer=getServiceDeployer();
ServiceEndpointReference ref=deployer.deploy(metaData, providerImpl.getClass(),
serviceUrl, cl, warArchive);
- System.out.println("DEPLOYED endpoint ref="+ref);
+ _log.info("DEPLOYED endpoint ref="+ref);
return(ref);
}
public void undeploy(ServiceEndpointReference ref) throws Exception {
- JBossServiceDeployer deployer=new JBossServiceDeployer();
+ ServiceDeployer deployer=getServiceDeployer();
deployer.undeploy(ref);
}
+
+ protected ServerConfig getServerConfig() {
+ ServerConfig ret=null;
+
+ // Get service config factory class from properties file
+ ResourceBundle res=ResourceBundle.getBundle("dsp");
+
+ if (res != null) {
+ String locator=res.getString(DSP_SERVER_CONFIG_LOCATOR);
+
+ if (locator != null) {
+ try {
+ Class<?> cls=Class.forName(locator);
+
+ org.jboss.soa.dsp.server.ServerConfigLocator scl=
+ (org.jboss.soa.dsp.server.ServerConfigLocator)cls.newInstance();
+
+ ret = scl.getServerConfig();
+
+ } catch(Exception e) {
+ _log.log(Level.SEVERE, "Failed to get server config from locator '"+locator+"'", e);
+ }
+ } else {
+ _log.severe("Failed to find server locator property '"+DSP_SERVER_CONFIG_LOCATOR+"'");
+ }
+ } else {
+ _log.severe("Unable to find dsp.properties");
+ }
+
+ return(ret);
+ }
+
+ protected ServiceDeployer getServiceDeployer() {
+ ServiceDeployer ret=null;
+
+ // Get service config factory class from properties file
+ ResourceBundle res=ResourceBundle.getBundle("dsp");
+
+ if (res != null) {
+ String deployer=res.getString(DSP_SERVICE_DEPLOYER);
+
+ if (deployer != null) {
+ try {
+ Class<?> cls=Class.forName(deployer);
+
+ ret = (ServiceDeployer)cls.newInstance();
+
+ } catch(Exception e) {
+ _log.log(Level.SEVERE, "Failed to get service deployer '"+deployer+"'", e);
+ }
+ } else {
+ _log.severe("Failed to find service deployer property '"+DSP_SERVICE_DEPLOYER+"'");
+ }
+ } else {
+ _log.severe("Unable to find dsp.properties");
+ }
+
+ return(ret);
+ }
}
Added: dsp/trunk/samples/deployer/src/main/webapp/WEB-INF/classes/dsp.properties
===================================================================
--- dsp/trunk/samples/deployer/src/main/webapp/WEB-INF/classes/dsp.properties (rev 0)
+++ dsp/trunk/samples/deployer/src/main/webapp/WEB-INF/classes/dsp.properties 2010-12-02 12:05:03 UTC (rev 1176)
@@ -0,0 +1,2 @@
+dsp.server.config.locator = org.jboss.soa.dsp.server.jboss.ServerConfigFactory
+dsp.service.deployer = org.jboss.soa.dsp.deployer.jboss.JBossServiceDeployer
\ No newline at end of file
14 years, 3 months
riftsaw SVN: r1175 - branches/RiftSaw-2.2.x/qa.
by riftsaw-commits@lists.jboss.org
Author: jeff.yuchang
Date: 2010-12-01 22:38:19 -0500 (Wed, 01 Dec 2010)
New Revision: 1175
Modified:
branches/RiftSaw-2.2.x/qa/hudson-riftsaw-jboss-no-esb.sh
branches/RiftSaw-2.2.x/qa/hudson-riftsaw-jboss.sh
branches/RiftSaw-2.2.x/qa/hudson-riftsaw-soa-p.sh
branches/RiftSaw-2.2.x/qa/hudson-riftsaw-ws.sh
Log:
* added download.dir variable into the command.
Modified: branches/RiftSaw-2.2.x/qa/hudson-riftsaw-jboss-no-esb.sh
===================================================================
--- branches/RiftSaw-2.2.x/qa/hudson-riftsaw-jboss-no-esb.sh 2010-12-01 14:14:35 UTC (rev 1174)
+++ branches/RiftSaw-2.2.x/qa/hudson-riftsaw-jboss-no-esb.sh 2010-12-02 03:38:19 UTC (rev 1175)
@@ -20,7 +20,7 @@
WS_VERSION="3.2.2.GA"
WS_STACK_DIR="$RIFTSAW_PARENT_DIR/downloads"
-ANT_PROPERTIES="-Driftsaw.parent.dir=$RIFTSAW_PARENT_DIR -Ddatabase=$DATABASE -Dreplace.qa.jdbc=$REPLACE_QA_JDBC -Dorg_jboss_as_home=$AS_HOME -Dorg_jboss_as_config=$AS_CONFIG -Dws.stack=$WS_STACK -Dws.version=$WS_VERSION -Dws.stack.dir=$WS_STACK_DIR -Dstartup.time=$STARTUP_TIME -Dtest.delay=$TEST_DELAY -Dtestesb=false"
+ANT_PROPERTIES="-Driftsaw.parent.dir=$RIFTSAW_PARENT_DIR -Ddatabase=$DATABASE -Dreplace.qa.jdbc=$REPLACE_QA_JDBC -Dorg_jboss_as_home=$AS_HOME -Dorg_jboss_as_config=$AS_CONFIG -Dws.stack=$WS_STACK -Dws.version=$WS_VERSION -Dws.stack.dir=$WS_STACK_DIR -Dstartup.time=$STARTUP_TIME -Ddownload.dir=$DOWNLOAD_DIR -Dtest.delay=$TEST_DELAY -Dtestesb=false"
echo ANT_PROPERTIES=${ANT_PROPERTIES}
# build RiftSaw and running unit test
Modified: branches/RiftSaw-2.2.x/qa/hudson-riftsaw-jboss.sh
===================================================================
--- branches/RiftSaw-2.2.x/qa/hudson-riftsaw-jboss.sh 2010-12-01 14:14:35 UTC (rev 1174)
+++ branches/RiftSaw-2.2.x/qa/hudson-riftsaw-jboss.sh 2010-12-02 03:38:19 UTC (rev 1175)
@@ -22,7 +22,7 @@
WS_VERSION="3.2.2.GA"
WS_STACK_DIR="$RIFTSAW_PARENT_DIR/downloads"
-ANT_PROPERTIES="-Driftsaw.parent.dir=$RIFTSAW_PARENT_DIR -Ddatabase=$DATABASE -Dreplace.qa.jdbc=$REPLACE_QA_JDBC -Dorg_jboss_as_home=$AS_HOME -Dorg_jboss_as_config=$AS_CONFIG -Djbossesb.version=$JBOSS_ESB_VERSION -Dws.stack=$WS_STACK -Dws.version=$WS_VERSION -Dws.stack.dir=$WS_STACK_DIR -Dorg_jboss_esb_home=$JBOSS_ESB_HOME -Dstartup.time=$STARTUP_TIME -Dstartup.time=$STARTUP_TIME -Dtest.delay=$TEST_DELAY"
+ANT_PROPERTIES="-Driftsaw.parent.dir=$RIFTSAW_PARENT_DIR -Ddatabase=$DATABASE -Dreplace.qa.jdbc=$REPLACE_QA_JDBC -Dorg_jboss_as_home=$AS_HOME -Dorg_jboss_as_config=$AS_CONFIG -Djbossesb.version=$JBOSS_ESB_VERSION -Dws.stack=$WS_STACK -Dws.version=$WS_VERSION -Dws.stack.dir=$WS_STACK_DIR -Dorg_jboss_esb_home=$JBOSS_ESB_HOME -Dstartup.time=$STARTUP_TIME -Ddownload.dir=$DOWNLOAD_DIR -Dtest.delay=$TEST_DELAY"
echo ANT_PROPERTIES=${ANT_PROPERTIES}
# build RiftSaw and running unit test
Modified: branches/RiftSaw-2.2.x/qa/hudson-riftsaw-soa-p.sh
===================================================================
--- branches/RiftSaw-2.2.x/qa/hudson-riftsaw-soa-p.sh 2010-12-01 14:14:35 UTC (rev 1174)
+++ branches/RiftSaw-2.2.x/qa/hudson-riftsaw-soa-p.sh 2010-12-02 03:38:19 UTC (rev 1175)
@@ -25,7 +25,7 @@
STARTUP_TIME="6"
TEST_DELAY="40000"
-ANT_PROPERTIES="-Driftsaw.parent.dir=$RIFTSAW_PARENT_DIR -Ddatabase=$DATABASE -Dreplace.qa.jdbc=$REPLACE_QA_JDBC -Dorg_jboss_as_home=$AS_HOME -Dorg_jboss_as_config=$AS_CONFIG -Djbossesb.version=$JBOSS_ESB_VERSION -Dorg_jboss_esb_home=$JBOSS_ESB_HOME -Dws.stack=$WS_STACK -Dws.version=$WS_VERSION -Dws.stack.dir=$WS_STACK_DIR -Dstartup.time=$STARTUP_TIME -Dstartup.time=$STARTUP_TIME -Dtest.delay=$TEST_DELAY"
+ANT_PROPERTIES="-Driftsaw.parent.dir=$RIFTSAW_PARENT_DIR -Ddatabase=$DATABASE -Dreplace.qa.jdbc=$REPLACE_QA_JDBC -Dorg_jboss_as_home=$AS_HOME -Dorg_jboss_as_config=$AS_CONFIG -Djbossesb.version=$JBOSS_ESB_VERSION -Dorg_jboss_esb_home=$JBOSS_ESB_HOME -Dws.stack=$WS_STACK -Dws.version=$WS_VERSION -Dws.stack.dir=$WS_STACK_DIR -Dstartup.time=$STARTUP_TIME -Ddownload.dir=$DOWNLOAD_DIR -Dtest.delay=$TEST_DELAY"
echo ANT_PROPERTIES=${ANT_PROPERTIES}
#build RiftSaw and running unit tests
Modified: branches/RiftSaw-2.2.x/qa/hudson-riftsaw-ws.sh
===================================================================
--- branches/RiftSaw-2.2.x/qa/hudson-riftsaw-ws.sh 2010-12-01 14:14:35 UTC (rev 1174)
+++ branches/RiftSaw-2.2.x/qa/hudson-riftsaw-ws.sh 2010-12-02 03:38:19 UTC (rev 1175)
@@ -23,7 +23,7 @@
STARTUP_TIME="6"
TEST_DELAY="40000"
-ANT_PROPERTIES="-Driftsaw.parent.dir=$RIFTSAW_PARENT_DIR -Ddatabase=$DATABASE -Dreplace.qa.jdbc=$REPLACE_QA_JDBC -Dorg_jboss_as_home=$AS_HOME -Dorg_jboss_as_config=$AS_CONFIG -Dws.stack=$WS_STACK -Dws.stack.dir=$WS_STACK_DIR -Dws.version=$WS_VERSION -Djbossesb.version=$JBOSS_ESB_VERSION -Dorg_jboss_esb_home=$JBOSS_ESB_HOME -Dstartup.time=$STARTUP_TIME -Dstartup.time=$STARTUP_TIME -Dtest.delay=$TEST_DELAY"
+ANT_PROPERTIES="-Driftsaw.parent.dir=$RIFTSAW_PARENT_DIR -Ddatabase=$DATABASE -Dreplace.qa.jdbc=$REPLACE_QA_JDBC -Dorg_jboss_as_home=$AS_HOME -Dorg_jboss_as_config=$AS_CONFIG -Dws.stack=$WS_STACK -Dws.stack.dir=$WS_STACK_DIR -Dws.version=$WS_VERSION -Djbossesb.version=$JBOSS_ESB_VERSION -Dorg_jboss_esb_home=$JBOSS_ESB_HOME -Dstartup.time=$STARTUP_TIME -Ddownload.dir=$DOWNLOAD_DIR -Dtest.delay=$TEST_DELAY"
echo ANT_PROPERTIES=${ANT_PROPERTIES}
#build RiftSaw and running unit test
14 years, 3 months
riftsaw SVN: r1174 - in dsp/trunk/samples/deployer/src/main: webapp and 1 other directories.
by riftsaw-commits@lists.jboss.org
Author: objectiser
Date: 2010-12-01 09:14:35 -0500 (Wed, 01 Dec 2010)
New Revision: 1174
Added:
dsp/trunk/samples/deployer/src/main/java/org/jboss/soa/dsp/example/DSPExampleForm.java
dsp/trunk/samples/deployer/src/main/java/org/jboss/soa/dsp/example/DeployStore.java
dsp/trunk/samples/deployer/src/main/java/org/jboss/soa/dsp/example/UndeployServlet.java
dsp/trunk/samples/deployer/src/main/java/org/jboss/soa/dsp/example/WelcomeServlet.java
Removed:
dsp/trunk/samples/deployer/src/main/webapp/upload.html
Modified:
dsp/trunk/samples/deployer/src/main/java/org/jboss/soa/dsp/example/DeployServlet.java
dsp/trunk/samples/deployer/src/main/webapp/WEB-INF/web.xml
Log:
Add undeploy support.
Added: dsp/trunk/samples/deployer/src/main/java/org/jboss/soa/dsp/example/DSPExampleForm.java
===================================================================
--- dsp/trunk/samples/deployer/src/main/java/org/jboss/soa/dsp/example/DSPExampleForm.java (rev 0)
+++ dsp/trunk/samples/deployer/src/main/java/org/jboss/soa/dsp/example/DSPExampleForm.java 2010-12-01 14:14:35 UTC (rev 1174)
@@ -0,0 +1,59 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * 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,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+package org.jboss.soa.dsp.example;
+
+import java.io.IOException;
+import java.io.PrintWriter;
+
+public class DSPExampleForm {
+
+ public static void buildForm(PrintWriter out) throws IOException {
+
+ out.println("<h2>Deploy Web Service</h2>");
+ out.println("<form action=\"DeployServlet\" enctype=\"multipart/form-data\" method=\"POST\">");
+ out.println("\t<input type=\"file\" name=\"file1\"><br>");
+ out.println("\t<input type=\"Submit\" value=\"Deploy\"><br>");
+ out.println("</form>");
+
+ java.util.Set<String> keys=DeployStore.keys();
+
+ if (keys.size() > 0) {
+
+ out.println("======================================================================<br>");
+ out.println("<h2>Undeploy Web Service</h2>");
+
+ out.println("<form action=\"UndeployServlet\" method=\"post\">");
+ out.println("<table>");
+ out.println("<tr>");
+
+ out.println("<select name=\"seref\">");
+
+ for (String key : keys) {
+ //out.println("<td><textarea rows=\"5\" cols=\"50\" name=\"seref\">"+key+"</textarea></td>");
+ out.println("<option value=\""+key+"\">"+key+"</option>");
+ }
+
+ out.println("</select>");
+
+ out.println("<td><input type=\"submit\" value=\"Undeploy\"></td>");
+ out.println("</tr>");
+ out.println("</table>");
+ out.println("</form>");
+ }
+ }
+}
Modified: dsp/trunk/samples/deployer/src/main/java/org/jboss/soa/dsp/example/DeployServlet.java
===================================================================
--- dsp/trunk/samples/deployer/src/main/java/org/jboss/soa/dsp/example/DeployServlet.java 2010-12-01 10:08:22 UTC (rev 1173)
+++ dsp/trunk/samples/deployer/src/main/java/org/jboss/soa/dsp/example/DeployServlet.java 2010-12-01 14:14:35 UTC (rev 1174)
@@ -62,7 +62,7 @@
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
PrintWriter out = response.getWriter();
response.setContentType("text/html");
- out.println("<h1>Dynamic Service Provider Example - Deployer</h1>");
+ out.println("<h1>Dynamic Service Provider Example</h1>");
out.println();
DiskFileItemFactory fileItemFactory = new DiskFileItemFactory ();
@@ -110,10 +110,13 @@
// Invoke dynamic service deployment mechanism
WSDeployer deployer=new WSDeployer();
- deployer.deploy(file, wsdlFile);
-
+ DeployStore.add(deployer.deploy(file, wsdlFile));
}
+
+ // Display undeployment options
+ DSPExampleForm.buildForm(out);
}
+
out.close();
}
}catch(FileUploadException ex) {
@@ -123,7 +126,7 @@
}
}
-
+
protected java.io.File unzip(PrintWriter out, ZipInputStream zis, String path) throws IOException {
ZipEntry ze=null;
java.io.File wsdlFile=null;
@@ -145,7 +148,7 @@
}
}
- out.println("Closing zip.<br>");
+ out.println("Zip unpacked.<br><br>");
zis.close();
return(wsdlFile);
Added: dsp/trunk/samples/deployer/src/main/java/org/jboss/soa/dsp/example/DeployStore.java
===================================================================
--- dsp/trunk/samples/deployer/src/main/java/org/jboss/soa/dsp/example/DeployStore.java (rev 0)
+++ dsp/trunk/samples/deployer/src/main/java/org/jboss/soa/dsp/example/DeployStore.java 2010-12-01 14:14:35 UTC (rev 1174)
@@ -0,0 +1,42 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * 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,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+package org.jboss.soa.dsp.example;
+
+import org.jboss.soa.dsp.ServiceEndpointReference;
+
+public class DeployStore {
+
+ private static java.util.Map<String,ServiceEndpointReference> m_serviceEndpointRefs=
+ new java.util.HashMap<String,ServiceEndpointReference>();
+
+ public static void add(ServiceEndpointReference ser) {
+ m_serviceEndpointRefs.put(ser.getDeploymentName(), ser);
+ }
+
+ public static void remove(ServiceEndpointReference ser) {
+ m_serviceEndpointRefs.remove(ser.getDeploymentName());
+ }
+
+ public static java.util.Set<String> keys() {
+ return(m_serviceEndpointRefs.keySet());
+ }
+
+ public static ServiceEndpointReference get(String key) {
+ return(m_serviceEndpointRefs.get(key));
+ }
+}
Added: dsp/trunk/samples/deployer/src/main/java/org/jboss/soa/dsp/example/UndeployServlet.java
===================================================================
--- dsp/trunk/samples/deployer/src/main/java/org/jboss/soa/dsp/example/UndeployServlet.java (rev 0)
+++ dsp/trunk/samples/deployer/src/main/java/org/jboss/soa/dsp/example/UndeployServlet.java 2010-12-01 14:14:35 UTC (rev 1174)
@@ -0,0 +1,62 @@
+/*
+ * Copyright 2010 Red Hat, Inc
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+package org.jboss.soa.dsp.example;
+
+import java.io.IOException;
+import java.io.PrintWriter;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.jboss.soa.dsp.ServiceEndpointReference;
+
+public class UndeployServlet extends HttpServlet {
+ private static final long serialVersionUID = 1L;
+
+ protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
+ PrintWriter out = response.getWriter();
+ response.setContentType("text/html");
+ out.println("<h1>Dynamic Service Provider Example</h1>");
+ out.println();
+
+ ServiceEndpointReference ser=DeployStore.get((String)request.getParameter("seref"));
+
+ if (ser == null) {
+ out.println("ERROR: Unable to find service endpoint reference with key '"+
+ request.getAttribute("seref")+"'<br>");
+ } else {
+ WSDeployer deployer=new WSDeployer();
+
+ try {
+ deployer.undeploy(ser);
+
+ DeployStore.remove(ser);
+
+ } catch(Exception e) {
+ out.println("ERROR: Unable to undeploy service endpoint reference with key '"+
+ request.getAttribute("seref")+"'<br>");
+ e.printStackTrace();
+ }
+ }
+
+ DSPExampleForm.buildForm(out);
+
+ out.close();
+ }
+}
\ No newline at end of file
Added: dsp/trunk/samples/deployer/src/main/java/org/jboss/soa/dsp/example/WelcomeServlet.java
===================================================================
--- dsp/trunk/samples/deployer/src/main/java/org/jboss/soa/dsp/example/WelcomeServlet.java (rev 0)
+++ dsp/trunk/samples/deployer/src/main/java/org/jboss/soa/dsp/example/WelcomeServlet.java 2010-12-01 14:14:35 UTC (rev 1174)
@@ -0,0 +1,40 @@
+/*
+ * Copyright 2010 Red Hat, Inc
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+package org.jboss.soa.dsp.example;
+
+import java.io.IOException;
+import java.io.PrintWriter;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+public class WelcomeServlet extends HttpServlet {
+ private static final long serialVersionUID = 1L;
+
+ protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
+ PrintWriter out = response.getWriter();
+ response.setContentType("text/html");
+ out.println("<h1>Dynamic Service Provider Example</h1>");
+ out.println();
+
+ DSPExampleForm.buildForm(out);
+
+ out.close();
+ }
+}
\ No newline at end of file
Modified: dsp/trunk/samples/deployer/src/main/webapp/WEB-INF/web.xml
===================================================================
--- dsp/trunk/samples/deployer/src/main/webapp/WEB-INF/web.xml 2010-12-01 10:08:22 UTC (rev 1173)
+++ dsp/trunk/samples/deployer/src/main/webapp/WEB-INF/web.xml 2010-12-01 14:14:35 UTC (rev 1174)
@@ -2,16 +2,36 @@
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5">
<display-name>DSPExample</display-name>
<welcome-file-list>
- <welcome-file>/upload.html</welcome-file>
+ <welcome-file>WelcomeServlet</welcome-file>
</welcome-file-list>
<servlet>
<description></description>
+ <display-name>WelcomeServlet</display-name>
+ <servlet-name>WelcomeServlet</servlet-name>
+ <servlet-class>org.jboss.soa.dsp.example.WelcomeServlet</servlet-class>
+ </servlet>
+ <servlet>
+ <description></description>
<display-name>DeployServlet</display-name>
<servlet-name>DeployServlet</servlet-name>
<servlet-class>org.jboss.soa.dsp.example.DeployServlet</servlet-class>
</servlet>
+ <servlet>
+ <description></description>
+ <display-name>UndeployServlet</display-name>
+ <servlet-name>UndeployServlet</servlet-name>
+ <servlet-class>org.jboss.soa.dsp.example.UndeployServlet</servlet-class>
+ </servlet>
<servlet-mapping>
+ <servlet-name>WelcomeServlet</servlet-name>
+ <url-pattern>/WelcomeServlet</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
<servlet-name>DeployServlet</servlet-name>
<url-pattern>/DeployServlet</url-pattern>
</servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>UndeployServlet</servlet-name>
+ <url-pattern>/UndeployServlet</url-pattern>
+ </servlet-mapping>
</web-app>
\ No newline at end of file
Deleted: dsp/trunk/samples/deployer/src/main/webapp/upload.html
===================================================================
--- dsp/trunk/samples/deployer/src/main/webapp/upload.html 2010-12-01 10:08:22 UTC (rev 1173)
+++ dsp/trunk/samples/deployer/src/main/webapp/upload.html 2010-12-01 14:14:35 UTC (rev 1174)
@@ -1,10 +0,0 @@
-<html>
- <head></head>
- <body>
- <p>Commons File Upload Example</p>
- <form action="DeployServlet" enctype="multipart/form-data" method="POST">
- <input type="file" name="file1"><br>
- <input type="Submit" value="Upload File"><br>
- </form>
- </body>
-</html>
\ No newline at end of file
14 years, 3 months
riftsaw SVN: r1173 - trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests.
by riftsaw-commits@lists.jboss.org
Author: jeff.yuchang
Date: 2010-12-01 05:08:22 -0500 (Wed, 01 Dec 2010)
New Revision: 1173
Modified:
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/RiftSawTest.java
Log:
* removed the unused methods in RiftSawTest
Modified: trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/RiftSawTest.java
===================================================================
--- trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/RiftSawTest.java 2010-12-01 09:51:27 UTC (rev 1172)
+++ trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/RiftSawTest.java 2010-12-01 10:08:22 UTC (rev 1173)
@@ -64,26 +64,6 @@
public MBeanServerConnection getServer() throws NamingException {
return RiftSawTestHelper.getServer();
}
-
- /** Deploy the given archive
- */
- public void deploy(String archive) throws Exception {
- delegate.deploy(getTestSuiteName(), archive);
- }
-
- /** Undeploy the given archive
- */
- public void undeploy(String archive) throws Exception {
- delegate.undeploy(getTestSuiteName(), archive);
- }
-
- public File getTestFile(String filename) {
- return delegate.getTestFile(getTestSuiteName(), filename);
- }
-
- public URL getTestFileURL(String filename) throws MalformedURLException {
- return delegate.getTestFileURL(getTestSuiteName(), filename);
- }
protected void assertMessageFromFile(String message, String mesgFile) throws Exception {
String mesgpath=System.getProperty("test.dir")+java.io.File.separator+getTestSuiteName()+
14 years, 3 months