riftsaw SVN: r1228 - in trunk: distribution/src/main/release/db/jboss and 4 other directories.
by riftsaw-commits@lists.jboss.org
Author: objectiser
Date: 2011-01-10 10:43:33 -0500 (Mon, 10 Jan 2011)
New Revision: 1228
Modified:
trunk/console/integration/src/main/java/org/jboss/soa/bpel/console/SVGPlugin.java
trunk/distribution/src/main/release/db/jboss/jboss-beans.xml
trunk/runtime/clustering/src/main/resources/META-INF/jboss-beans.xml
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/JAXWSBindingContext.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:
Update to refect changes in the DSP api.
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 2011-01-10 15:40:23 UTC (rev 1227)
+++ trunk/console/integration/src/main/java/org/jboss/soa/bpel/console/SVGPlugin.java 2011-01-10 15:43:33 UTC (rev 1228)
@@ -29,8 +29,8 @@
import org.jboss.soa.bpel.bpel2svg.BPEL2SVGUtil;
import org.jboss.soa.bpel.runtime.engine.BPELEngine;
import org.jboss.soa.bpel.runtime.engine.ode.BPELEngineImpl;
-import org.jboss.soa.dsp.server.ServerConfig;
-import org.jboss.soa.dsp.server.jboss.ServerConfigFactory;
+import org.jboss.soa.dsp.server.jboss.JBossServerConfig;
+import org.jboss.soa.dsp.server.jboss.JBossServerConfigFactory;
import org.wso2.carbon.bpel.ui.bpel2svg.ActivityInterface;
import org.wso2.carbon.bpel.ui.bpel2svg.SVGInterface;
@@ -69,7 +69,7 @@
public SVGPlugin() {
// host & port resolution
- ServerConfig serverConfig = ServerConfigFactory.createServerConfig();
+ JBossServerConfig serverConfig = JBossServerConfigFactory.createServerConfig();
this.webServiceHost = serverConfig.getWebServiceHost();
this.webServicePort = serverConfig.getWebServicePort();
Modified: trunk/distribution/src/main/release/db/jboss/jboss-beans.xml
===================================================================
--- trunk/distribution/src/main/release/db/jboss/jboss-beans.xml 2011-01-10 15:40:23 UTC (rev 1227)
+++ trunk/distribution/src/main/release/db/jboss/jboss-beans.xml 2011-01-10 15:43:33 UTC (rev 1228)
@@ -34,7 +34,7 @@
ServerConfig
-->
<bean name="org.jboss.soa.dsp:service=ServerConfig"
- class="org.jboss.soa.dsp.server.jboss.ServerConfigImpl">
+ class="org.jboss.soa.dsp.server.jboss.JBossServerConfigImpl">
<property name="mbeanServer"><inject bean="JMXKernel" property="mbeanServer"/></property>
<property name="webServiceHost">${jboss.bind.address}</property>
</bean>
Modified: trunk/runtime/clustering/src/main/resources/META-INF/jboss-beans.xml
===================================================================
--- trunk/runtime/clustering/src/main/resources/META-INF/jboss-beans.xml 2011-01-10 15:40:23 UTC (rev 1227)
+++ trunk/runtime/clustering/src/main/resources/META-INF/jboss-beans.xml 2011-01-10 15:43:33 UTC (rev 1228)
@@ -35,7 +35,7 @@
ServerConfig
-->
<bean name="org.jboss.soa.dsp:service=ServerConfig"
- class="org.jboss.soa.dsp.server.jboss.ServerConfigImpl">
+ class="org.jboss.soa.dsp.server.jboss.JBossServerConfigImpl">
<property name="mbeanServer"><inject bean="JMXKernel" property="mbeanServer"/></property>
<property name="webServiceHost">${jboss.bind.address}</property>
<property name="clusterNodeName"><inject bean="HAPartition" property="nodeName" /></property>
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 2011-01-10 15:40:23 UTC (rev 1227)
+++ trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/engine/ode/BPELEngineImpl.java 2011-01-10 15:43:33 UTC (rev 1228)
@@ -43,7 +43,7 @@
import org.jboss.soa.bpel.runtime.engine.BPELEngine;
import org.jboss.soa.bpel.runtime.ws.ODEMessageAdapter;
import org.jboss.soa.dsp.InvocationAdapter;
-import org.jboss.soa.dsp.server.jboss.ServerConfigFactory;
+import org.jboss.soa.dsp.server.jboss.JBossServerConfigFactory;
import org.w3c.dom.Element;
import javax.transaction.*;
@@ -485,7 +485,7 @@
protected Scheduler createScheduler() {
- String clusterNodeName=ServerConfigFactory.createServerConfig().getClusterNodeName();
+ String clusterNodeName=JBossServerConfigFactory.createServerConfig().getClusterNodeName();
__log.info("Scheduler node name: "+clusterNodeName);
Modified: trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/engine/ode/JAXWSBindingContext.java
===================================================================
--- trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/engine/ode/JAXWSBindingContext.java 2011-01-10 15:40:23 UTC (rev 1227)
+++ trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/engine/ode/JAXWSBindingContext.java 2011-01-10 15:43:33 UTC (rev 1228)
@@ -23,7 +23,7 @@
import org.jboss.soa.bpel.runtime.engine.PartnerChannel;
import org.jboss.soa.bpel.runtime.ws.*;
import org.jboss.soa.dsp.EndpointMetaData;
-import org.jboss.soa.dsp.server.jboss.ServerConfigFactory;
+import org.jboss.soa.dsp.server.jboss.JBossServerConfigFactory;
import org.jboss.soa.dsp.ws.WSDLReference;
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 2011-01-10 15:40:23 UTC (rev 1227)
+++ trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/EndpointManager.java 2011-01-10 15:43:33 UTC (rev 1228)
@@ -45,7 +45,7 @@
import org.jboss.soa.dsp.deployer.jboss.JBossServiceDeployer;
import org.jboss.soa.dsp.server.ServerConfig;
import org.jboss.soa.dsp.server.jboss.KernelLocator;
-import org.jboss.soa.dsp.server.jboss.ServerConfigFactory;
+import org.jboss.soa.dsp.server.jboss.JBossServerConfigFactory;
import org.jboss.soa.dsp.ws.BaseWebServiceEndpoint;
import org.jboss.soa.dsp.ws.DeploymentBuilder;
import org.jboss.soa.dsp.ws.WSDLParser;
@@ -92,7 +92,7 @@
public EndpointManager(ExecutionEnvironment executionEnvironment)
{
this.executionEnvironment = executionEnvironment;
- this.serverConfig = ServerConfigFactory.createServerConfig();
+ this.serverConfig = JBossServerConfigFactory.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 2011-01-10 15:40:23 UTC (rev 1227)
+++ trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/WebServiceClient.java 2011-01-10 15:43:33 UTC (rev 1228)
@@ -54,7 +54,8 @@
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.server.jboss.JBossServerConfig;
+import org.jboss.soa.dsp.server.jboss.JBossServerConfigFactory;
import org.jboss.soa.dsp.ws.DOMWriter;
import org.jboss.soa.dsp.ws.JavaUtils;
import org.jboss.soa.dsp.ws.SOAPMessageAdapter;
@@ -115,7 +116,7 @@
private synchronized void initialize() {
if (isUDDILookup()) {
try {
- ServerConfig serverConfig=ServerConfigFactory.createServerConfig();
+ JBossServerConfig serverConfig=JBossServerConfigFactory.createServerConfig();
String webServiceHost = serverConfig.getWebServiceHost();
int webServicePort = serverConfig.getWebServicePort();
URL url = new URL("http://" + webServiceHost + ":" + webServicePort);
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 2011-01-10 15:40:23 UTC (rev 1227)
+++ trunk/runtime/uddi/src/main/java/org/jboss/soa/bpel/uddi/UDDIRegistrationImpl.java 2011-01-10 15:43:33 UTC (rev 1228)
@@ -47,7 +47,8 @@
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.server.jboss.JBossServerConfig;
+import org.jboss.soa.dsp.server.jboss.JBossServerConfigFactory;
import org.jboss.soa.dsp.ws.WSDLReference;
import org.uddi.api_v3.AccessPoint;
import org.uddi.api_v3.BindingTemplate;
@@ -201,7 +202,7 @@
if (bpelClerk!=null) {
try {
Properties properties = bpelClerk.getUDDINode().getProperties();
- properties.put("nodeName", ServerConfigFactory.createServerConfig().getUddiNodeName());
+ properties.put("nodeName", JBossServerConfigFactory.createServerConfig().getUddiNodeName());
//Constructing the bindingKey
String bindingKey = TokenResolver.replaceTokens(DEFAULT_BINDING_KEY_FORMAT + bindingName, properties);
if (properties.containsKey(BINDING_KEY_FORMAT)) {
@@ -252,7 +253,7 @@
String serviceName, String portName, URL accessUrl)
throws DispositionReportFaultMessage, RemoteException, ConfigurationException, TransportException {
Properties properties = clerk.getUDDINode().getProperties();
- properties.put("nodeName", ServerConfigFactory.createServerConfig().getUddiNodeName());
+ properties.put("nodeName", JBossServerConfigFactory.createServerConfig().getUddiNodeName());
//Constructing the serviceKey
String serviceKey = TokenResolver.replaceTokens(DEFAULT_SERVICE_KEY_FORMAT + serviceName, properties);
@@ -522,7 +523,7 @@
private String getDefaultWebServiceBaseUrl() {
try {
- ServerConfig serverConfig=ServerConfigFactory.createServerConfig();
+ JBossServerConfig serverConfig=JBossServerConfigFactory.createServerConfig();
String webServiceHost = serverConfig.getWebServiceHost();
int webServicePort = serverConfig.getWebServicePort();
URL theURL = new URL("http://" + webServiceHost + ":" + webServicePort);
13 years, 4 months
riftsaw SVN: r1227 - in dsp/trunk: api/src/main/java/org/jboss/soa/dsp/server and 6 other directories.
by riftsaw-commits@lists.jboss.org
Author: objectiser
Date: 2011-01-10 10:40:23 -0500 (Mon, 10 Jan 2011)
New Revision: 1227
Added:
dsp/trunk/api/src/main/java/org/jboss/soa/dsp/server/ServerConfigFactory.java
dsp/trunk/jboss/src/main/java/org/jboss/soa/dsp/server/jboss/JBossServerConfig.java
dsp/trunk/jboss/src/main/java/org/jboss/soa/dsp/server/jboss/JBossServerConfigFactory.java
dsp/trunk/jboss/src/main/java/org/jboss/soa/dsp/server/jboss/JBossServerConfigImpl.java
dsp/trunk/tomcat/src/main/java/org/jboss/soa/dsp/server/tomcat/TomcatServerConfigFactory.java
Removed:
dsp/trunk/api/src/main/java/org/jboss/soa/dsp/server/ServerConfigLocator.java
dsp/trunk/api/src/main/java/org/jboss/soa/dwsp/
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/ServerConfigImpl.java
dsp/trunk/tomcat/src/main/java/org/jboss/soa/dsp/server/tomcat/TomcatServerConfigLocator.java
Modified:
dsp/trunk/api/src/main/java/org/jboss/soa/dsp/server/ServerConfig.java
dsp/trunk/jboss/src/main/resources/META-INF/jboss-beans.xml
dsp/trunk/samples/example-deployer/deployer/resources/WEB-INF/classes/dsp.properties
dsp/trunk/samples/example-deployer/deployer/src/org/jboss/soa/dsp/example/WSDeployer.java
dsp/trunk/tomcat/src/main/java/org/jboss/soa/dsp/deployer/tomcat/TomcatServiceDeployer.java
Log:
Refactored dsp to simplify the server config API and use consistent property/class naming across tomcat and jboss environments.
Modified: dsp/trunk/api/src/main/java/org/jboss/soa/dsp/server/ServerConfig.java
===================================================================
--- dsp/trunk/api/src/main/java/org/jboss/soa/dsp/server/ServerConfig.java 2011-01-10 01:13:01 UTC (rev 1226)
+++ dsp/trunk/api/src/main/java/org/jboss/soa/dsp/server/ServerConfig.java 2011-01-10 15:40:23 UTC (rev 1227)
@@ -19,29 +19,26 @@
import java.io.File;
/**
- * Interface to container independent config
+ * Interface to server independent config.
*
- * @author Thomas.Diesler(a)jboss.org
- * @since 08-May-2006
*/
-public interface ServerConfig
-{
- String getImplementationTitle();
+public interface ServerConfig {
+
+ /**
+ * This method returns the server's temp directory. This directory
+ * will be used to create the deployable archive before actual
+ * deployment.
+ *
+ * @return The temp directory
+ */
+ public File getServerTempDir();
- String getImplementationVersion();
-
- File getServerTempDir();
-
- File getServerDataDir();
-
- String getWebServiceHost();
-
- int getWebServicePort();
-
- int getWebServiceSecurePort();
-
- String getClusterNodeName();
-
- String getUddiNodeName();
-
+ /**
+ * This method returns the directory where the deployable archive
+ * should be placed.
+ *
+ * @return The deployment directory
+ */
+ public File getServerDeployDir();
+
}
\ No newline at end of file
Copied: dsp/trunk/api/src/main/java/org/jboss/soa/dsp/server/ServerConfigFactory.java (from rev 1176, dsp/trunk/api/src/main/java/org/jboss/soa/dsp/server/ServerConfigLocator.java)
===================================================================
--- dsp/trunk/api/src/main/java/org/jboss/soa/dsp/server/ServerConfigFactory.java (rev 0)
+++ dsp/trunk/api/src/main/java/org/jboss/soa/dsp/server/ServerConfigFactory.java 2011-01-10 15:40:23 UTC (rev 1227)
@@ -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 ServerConfigFactory {
+
+ /**
+ * This method returns an instance of the server configuration.
+ *
+ * @return The service configuration
+ */
+ public ServerConfig getServerConfig();
+
+}
\ No newline at end of file
Deleted: 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 2011-01-10 01:13:01 UTC (rev 1226)
+++ dsp/trunk/api/src/main/java/org/jboss/soa/dsp/server/ServerConfigLocator.java 2011-01-10 15:40:23 UTC (rev 1227)
@@ -1,34 +0,0 @@
-/*
- * 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
Added: dsp/trunk/jboss/src/main/java/org/jboss/soa/dsp/server/jboss/JBossServerConfig.java
===================================================================
--- dsp/trunk/jboss/src/main/java/org/jboss/soa/dsp/server/jboss/JBossServerConfig.java (rev 0)
+++ dsp/trunk/jboss/src/main/java/org/jboss/soa/dsp/server/jboss/JBossServerConfig.java 2011-01-10 15:40:23 UTC (rev 1227)
@@ -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.server.jboss;
+
+import java.io.File;
+
+import org.jboss.soa.dsp.server.ServerConfig;
+
+public interface JBossServerConfig extends ServerConfig {
+
+ String getImplementationTitle();
+
+ String getImplementationVersion();
+
+ File getServerDataDir();
+
+ String getWebServiceHost();
+
+ int getWebServicePort();
+
+ int getWebServiceSecurePort();
+
+ String getClusterNodeName();
+
+ String getUddiNodeName();
+
+}
Copied: dsp/trunk/jboss/src/main/java/org/jboss/soa/dsp/server/jboss/JBossServerConfigFactory.java (from rev 1176, 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/JBossServerConfigFactory.java (rev 0)
+++ dsp/trunk/jboss/src/main/java/org/jboss/soa/dsp/server/jboss/JBossServerConfigFactory.java 2011-01-10 15:40:23 UTC (rev 1227)
@@ -0,0 +1,45 @@
+/*
+ * 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.jboss;
+
+import org.jboss.soa.dsp.server.ServerConfig;
+
+
+/**
+ * Factory to container independent config
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @author Heiko.Braun(a)jboss.com
+ *
+ * @since 08-May-2006
+ */
+public class JBossServerConfigFactory implements org.jboss.soa.dsp.server.ServerConfigFactory
+{
+ /** The default bean name */
+ public static String BEAN_NAME = "org.jboss.soa.dsp:service=ServerConfig";
+
+ public static JBossServerConfig createServerConfig()
+ {
+ return new KernelAwareSPIFactory().getKernelProvidedSPI(
+ BEAN_NAME, JBossServerConfig.class
+ );
+ }
+
+ public ServerConfig getServerConfig() {
+ return(createServerConfig());
+ }
+}
\ No newline at end of file
Copied: dsp/trunk/jboss/src/main/java/org/jboss/soa/dsp/server/jboss/JBossServerConfigImpl.java (from rev 1151, dsp/trunk/jboss/src/main/java/org/jboss/soa/dsp/server/jboss/ServerConfigImpl.java)
===================================================================
--- dsp/trunk/jboss/src/main/java/org/jboss/soa/dsp/server/jboss/JBossServerConfigImpl.java (rev 0)
+++ dsp/trunk/jboss/src/main/java/org/jboss/soa/dsp/server/jboss/JBossServerConfigImpl.java 2011-01-10 15:40:23 UTC (rev 1227)
@@ -0,0 +1,251 @@
+/*
+ * 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.jboss;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.jboss.soa.dsp.server.ServerConfig;
+import org.jboss.util.id.GUID;
+
+import javax.management.AttributeNotFoundException;
+import javax.management.JMException;
+import javax.management.MBeanServer;
+import javax.management.ObjectName;
+import java.io.File;
+import java.net.InetAddress;
+import java.net.UnknownHostException;
+import java.util.Set;
+
+/**
+ * @author Heiko.Braun <heiko.braun(a)jboss.com>
+ */
+public class JBossServerConfigImpl implements JBossServerConfig
+{
+ protected final Log log = LogFactory.getLog(getClass());
+
+ // The MBeanServer
+ private MBeanServer mbeanServer;
+
+ private final static String UNDEFINED_HOSTNAME = "undefined.host";
+
+ // The webservice host name that will be used when updating the wsdl
+ private String webServiceHost = UNDEFINED_HOSTNAME;
+ // The webservice port that will be used when updating the wsdl
+ private int webServicePort;
+ // The webservice port that will be used when updating the wsdl
+ private int webServiceSecurePort;
+
+ private static String nonClusteredServerName=new GUID().toString();
+
+ private String clusterNodeName;
+
+ public JBossServerConfigImpl()
+ {
+ }
+
+ public MBeanServer getMbeanServer()
+ {
+ return mbeanServer;
+ }
+
+ public void setMbeanServer(MBeanServer mbeanServer)
+ {
+ this.mbeanServer = mbeanServer;
+ }
+
+ public String getImplementationTitle()
+ {
+ return "jbossas-riftsaw";
+ }
+
+ public String getImplementationVersion()
+ {
+ return "5.x";
+ }
+
+ public File getServerTempDir()
+ {
+ try
+ {
+ ObjectName oname = ObjectNameFactory.create("jboss.system:type=ServerConfig");
+ File dir = (File)getMbeanServer().getAttribute(oname, "ServerTempDir");
+ return dir;
+ }
+ catch (JMException e)
+ {
+ return null;
+ }
+ }
+
+ public File getHomeDir()
+ {
+ try
+ {
+ ObjectName oname = ObjectNameFactory.create("jboss.system:type=ServerConfig");
+ File dir = (File)getMbeanServer().getAttribute(oname, "HomeDir");
+ return dir;
+ }
+ catch (JMException e)
+ {
+ return null;
+ }
+ }
+
+ public File getServerDataDir()
+ {
+ try
+ {
+ ObjectName oname = ObjectNameFactory.create("jboss.system:type=ServerConfig");
+ File dir = (File)getMbeanServer().getAttribute(oname, "ServerDataDir");
+ return dir;
+ }
+ catch (JMException e)
+ {
+ return null;
+ }
+ }
+
+ public File getServerDeployDir() {
+ return(getServerDataDir());
+ }
+
+ public String getWebServiceHost()
+ {
+ return webServiceHost;
+ }
+
+ public void setWebServiceHost(String host) throws UnknownHostException
+ {
+ if (host == null || host.trim().length() == 0)
+ {
+ log.debug("Using undefined host: " + UNDEFINED_HOSTNAME);
+ host = UNDEFINED_HOSTNAME;
+ }
+ if ("0.0.0.0".equals(host))
+ {
+ InetAddress localHost = InetAddress.getLocalHost();
+ log.debug("Using local host: " + localHost.getHostName());
+ host = localHost.getHostName();
+ }
+ this.webServiceHost = host;
+ }
+
+ public void setWebServicePort(int port)
+ {
+ this.webServicePort = port;
+ }
+
+ public void setWebServiceSecurePort(int port)
+ {
+ this.webServiceSecurePort = port;
+ }
+
+ public int getWebServicePort()
+ {
+ if (webServicePort <= 0)
+ webServicePort = getConnectorPort("HTTP/1.1", false);
+
+ int localPort = webServicePort;
+ if (localPort <= 0)
+ {
+ // Do not initialize webServicePort with the default, the connector port may become available later
+ log.warn("Unable to calculate 'WebServicePort', using default '8080'");
+ localPort = 8080;
+ }
+
+ return localPort;
+ }
+
+
+ public int getWebServiceSecurePort()
+ {
+ if (webServiceSecurePort <= 0)
+ webServiceSecurePort = getConnectorPort("HTTP/1.1", true);
+
+ int localPort = webServiceSecurePort;
+ if (localPort <= 0)
+ {
+ // Do not initialize webServiceSecurePort with the default, the connector port may become available later
+ log.warn("Unable to calculate 'WebServiceSecurePort', using default '8443'");
+ localPort = 8443;
+ }
+
+ return localPort;
+ }
+
+ private int getConnectorPort(final String protocol, final boolean secure)
+ {
+ int port = -1;
+
+ try
+ {
+ ObjectName connectors = new ObjectName("jboss.web:type=Connector,*");
+
+ Set connectorNames = getMbeanServer().queryNames(connectors, null);
+ for (Object current : connectorNames)
+ {
+ ObjectName currentName = (ObjectName)current;
+
+ try
+ {
+ int connectorPort = (Integer)getMbeanServer().getAttribute(currentName, "port");
+ boolean connectorSecure = (Boolean)getMbeanServer().getAttribute(currentName, "secure");
+ String connectorProtocol = (String)getMbeanServer().getAttribute(currentName, "protocol");
+
+
+ if (protocol.equals(connectorProtocol) && secure == connectorSecure)
+ {
+ if (port > -1)
+ {
+ log.warn("Found multiple connectors for protocol='" + protocol + "' and secure='" + secure + "', using first port found '" + port + "'");
+ }
+ else
+ {
+ port = connectorPort;
+ }
+ }
+ }
+ catch (AttributeNotFoundException ignored)
+ {
+ }
+ }
+
+ return port;
+ }
+ catch (JMException e)
+ {
+ return -1;
+ }
+ }
+
+ public String getClusterNodeName() {
+ if (this.clusterNodeName == null || "".equals(this.clusterNodeName.trim())) {
+ return nonClusteredServerName;
+ }
+ return this.clusterNodeName;
+ }
+
+ public void setClusterNodeName(String clusterNodeName) {
+ this.clusterNodeName = clusterNodeName;
+ }
+
+
+ public String getUddiNodeName() {
+ return this.getWebServiceHost() + "-" + this.getWebServicePort();
+ }
+
+}
Deleted: 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 2011-01-10 01:13:01 UTC (rev 1226)
+++ dsp/trunk/jboss/src/main/java/org/jboss/soa/dsp/server/jboss/ServerConfigFactory.java 2011-01-10 15:40:23 UTC (rev 1227)
@@ -1,45 +0,0 @@
-/*
- * 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.jboss;
-
-import org.jboss.soa.dsp.server.ServerConfig;
-
-
-/**
- * Factory to container independent config
- *
- * @author Thomas.Diesler(a)jboss.org
- * @author Heiko.Braun(a)jboss.com
- *
- * @since 08-May-2006
- */
-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 createServerConfig()
- {
- return new KernelAwareSPIFactory().getKernelProvidedSPI(
- BEAN_NAME, ServerConfig.class
- );
- }
-
- public ServerConfig getServerConfig() {
- return(createServerConfig());
- }
-}
\ No newline at end of file
Deleted: dsp/trunk/jboss/src/main/java/org/jboss/soa/dsp/server/jboss/ServerConfigImpl.java
===================================================================
--- dsp/trunk/jboss/src/main/java/org/jboss/soa/dsp/server/jboss/ServerConfigImpl.java 2011-01-10 01:13:01 UTC (rev 1226)
+++ dsp/trunk/jboss/src/main/java/org/jboss/soa/dsp/server/jboss/ServerConfigImpl.java 2011-01-10 15:40:23 UTC (rev 1227)
@@ -1,247 +0,0 @@
-/*
- * 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.jboss;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.jboss.soa.dsp.server.ServerConfig;
-import org.jboss.util.id.GUID;
-
-import javax.management.AttributeNotFoundException;
-import javax.management.JMException;
-import javax.management.MBeanServer;
-import javax.management.ObjectName;
-import java.io.File;
-import java.net.InetAddress;
-import java.net.UnknownHostException;
-import java.util.Set;
-
-/**
- * @author Heiko.Braun <heiko.braun(a)jboss.com>
- */
-public class ServerConfigImpl implements ServerConfig
-{
- protected final Log log = LogFactory.getLog(getClass());
-
- // The MBeanServer
- private MBeanServer mbeanServer;
-
- private final static String UNDEFINED_HOSTNAME = "undefined.host";
-
- // The webservice host name that will be used when updating the wsdl
- private String webServiceHost = UNDEFINED_HOSTNAME;
- // The webservice port that will be used when updating the wsdl
- private int webServicePort;
- // The webservice port that will be used when updating the wsdl
- private int webServiceSecurePort;
-
- private static String nonClusteredServerName=new GUID().toString();
-
- private String clusterNodeName;
-
- public ServerConfigImpl()
- {
- }
-
- public MBeanServer getMbeanServer()
- {
- return mbeanServer;
- }
-
- public void setMbeanServer(MBeanServer mbeanServer)
- {
- this.mbeanServer = mbeanServer;
- }
-
- public String getImplementationTitle()
- {
- return "jbossas-riftsaw";
- }
-
- public String getImplementationVersion()
- {
- return "5.x";
- }
-
- public File getServerTempDir()
- {
- try
- {
- ObjectName oname = ObjectNameFactory.create("jboss.system:type=ServerConfig");
- File dir = (File)getMbeanServer().getAttribute(oname, "ServerTempDir");
- return dir;
- }
- catch (JMException e)
- {
- return null;
- }
- }
-
- public File getHomeDir()
- {
- try
- {
- ObjectName oname = ObjectNameFactory.create("jboss.system:type=ServerConfig");
- File dir = (File)getMbeanServer().getAttribute(oname, "HomeDir");
- return dir;
- }
- catch (JMException e)
- {
- return null;
- }
- }
-
- public File getServerDataDir()
- {
- try
- {
- ObjectName oname = ObjectNameFactory.create("jboss.system:type=ServerConfig");
- File dir = (File)getMbeanServer().getAttribute(oname, "ServerDataDir");
- return dir;
- }
- catch (JMException e)
- {
- return null;
- }
- }
-
- public String getWebServiceHost()
- {
- return webServiceHost;
- }
-
- public void setWebServiceHost(String host) throws UnknownHostException
- {
- if (host == null || host.trim().length() == 0)
- {
- log.debug("Using undefined host: " + UNDEFINED_HOSTNAME);
- host = UNDEFINED_HOSTNAME;
- }
- if ("0.0.0.0".equals(host))
- {
- InetAddress localHost = InetAddress.getLocalHost();
- log.debug("Using local host: " + localHost.getHostName());
- host = localHost.getHostName();
- }
- this.webServiceHost = host;
- }
-
- public void setWebServicePort(int port)
- {
- this.webServicePort = port;
- }
-
- public void setWebServiceSecurePort(int port)
- {
- this.webServiceSecurePort = port;
- }
-
- public int getWebServicePort()
- {
- if (webServicePort <= 0)
- webServicePort = getConnectorPort("HTTP/1.1", false);
-
- int localPort = webServicePort;
- if (localPort <= 0)
- {
- // Do not initialize webServicePort with the default, the connector port may become available later
- log.warn("Unable to calculate 'WebServicePort', using default '8080'");
- localPort = 8080;
- }
-
- return localPort;
- }
-
-
- public int getWebServiceSecurePort()
- {
- if (webServiceSecurePort <= 0)
- webServiceSecurePort = getConnectorPort("HTTP/1.1", true);
-
- int localPort = webServiceSecurePort;
- if (localPort <= 0)
- {
- // Do not initialize webServiceSecurePort with the default, the connector port may become available later
- log.warn("Unable to calculate 'WebServiceSecurePort', using default '8443'");
- localPort = 8443;
- }
-
- return localPort;
- }
-
- private int getConnectorPort(final String protocol, final boolean secure)
- {
- int port = -1;
-
- try
- {
- ObjectName connectors = new ObjectName("jboss.web:type=Connector,*");
-
- Set connectorNames = getMbeanServer().queryNames(connectors, null);
- for (Object current : connectorNames)
- {
- ObjectName currentName = (ObjectName)current;
-
- try
- {
- int connectorPort = (Integer)getMbeanServer().getAttribute(currentName, "port");
- boolean connectorSecure = (Boolean)getMbeanServer().getAttribute(currentName, "secure");
- String connectorProtocol = (String)getMbeanServer().getAttribute(currentName, "protocol");
-
-
- if (protocol.equals(connectorProtocol) && secure == connectorSecure)
- {
- if (port > -1)
- {
- log.warn("Found multiple connectors for protocol='" + protocol + "' and secure='" + secure + "', using first port found '" + port + "'");
- }
- else
- {
- port = connectorPort;
- }
- }
- }
- catch (AttributeNotFoundException ignored)
- {
- }
- }
-
- return port;
- }
- catch (JMException e)
- {
- return -1;
- }
- }
-
- public String getClusterNodeName() {
- if (this.clusterNodeName == null || "".equals(this.clusterNodeName.trim())) {
- return nonClusteredServerName;
- }
- return this.clusterNodeName;
- }
-
- public void setClusterNodeName(String clusterNodeName) {
- this.clusterNodeName = clusterNodeName;
- }
-
-
- public String getUddiNodeName() {
- return this.getWebServiceHost() + "-" + this.getWebServicePort();
- }
-
-}
Modified: dsp/trunk/jboss/src/main/resources/META-INF/jboss-beans.xml
===================================================================
--- dsp/trunk/jboss/src/main/resources/META-INF/jboss-beans.xml 2011-01-10 01:13:01 UTC (rev 1226)
+++ dsp/trunk/jboss/src/main/resources/META-INF/jboss-beans.xml 2011-01-10 15:40:23 UTC (rev 1227)
@@ -15,7 +15,7 @@
ServerConfig
-->
<bean name="org.jboss.soa.dsp:service=ServerConfig"
- class="org.jboss.soa.dsp.server.jboss.ServerConfigImpl">
+ class="org.jboss.soa.dsp.server.jboss.JBossServerConfigImpl">
<property name="mbeanServer"><inject bean="JMXKernel" property="mbeanServer"/></property>
<property name="webServiceHost">${jboss.bind.address}</property>
</bean>
Modified: dsp/trunk/samples/example-deployer/deployer/resources/WEB-INF/classes/dsp.properties
===================================================================
--- dsp/trunk/samples/example-deployer/deployer/resources/WEB-INF/classes/dsp.properties 2011-01-10 01:13:01 UTC (rev 1226)
+++ dsp/trunk/samples/example-deployer/deployer/resources/WEB-INF/classes/dsp.properties 2011-01-10 15:40:23 UTC (rev 1227)
@@ -1,8 +1,8 @@
# JBOSS APPLICATION SERVER
-dsp.server.config.locator = org.jboss.soa.dsp.server.jboss.ServerConfigFactory
+dsp.server.config.factory = org.jboss.soa.dsp.server.jboss.JBossServerConfigFactory
dsp.service.deployer = org.jboss.soa.dsp.deployer.jboss.JBossServiceDeployer
# APACHE TOMCAT
-#dsp.server.config.locator = org.jboss.soa.dsp.server.tomcat.TomcatServerConfigLocator
+#dsp.server.config.factory = org.jboss.soa.dsp.server.tomcat.TomcatServerConfigFactory
#dsp.service.deployer = org.jboss.soa.dsp.deployer.tomcat.TomcatServiceDeployer
Modified: dsp/trunk/samples/example-deployer/deployer/src/org/jboss/soa/dsp/example/WSDeployer.java
===================================================================
--- dsp/trunk/samples/example-deployer/deployer/src/org/jboss/soa/dsp/example/WSDeployer.java 2011-01-10 01:13:01 UTC (rev 1226)
+++ dsp/trunk/samples/example-deployer/deployer/src/org/jboss/soa/dsp/example/WSDeployer.java 2011-01-10 15:40:23 UTC (rev 1227)
@@ -39,7 +39,7 @@
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_SERVER_CONFIG_FACTORY = "dsp.server.config.factory";
private static final String DSP_SERVICE_DEPLOYER = "dsp.service.deployer";
public WSDeployer() {
@@ -130,22 +130,22 @@
ResourceBundle res=ResourceBundle.getBundle("dsp");
if (res != null) {
- String locator=res.getString(DSP_SERVER_CONFIG_LOCATOR);
+ String factory=res.getString(DSP_SERVER_CONFIG_FACTORY);
- if (locator != null) {
+ if (factory != null) {
try {
- Class<?> cls=Class.forName(locator);
+ Class<?> cls=Class.forName(factory);
- org.jboss.soa.dsp.server.ServerConfigLocator scl=
- (org.jboss.soa.dsp.server.ServerConfigLocator)cls.newInstance();
+ org.jboss.soa.dsp.server.ServerConfigFactory scf=
+ (org.jboss.soa.dsp.server.ServerConfigFactory)cls.newInstance();
- ret = scl.getServerConfig();
+ ret = scf.getServerConfig();
} catch(Exception e) {
- _log.log(Level.SEVERE, "Failed to get server config from locator '"+locator+"'", e);
+ _log.log(Level.SEVERE, "Failed to get server config from factory '"+factory+"'", e);
}
} else {
- _log.severe("Failed to find server locator property '"+DSP_SERVER_CONFIG_LOCATOR+"'");
+ _log.severe("Failed to find server config factory property '"+DSP_SERVER_CONFIG_FACTORY+"'");
}
} else {
_log.severe("Unable to find dsp.properties");
Modified: dsp/trunk/tomcat/src/main/java/org/jboss/soa/dsp/deployer/tomcat/TomcatServiceDeployer.java
===================================================================
--- dsp/trunk/tomcat/src/main/java/org/jboss/soa/dsp/deployer/tomcat/TomcatServiceDeployer.java 2011-01-10 01:13:01 UTC (rev 1226)
+++ dsp/trunk/tomcat/src/main/java/org/jboss/soa/dsp/deployer/tomcat/TomcatServiceDeployer.java 2011-01-10 15:40:23 UTC (rev 1227)
@@ -69,7 +69,7 @@
context = context.substring(0, ind);
}
- File deployDir=new File(serverConfig.getServerDataDir(), context);
+ File deployDir=new File(serverConfig.getServerDeployDir(), context);
return(deployDir);
}
Added: dsp/trunk/tomcat/src/main/java/org/jboss/soa/dsp/server/tomcat/TomcatServerConfigFactory.java
===================================================================
--- dsp/trunk/tomcat/src/main/java/org/jboss/soa/dsp/server/tomcat/TomcatServerConfigFactory.java (rev 0)
+++ dsp/trunk/tomcat/src/main/java/org/jboss/soa/dsp/server/tomcat/TomcatServerConfigFactory.java 2011-01-10 15:40:23 UTC (rev 1227)
@@ -0,0 +1,58 @@
+/*
+ * 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.tomcat;
+
+import java.io.File;
+
+import org.jboss.soa.dsp.server.ServerConfig;
+
+public class TomcatServerConfigFactory implements org.jboss.soa.dsp.server.ServerConfigFactory {
+
+ public ServerConfig getServerConfig() {
+ ServerConfig ret=new ServerConfig() {
+
+ protected File getTomcatRoot() {
+ String path=System.getenv("CATALINA_HOME");
+
+ if (path == null) {
+ return(null);
+ }
+
+ return(new File(path));
+ }
+
+ public File getServerTempDir() {
+ File tomcat=getTomcatRoot();
+ if (tomcat == null) {
+ return(null);
+ }
+ return(new java.io.File(tomcat, "temp"));
+ }
+
+ public File getServerDeployDir() {
+ File tomcat=getTomcatRoot();
+ if (tomcat == null) {
+ return(null);
+ }
+ return(new java.io.File(tomcat, "webapps"));
+ }
+ };
+
+ return(ret);
+ }
+
+}
Deleted: dsp/trunk/tomcat/src/main/java/org/jboss/soa/dsp/server/tomcat/TomcatServerConfigLocator.java
===================================================================
--- dsp/trunk/tomcat/src/main/java/org/jboss/soa/dsp/server/tomcat/TomcatServerConfigLocator.java 2011-01-10 01:13:01 UTC (rev 1226)
+++ dsp/trunk/tomcat/src/main/java/org/jboss/soa/dsp/server/tomcat/TomcatServerConfigLocator.java 2011-01-10 15:40:23 UTC (rev 1227)
@@ -1,96 +0,0 @@
-/*
- * 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.tomcat;
-
-import java.io.File;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.jboss.soa.dsp.server.ServerConfig;
-import org.jboss.soa.dsp.server.ServerConfigLocator;
-
-public class TomcatServerConfigLocator implements ServerConfigLocator {
-
- private static final Log log = LogFactory.getLog(TomcatServerConfigLocator.class);
-
- public ServerConfig getServerConfig() {
- ServerConfig ret=new ServerConfig() {
-
- public String getImplementationTitle() {
- // TODO Auto-generated method stub
- return null;
- }
-
- public String getImplementationVersion() {
- return("1.0");
- }
-
- protected File getTomcatRoot() {
- String path=System.getenv("CATALINA_HOME");
-
- if (path == null) {
- return(null);
- }
-
- return(new File(path));
- }
-
- public File getServerTempDir() {
- File tomcat=getTomcatRoot();
- if (tomcat == null) {
- return(null);
- }
- return(new java.io.File(tomcat, "temp"));
- }
-
- public File getServerDataDir() {
- File tomcat=getTomcatRoot();
- if (tomcat == null) {
- return(null);
- }
- return(new java.io.File(tomcat, "webapps"));
- }
-
- public String getWebServiceHost() {
- return("http://localhost");
- }
-
- public int getWebServicePort() {
- return 8080;
- }
-
- public int getWebServiceSecurePort() {
- // TODO Auto-generated method stub
- return 0;
- }
-
- public String getClusterNodeName() {
- // TODO Auto-generated method stub
- return null;
- }
-
- public String getUddiNodeName() {
- // TODO Auto-generated method stub
- return null;
- }
-
- };
-
- return(ret);
- }
-
-}
13 years, 4 months
riftsaw SVN: r1226 - branches/ODE/RiftSaw-ODE-trunk/scheduler-simple/src/main/java/org/apache/ode/scheduler/simple/jdbc.
by riftsaw-commits@lists.jboss.org
Author: jeff.yuchang
Date: 2011-01-09 20:13:01 -0500 (Sun, 09 Jan 2011)
New Revision: 1226
Modified:
branches/ODE/RiftSaw-ODE-trunk/scheduler-simple/src/main/java/org/apache/ode/scheduler/simple/jdbc/SchedulerDAOConnectionImpl.java
Log:
*RIFTSAW-306, added ASE support for scheduler simple module.
Modified: branches/ODE/RiftSaw-ODE-trunk/scheduler-simple/src/main/java/org/apache/ode/scheduler/simple/jdbc/SchedulerDAOConnectionImpl.java
===================================================================
--- branches/ODE/RiftSaw-ODE-trunk/scheduler-simple/src/main/java/org/apache/ode/scheduler/simple/jdbc/SchedulerDAOConnectionImpl.java 2011-01-10 01:10:58 UTC (rev 1225)
+++ branches/ODE/RiftSaw-ODE-trunk/scheduler-simple/src/main/java/org/apache/ode/scheduler/simple/jdbc/SchedulerDAOConnectionImpl.java 2011-01-10 01:13:01 UTC (rev 1226)
@@ -472,9 +472,9 @@
d = Dialect.SQLSERVER;
} else if (dbProductName.indexOf("MySQL") >= 0) {
d = Dialect.MYSQL;
- } else if (dbProductName.indexOf("Sybase") >= 0 || dbProductName.indexOf("Adaptive") >= 0) {
+ } else if (dbProductName.indexOf("Sybase") >= 0 || dbProductName.indexOf("ASE") >= 0 || dbProductName.indexOf("Adaptive") >= 0) {
d = Dialect.SYBASE;
- if( dbMajorVer == 12 ) {
+ if( dbMajorVer >= 12 ) {
d = Dialect.SYBASE12;
}
}
13 years, 4 months
riftsaw SVN: r1225 - branches/RiftSaw-ODE-2.2.x/scheduler-simple/src/main/java/org/apache/ode/scheduler/simple/jdbc.
by riftsaw-commits@lists.jboss.org
Author: jeff.yuchang
Date: 2011-01-09 20:10:58 -0500 (Sun, 09 Jan 2011)
New Revision: 1225
Modified:
branches/RiftSaw-ODE-2.2.x/scheduler-simple/src/main/java/org/apache/ode/scheduler/simple/jdbc/SchedulerDAOConnectionImpl.java
Log:
*RIFTSAW-306, added support for ASE.
Modified: branches/RiftSaw-ODE-2.2.x/scheduler-simple/src/main/java/org/apache/ode/scheduler/simple/jdbc/SchedulerDAOConnectionImpl.java
===================================================================
--- branches/RiftSaw-ODE-2.2.x/scheduler-simple/src/main/java/org/apache/ode/scheduler/simple/jdbc/SchedulerDAOConnectionImpl.java 2011-01-10 00:44:14 UTC (rev 1224)
+++ branches/RiftSaw-ODE-2.2.x/scheduler-simple/src/main/java/org/apache/ode/scheduler/simple/jdbc/SchedulerDAOConnectionImpl.java 2011-01-10 01:10:58 UTC (rev 1225)
@@ -472,9 +472,9 @@
d = Dialect.SQLSERVER;
} else if (dbProductName.indexOf("MySQL") >= 0) {
d = Dialect.MYSQL;
- } else if (dbProductName.indexOf("Sybase") >= 0 || dbProductName.indexOf("Adaptive") >= 0) {
+ } else if (dbProductName.indexOf("Sybase") >= 0 || dbProductName.indexOf("ASE") >= 0 || dbProductName.indexOf("Adaptive") >= 0) {
d = Dialect.SYBASE;
- if( dbMajorVer == 12 ) {
+ if( dbMajorVer >= 12 ) {
d = Dialect.SYBASE12;
}
}
13 years, 4 months
Build failed in Hudson: RiftSaw-ODE-2.1.x #43
by jboss-qa-internal@redhat.com
See <http://hudson.qa.jboss.com/hudson/job/RiftSaw-ODE-2.1.x/43/changes>
Changes:
[jeff.yuchang] *RIFTSAW-306, added ASE 15 support for simple scheduler module.
------------------------------------------
[...truncated 3595 lines...]
AU axis2-war/src/main/webapp/images/addGadgetIcon.gif
AU axis2-war/src/main/webapp/images/closeIcon.gif
AU axis2-war/src/main/webapp/images/logo.png
AU axis2-war/src/main/webapp/images/wrapper_back.png
AU axis2-war/src/main/webapp/images/pagenav_back.png
AU axis2-war/src/main/webapp/images/dguide.png
AU axis2-war/src/main/webapp/images/arrowsUp.gif
AU axis2-war/src/main/webapp/images/site_nav_hover_bg.gif
AU axis2-war/src/main/webapp/images/window_bottom_start.jpg
AU axis2-war/src/main/webapp/images/window_bottom_start.png
AU axis2-war/src/main/webapp/images/site_nav_borders.gif
AU axis2-war/src/main/webapp/images/window_bottom_end.jpg
AU axis2-war/src/main/webapp/images/buttonBack.gif
AU axis2-war/src/main/webapp/images/bottom_m.png
AU axis2-war/src/main/webapp/images/window_bottom_end.png
AU axis2-war/src/main/webapp/images/bg_button_span.gif
AU axis2-war/src/main/webapp/images/arrowsDown.gif
AU axis2-war/src/main/webapp/images/bullet1.gif
AU axis2-war/src/main/webapp/images/settingsIcon.gif
AU axis2-war/src/main/webapp/images/bullet2.gif
AU axis2-war/src/main/webapp/images/bg_header.jpg
AU axis2-war/src/main/webapp/images/guide.png
AU axis2-war/src/main/webapp/images/activate.png
AU axis2-war/src/main/webapp/images/wrapper_column_top.gif
AU axis2-war/src/main/webapp/images/gadgetTitleBg.jpg
AU axis2-war/src/main/webapp/images/window_top_start.jpg
AU axis2-war/src/main/webapp/images/tab-selected-mid.png
AU axis2-war/src/main/webapp/images/bg_button_a.gif
AU axis2-war/src/main/webapp/images/bottom.png
AU axis2-war/src/main/webapp/images/navBack.png
AU axis2-war/src/main/webapp/images/window_min.jpg
AU axis2-war/src/main/webapp/images/window_top_start.png
AU axis2-war/src/main/webapp/images/window_max.jpg
AU axis2-war/src/main/webapp/images/window_resize.gif
AU axis2-war/src/main/webapp/images/window_top_end.jpg
AU axis2-war/src/main/webapp/images/process.png
AU axis2-war/src/main/webapp/images/31-Document_48x48.png
AU axis2-war/src/main/webapp/images/window_top_end.png
AU axis2-war/src/main/webapp/images/img_main.png
AU axis2-war/src/main/webapp/images/home.png
AU axis2-war/src/main/webapp/images/window_close.jpg
AU axis2-war/src/main/webapp/images/retire.png
AU axis2-war/src/main/webapp/images/inner_back.png
AU axis2-war/src/main/webapp/images/info.png
A axis2-war/src/main/webapp/WEB-INF
A axis2-war/src/main/webapp/WEB-INF/services
AU axis2-war/src/main/webapp/WEB-INF/services/version.aar
A axis2-war/src/main/webapp/WEB-INF/conf
A axis2-war/src/main/webapp/WEB-INF/conf/axis2.xml
A axis2-war/src/main/webapp/WEB-INF/processes
A axis2-war/src/main/webapp/WEB-INF/processes/README.txt
A axis2-war/src/main/webapp/WEB-INF/web.xml
A axis2-war/src/main/webapp/WEB-INF/classes
A axis2-war/src/main/webapp/WEB-INF/classes/META-INF
A axis2-war/src/main/webapp/WEB-INF/classes/META-INF/services
A axis2-war/src/main/webapp/WEB-INF/classes/META-INF/services/org.apache.commons.logging.LogFactory
A axis2-war/src/main/webapp/WEB-INF/classes/commons-logging.properties
A axis2-war/src/main/webapp/WEB-INF/classes/log4j.properties
A axis2-war/src/main/webapp/css
A axis2-war/src/main/webapp/css/global.css
A axis2-war/src/main/webapp/css/style.css
A axis2-war/src/main/webapp/css/reset.css
A axis2-war/src/main/webapp/css/SyntaxHighlighter.css
A axis2-war/src/main/webapp/processes.html
A axis2-war/src/main/webapp/index.html
A axis2-war/src/main/webapp/instances.html
A axis2-war/src/main/webapp/js
A axis2-war/src/main/webapp/js/ProcessManagementAPI.js
A axis2-war/src/main/webapp/js/ODE.js
A axis2-war/src/main/webapp/js/bubbling
A axis2-war/src/main/webapp/js/bubbling/bubbling.js
A axis2-war/src/main/webapp/js/bubbling/assets
AU axis2-war/src/main/webapp/js/bubbling/assets/loading.gif
A axis2-war/src/main/webapp/js/bubbling/assets/accordion.css
A axis2-war/src/main/webapp/js/bubbling/accordion.js
A axis2-war/src/main/webapp/js/InstanceManagementAPI.js
A axis2-war/src/main/webapp/js/yui
A axis2-war/src/main/webapp/js/yui/datasource-beta-min.js
AU axis2-war/src/main/webapp/js/yui/charts.swf
A axis2-war/src/main/webapp/js/yui/json-min.js
A axis2-war/src/main/webapp/js/yui/button.js
A axis2-war/src/main/webapp/js/yui/tab
AU axis2-war/src/main/webapp/js/yui/tab/loading.gif
A axis2-war/src/main/webapp/js/yui/tab/skins
A axis2-war/src/main/webapp/js/yui/tab/skins/sam
A axis2-war/src/main/webapp/js/yui/tab/skins/sam/tabview.css
A axis2-war/src/main/webapp/js/yui/tab/skins/sam/tabview-skin.css
A axis2-war/src/main/webapp/js/yui/tab/tabview.css
A axis2-war/src/main/webapp/js/yui/tab/skin-sam.css
A axis2-war/src/main/webapp/js/yui/tab/border_tabs.css
A axis2-war/src/main/webapp/js/yui/tab/tabview-core.css
A axis2-war/src/main/webapp/js/yui/utilities.js
A axis2-war/src/main/webapp/js/yui/yahoo-dom-event.js
A axis2-war/src/main/webapp/js/yui/css
AU axis2-war/src/main/webapp/js/yui/css/split-button-arrow.png
A axis2-war/src/main/webapp/js/yui/css/treeview.css
AU axis2-war/src/main/webapp/js/yui/css/desc.gif
AU axis2-war/src/main/webapp/js/yui/css/split-button-arrow-disabled.png
A axis2-war/src/main/webapp/js/yui/css/simpleeditor.css
AU axis2-war/src/main/webapp/js/yui/css/menuitem_submenuindicator_disabled.png
A axis2-war/src/main/webapp/js/yui/css/autocomplete.css
A axis2-war/src/main/webapp/js/yui/css/resize.css
A axis2-war/src/main/webapp/js/yui/css/tabview.css
A axis2-war/src/main/webapp/js/yui/css/skin.css
AU axis2-war/src/main/webapp/js/yui/css/menu-button-arrow-disabled.png
A axis2-war/src/main/webapp/js/yui/css/calendar.css
AU axis2-war/src/main/webapp/js/yui/css/menuitem_submenuindicator.png
A axis2-war/src/main/webapp/js/yui/css/button.css
A axis2-war/src/main/webapp/js/yui/css/imagecropper.css
AU axis2-war/src/main/webapp/js/yui/css/dt-arrow-up.png
A axis2-war/src/main/webapp/js/yui/css/logger.css
AU axis2-war/src/main/webapp/js/yui/css/editor-sprite-active.gif
A axis2-war/src/main/webapp/js/yui/css/datatable.css
AU axis2-war/src/main/webapp/js/yui/css/header_background.png
AU axis2-war/src/main/webapp/js/yui/css/asc.gif
AU axis2-war/src/main/webapp/js/yui/css/menuitem_checkbox.png
A axis2-war/src/main/webapp/js/yui/css/fonts.css
AU axis2-war/src/main/webapp/js/yui/css/dt-arrow-dn.png
AU axis2-war/src/main/webapp/js/yui/css/editor-knob.gif
AU axis2-war/src/main/webapp/js/yui/css/menubaritem_submenuindicator.png
AU axis2-war/src/main/webapp/js/yui/css/layout_sprite.png
AU axis2-war/src/main/webapp/js/yui/css/menu-button-arrow.png
AU axis2-war/src/main/webapp/js/yui/css/split-button-arrow-active.png
AU axis2-war/src/main/webapp/js/yui/css/sprite.png
A axis2-war/src/main/webapp/js/yui/css/menu.css
A axis2-war/src/main/webapp/js/yui/css/profilerviewer.css
AU axis2-war/src/main/webapp/js/yui/css/split-button-arrow-focus.png
A axis2-war/src/main/webapp/js/yui/css/yuitest.css
AU axis2-war/src/main/webapp/js/yui/css/editor-sprite.gif
AU axis2-war/src/main/webapp/js/yui/css/split-button-arrow-hover.png
AU axis2-war/src/main/webapp/js/yui/css/treeview-sprite.gif
AU axis2-war/src/main/webapp/js/yui/css/menuitem_checkbox_disabled.png
A axis2-war/src/main/webapp/js/yui/css/colorpicker.css
A axis2-war/src/main/webapp/js/yui/css/layout.css
AU axis2-war/src/main/webapp/js/yui/css/transparent.gif
AU axis2-war/src/main/webapp/js/yui/css/wait.gif
A axis2-war/src/main/webapp/js/yui/css/container.css
AU axis2-war/src/main/webapp/js/yui/css/treeview-loading.gif
AU axis2-war/src/main/webapp/js/yui/css/picker_mask.png
AU axis2-war/src/main/webapp/js/yui/css/hue_bg.png
AU axis2-war/src/main/webapp/js/yui/css/menubaritem_submenuindicator_disabled.png
AU axis2-war/src/main/webapp/js/yui/css/blankimage.png
A axis2-war/src/main/webapp/js/yui/css/editor.css
A axis2-war/src/main/webapp/js/yui/animation.js
A axis2-war/src/main/webapp/js/yui/charts-experimental-min.js
A axis2-war/src/main/webapp/js/yui/tabview.js
A axis2-war/src/main/webapp/js/yui/container.js
A axis2-war/src/main/webapp/js/yui/element-beta.js
A axis2-war/src/main/webapp/js/DeploymentService.js
A axis2-war/src/main/webapp/js/WSRequest.js
AU axis2-war/src/main/webapp/favicon.ico
A axis2-war/pom.xml
A axis2-war/itest_setup.groovy
A jacob
A jacob/src
A jacob/src/test
A jacob/src/test/java
A jacob/src/test/java/org
A jacob/src/test/java/org/apache
A jacob/src/test/java/org/apache/ode
A jacob/src/test/java/org/apache/ode/jacob
A jacob/src/test/java/org/apache/ode/jacob/examples
A jacob/src/test/java/org/apache/ode/jacob/examples/cell
A jacob/src/test/java/org/apache/ode/jacob/examples/cell/JacobCellTest.java
A jacob/src/test/java/com
A jacob/src/test/java/com/fs
A jacob/src/test/java/com/fs/examples
A jacob/src/test/java/com/fs/jacob
A jacob/src/xdt
A jacob/src/xdt/org
A jacob/src/xdt/org/apache
A jacob/src/xdt/org/apache/ode
A jacob/src/xdt/org/apache/ode/jacob
A jacob/src/xdt/org/apache/ode/jacob/channel.xdt
A jacob/src/xdt/org/apache/ode/jacob/ChannelListener.xdt
A jacob/src/xdt/com
A jacob/src/xdt/com/fs
A jacob/src/xdt/com/fs/jacob
A jacob/src/main
A jacob/src/main/java
A jacob/src/main/java/org
A jacob/src/main/java/org/apache
A jacob/src/main/java/org/apache/ode
A jacob/src/main/java/org/apache/ode/jacob
A jacob/src/main/java/org/apache/ode/jacob/DebugInfo.java
A jacob/src/main/java/org/apache/ode/jacob/JacobRunnable.java
A jacob/src/main/java/org/apache/ode/jacob/JacobObject.java
A jacob/src/main/java/org/apache/ode/jacob/soup
A jacob/src/main/java/org/apache/ode/jacob/soup/ExecutionQueueObject.java
A jacob/src/main/java/org/apache/ode/jacob/soup/CommChannel.java
A jacob/src/main/java/org/apache/ode/jacob/soup/CommSend.java
A jacob/src/main/java/org/apache/ode/jacob/soup/CommGroup.java
A jacob/src/main/java/org/apache/ode/jacob/soup/ExecutionQueue.java
A jacob/src/main/java/org/apache/ode/jacob/soup/Continuation.java
A jacob/src/main/java/org/apache/ode/jacob/soup/Comm.java
A jacob/src/main/java/org/apache/ode/jacob/soup/CommRecv.java
A jacob/src/main/java/org/apache/ode/jacob/soup/ReplacementMap.java
A jacob/src/main/java/org/apache/ode/jacob/JacobThread.java
A jacob/src/main/java/org/apache/ode/jacob/IndexedObject.java
A jacob/src/main/java/org/apache/ode/jacob/Channel.java
A jacob/src/main/java/org/apache/ode/jacob/ValChannel.java
A jacob/src/main/java/org/apache/ode/jacob/SynchChannel.java
A jacob/src/main/java/org/apache/ode/jacob/ChannelListener.java
A jacob/src/main/java/org/apache/ode/jacob/classgen
A jacob/src/main/java/org/apache/ode/jacob/classgen/testtypes
A jacob/src/main/java/org/apache/ode/jacob/classgen/testtypes/BadInheritsBad.java
A jacob/src/main/java/org/apache/ode/jacob/classgen/testtypes/BadRetVal.java
A jacob/src/main/java/org/apache/ode/jacob/classgen/testtypes/Good.java
A jacob/src/main/java/org/apache/ode/jacob/classgen/testtypes/Good1.java
A jacob/src/main/java/org/apache/ode/jacob/classgen/testtypes/GoodInherit.java
A jacob/src/main/java/org/apache/ode/jacob/classgen/testtypes/BadThrows.java
A jacob/src/main/java/org/apache/ode/jacob/classgen/testtypes/GoodMultInherit.java
A jacob/src/main/java/org/apache/ode/jacob/ValChannelListener.java
A jacob/src/main/java/org/apache/ode/jacob/Val.java
A jacob/src/main/java/org/apache/ode/jacob/SynchChannelListener.java
A jacob/src/main/java/org/apache/ode/jacob/Synch.java
A jacob/src/main/java/org/apache/ode/jacob/vpu
A jacob/src/main/java/org/apache/ode/jacob/vpu/ChannelFactory.java
A jacob/src/main/java/org/apache/ode/jacob/vpu/JacobMessages.java
A jacob/src/main/java/org/apache/ode/jacob/vpu/JacobVPU.java
A jacob/src/main/java/org/apache/ode/jacob/vpu/ExecutionQueueImpl.java
A jacob/src/main/java/org/apache/ode/jacob/vpu/Statistics.java
A jacob/src/main/java/org/apache/ode/jacob/examples
A jacob/src/main/java/org/apache/ode/jacob/examples/cell
A jacob/src/main/java/org/apache/ode/jacob/examples/cell/Cell.java
A jacob/src/main/java/org/apache/ode/jacob/examples/cell/CellChannel.java
A jacob/src/main/java/org/apache/ode/jacob/examples/cell/CELL_.java
A jacob/src/main/java/org/apache/ode/jacob/examples/cell/CellChannelListener.java
A jacob/src/main/java/org/apache/ode/jacob/examples/eratosthenes
A jacob/src/main/java/org/apache/ode/jacob/examples/eratosthenes/NaturalNumberStreamChannel.java
A jacob/src/main/java/org/apache/ode/jacob/examples/eratosthenes/NaturalNumberStreamChannelListener.java
A jacob/src/main/java/org/apache/ode/jacob/examples/eratosthenes/NaturalNumberStream.java
A jacob/src/main/java/org/apache/ode/jacob/examples/eratosthenes/Sieve.java
A jacob/src/main/java/org/apache/ode/jacob/examples/synch
A jacob/src/main/java/org/apache/ode/jacob/examples/synch/SynchPrintChannelListener.java
A jacob/src/main/java/org/apache/ode/jacob/examples/synch/SynchPrint.java
A jacob/src/main/java/org/apache/ode/jacob/examples/synch/SynchPrinter.java
A jacob/src/main/java/org/apache/ode/jacob/examples/synch/SynchPrintChannel.java
A jacob/src/main/java/org/apache/ode/jacob/examples/sequence
A jacob/src/main/java/org/apache/ode/jacob/examples/sequence/Sequence.java
A jacob/src/generated
A jacob/pom.xml
U .
At revision 1224
Parsing POMs
[ODE] $ /qa/tools/opt/jdk1.5.0_15/bin/java -Xms256M -Xmx1024M -cp /home/hudson/hudson_workspace/maven-agent.jar:/qa/tools/opt/maven-2.2.1/boot/classworlds-1.1.jar hudson.maven.agent.Main /qa/tools/opt/maven-2.2.1 /qa/services/hudson/hudson_release/WEB-INF/slave.jar /home/hudson/hudson_workspace/maven-interceptor.jar 37476 /home/hudson/hudson_workspace/maven2.1-interceptor.jar
/qa/tools/opt/jdk1.5.0_15/bin/java: /qa/tools/opt/jdk1.5.0_15/bin/java: cannot execute binary file
ERROR: Failed to launch Maven. Exit code = 126
13 years, 4 months
riftsaw SVN: r1224 - branches/RiftSaw-ODE-2.1.x/scheduler-simple/src/main/java/org/apache/ode/scheduler/simple.
by riftsaw-commits@lists.jboss.org
Author: jeff.yuchang
Date: 2011-01-09 19:44:14 -0500 (Sun, 09 Jan 2011)
New Revision: 1224
Modified:
branches/RiftSaw-ODE-2.1.x/scheduler-simple/src/main/java/org/apache/ode/scheduler/simple/JdbcDelegate.java
Log:
*RIFTSAW-306, added ASE 15 support for simple scheduler module.
Modified: branches/RiftSaw-ODE-2.1.x/scheduler-simple/src/main/java/org/apache/ode/scheduler/simple/JdbcDelegate.java
===================================================================
--- branches/RiftSaw-ODE-2.1.x/scheduler-simple/src/main/java/org/apache/ode/scheduler/simple/JdbcDelegate.java 2011-01-07 14:26:09 UTC (rev 1223)
+++ branches/RiftSaw-ODE-2.1.x/scheduler-simple/src/main/java/org/apache/ode/scheduler/simple/JdbcDelegate.java 2011-01-10 00:44:14 UTC (rev 1224)
@@ -460,9 +460,9 @@
d = Dialect.SQLSERVER;
} else if (dbProductName.indexOf("MySQL") >= 0) {
d = Dialect.MYSQL;
- } else if (dbProductName.indexOf("Sybase") >= 0 || dbProductName.indexOf("Adaptive") >= 0) {
+ } else if (dbProductName.indexOf("Sybase") >= 0 || dbProductName.indexOf("ASE") >= 0 || dbProductName.indexOf("Adaptive") >= 0) {
d = Dialect.SYBASE;
- if( dbMajorVer == 12 ) {
+ if( dbMajorVer >= 12 ) {
d = Dialect.SYBASE12;
}
}
13 years, 4 months
riftsaw SVN: r1223 - in dsp/trunk/samples/example-deployer: deployer/resources/WEB-INF/classes and 1 other directory.
by riftsaw-commits@lists.jboss.org
Author: objectiser
Date: 2011-01-07 09:26:09 -0500 (Fri, 07 Jan 2011)
New Revision: 1223
Modified:
dsp/trunk/samples/example-deployer/deployer/resources/WEB-INF/classes/dsp.properties
dsp/trunk/samples/example-deployer/readme.txt
Log:
Updated readme to reference properties.
Modified: dsp/trunk/samples/example-deployer/deployer/resources/WEB-INF/classes/dsp.properties
===================================================================
--- dsp/trunk/samples/example-deployer/deployer/resources/WEB-INF/classes/dsp.properties 2011-01-07 14:22:19 UTC (rev 1222)
+++ dsp/trunk/samples/example-deployer/deployer/resources/WEB-INF/classes/dsp.properties 2011-01-07 14:26:09 UTC (rev 1223)
@@ -1,5 +1,8 @@
-#dsp.server.config.locator = org.jboss.soa.dsp.server.tomcat.TomcatServerConfigLocator
-#dsp.service.deployer = org.jboss.soa.dsp.deployer.tomcat.TomcatServiceDeployer
+# JBOSS APPLICATION SERVER
dsp.server.config.locator = org.jboss.soa.dsp.server.jboss.ServerConfigFactory
dsp.service.deployer = org.jboss.soa.dsp.deployer.jboss.JBossServiceDeployer
+
+# APACHE TOMCAT
+#dsp.server.config.locator = org.jboss.soa.dsp.server.tomcat.TomcatServerConfigLocator
+#dsp.service.deployer = org.jboss.soa.dsp.deployer.tomcat.TomcatServiceDeployer
Modified: dsp/trunk/samples/example-deployer/readme.txt
===================================================================
--- dsp/trunk/samples/example-deployer/readme.txt 2011-01-07 14:22:19 UTC (rev 1222)
+++ dsp/trunk/samples/example-deployer/readme.txt 2011-01-07 14:26:09 UTC (rev 1223)
@@ -8,6 +8,13 @@
Build the Example
-----------------
+1) Set the properties for the target environment
+
+Uncomment the relevant properties in the $DSP/samples/example-deployer/deployer/resources/WEB-INF/classes/dsp.properties
+file. Currently only Apache Tomcat and JBoss App Server are supported.
+
+2) Build the war ready for deployment
+
From the $DSP/samples/example-deployer folder, run the following command:
ant build
13 years, 4 months
riftsaw SVN: r1222 - dsp/trunk/samples.
by riftsaw-commits@lists.jboss.org
Author: objectiser
Date: 2011-01-07 09:22:19 -0500 (Fri, 07 Jan 2011)
New Revision: 1222
Removed:
dsp/trunk/samples/deployer/
Log:
Changed way the example is distributed and built, to enable environment properties to be changed by the user prior to building the example.
13 years, 4 months
riftsaw SVN: r1221 - in dsp/trunk/samples: deployer and 1 other directory.
by riftsaw-commits@lists.jboss.org
Author: objectiser
Date: 2011-01-07 09:21:05 -0500 (Fri, 07 Jan 2011)
New Revision: 1221
Removed:
dsp/trunk/samples/deployer-assembly/
dsp/trunk/samples/deployer/src/
dsp/trunk/samples/provider/
Log:
Changed way the example is distributed and built, to enable environment properties to be changed by the user prior to building the example.
13 years, 4 months
riftsaw SVN: r1220 - in dsp/trunk/samples/example-deployer: deployer and 19 other directories.
by riftsaw-commits@lists.jboss.org
Author: objectiser
Date: 2011-01-07 09:16:35 -0500 (Fri, 07 Jan 2011)
New Revision: 1220
Added:
dsp/trunk/samples/example-deployer/deployer/
dsp/trunk/samples/example-deployer/deployer/resources/
dsp/trunk/samples/example-deployer/deployer/resources/META-INF/
dsp/trunk/samples/example-deployer/deployer/resources/META-INF/MANIFEST.MF
dsp/trunk/samples/example-deployer/deployer/resources/WEB-INF/
dsp/trunk/samples/example-deployer/deployer/resources/WEB-INF/classes/
dsp/trunk/samples/example-deployer/deployer/resources/WEB-INF/classes/dsp.properties
dsp/trunk/samples/example-deployer/deployer/resources/WEB-INF/lib/
dsp/trunk/samples/example-deployer/deployer/resources/WEB-INF/web.xml
dsp/trunk/samples/example-deployer/deployer/resources/files/
dsp/trunk/samples/example-deployer/deployer/resources/files/placeholder.txt
dsp/trunk/samples/example-deployer/deployer/src/
dsp/trunk/samples/example-deployer/deployer/src/org/
dsp/trunk/samples/example-deployer/deployer/src/org/jboss/
dsp/trunk/samples/example-deployer/deployer/src/org/jboss/soa/
dsp/trunk/samples/example-deployer/deployer/src/org/jboss/soa/dsp/
dsp/trunk/samples/example-deployer/deployer/src/org/jboss/soa/dsp/example/
dsp/trunk/samples/example-deployer/deployer/src/org/jboss/soa/dsp/example/DSPExampleForm.java
dsp/trunk/samples/example-deployer/deployer/src/org/jboss/soa/dsp/example/DeployServlet.java
dsp/trunk/samples/example-deployer/deployer/src/org/jboss/soa/dsp/example/DeployStore.java
dsp/trunk/samples/example-deployer/deployer/src/org/jboss/soa/dsp/example/UndeployServlet.java
dsp/trunk/samples/example-deployer/deployer/src/org/jboss/soa/dsp/example/WSDeployer.java
dsp/trunk/samples/example-deployer/deployer/src/org/jboss/soa/dsp/example/WelcomeServlet.java
dsp/trunk/samples/example-deployer/provider/
dsp/trunk/samples/example-deployer/provider/src/
dsp/trunk/samples/example-deployer/provider/src/org/
dsp/trunk/samples/example-deployer/provider/src/org/jboss/
dsp/trunk/samples/example-deployer/provider/src/org/jboss/soa/
dsp/trunk/samples/example-deployer/provider/src/org/jboss/soa/dsp/
dsp/trunk/samples/example-deployer/provider/src/org/jboss/soa/dsp/example/
dsp/trunk/samples/example-deployer/provider/src/org/jboss/soa/dsp/example/provider/
dsp/trunk/samples/example-deployer/provider/src/org/jboss/soa/dsp/example/provider/ExampleServiceProvider.java
dsp/trunk/samples/example-deployer/provider/src/org/jboss/soa/dsp/example/provider/ExampleWebServiceFactory.java
Log:
Changed way the example is distributed and built, to enable environment properties to be changed by the user prior to building the example.
Added: dsp/trunk/samples/example-deployer/deployer/resources/META-INF/MANIFEST.MF
===================================================================
--- dsp/trunk/samples/example-deployer/deployer/resources/META-INF/MANIFEST.MF (rev 0)
+++ dsp/trunk/samples/example-deployer/deployer/resources/META-INF/MANIFEST.MF 2011-01-07 14:16:35 UTC (rev 1220)
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Class-Path:
+
Added: dsp/trunk/samples/example-deployer/deployer/resources/WEB-INF/classes/dsp.properties
===================================================================
--- dsp/trunk/samples/example-deployer/deployer/resources/WEB-INF/classes/dsp.properties (rev 0)
+++ dsp/trunk/samples/example-deployer/deployer/resources/WEB-INF/classes/dsp.properties 2011-01-07 14:16:35 UTC (rev 1220)
@@ -0,0 +1,5 @@
+#dsp.server.config.locator = org.jboss.soa.dsp.server.tomcat.TomcatServerConfigLocator
+#dsp.service.deployer = org.jboss.soa.dsp.deployer.tomcat.TomcatServiceDeployer
+
+dsp.server.config.locator = org.jboss.soa.dsp.server.jboss.ServerConfigFactory
+dsp.service.deployer = org.jboss.soa.dsp.deployer.jboss.JBossServiceDeployer
Added: dsp/trunk/samples/example-deployer/deployer/resources/WEB-INF/web.xml
===================================================================
--- dsp/trunk/samples/example-deployer/deployer/resources/WEB-INF/web.xml (rev 0)
+++ dsp/trunk/samples/example-deployer/deployer/resources/WEB-INF/web.xml 2011-01-07 14:16:35 UTC (rev 1220)
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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>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
Added: dsp/trunk/samples/example-deployer/deployer/resources/files/placeholder.txt
===================================================================
--- dsp/trunk/samples/example-deployer/deployer/resources/files/placeholder.txt (rev 0)
+++ dsp/trunk/samples/example-deployer/deployer/resources/files/placeholder.txt 2011-01-07 14:16:35 UTC (rev 1220)
@@ -0,0 +1 @@
+Placeholder to cause 'files' folder to be included in war.
\ No newline at end of file
Added: dsp/trunk/samples/example-deployer/deployer/src/org/jboss/soa/dsp/example/DSPExampleForm.java
===================================================================
--- dsp/trunk/samples/example-deployer/deployer/src/org/jboss/soa/dsp/example/DSPExampleForm.java (rev 0)
+++ dsp/trunk/samples/example-deployer/deployer/src/org/jboss/soa/dsp/example/DSPExampleForm.java 2011-01-07 14:16:35 UTC (rev 1220)
@@ -0,0 +1,58 @@
+/*
+ * 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;
+
+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>");
+ }
+ }
+}
Added: dsp/trunk/samples/example-deployer/deployer/src/org/jboss/soa/dsp/example/DeployServlet.java
===================================================================
--- dsp/trunk/samples/example-deployer/deployer/src/org/jboss/soa/dsp/example/DeployServlet.java (rev 0)
+++ dsp/trunk/samples/example-deployer/deployer/src/org/jboss/soa/dsp/example/DeployServlet.java 2011-01-07 14:16:35 UTC (rev 1220)
@@ -0,0 +1,169 @@
+/*
+ * 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.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.util.Iterator;
+import java.util.List;
+import java.util.zip.ZipEntry;
+import java.util.zip.ZipInputStream;
+
+import javax.servlet.ServletConfig;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.commons.fileupload.FileItem;
+import org.apache.commons.fileupload.FileUploadException;
+import org.apache.commons.fileupload.disk.DiskFileItemFactory;
+import org.apache.commons.fileupload.servlet.ServletFileUpload;
+
+
+public class DeployServlet extends HttpServlet {
+ private static final long serialVersionUID = 1L;
+
+ private static final String TMP_DIR_PATH = "/tmp";
+ private File tmpDir;
+ private static final String DESTINATION_DIR_PATH ="/files";
+ private File destinationDir;
+
+ public void init(ServletConfig config) throws ServletException {
+ super.init(config);
+ tmpDir = new File(TMP_DIR_PATH);
+ if(!tmpDir.isDirectory()) {
+ throw new ServletException(TMP_DIR_PATH + " is not a directory");
+ }
+ String realPath = getServletContext().getRealPath(DESTINATION_DIR_PATH);
+ destinationDir = new File(realPath);
+ if(!destinationDir.isDirectory()) {
+ throw new ServletException(DESTINATION_DIR_PATH+" is not a directory");
+ }
+
+ }
+
+ 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();
+
+ DiskFileItemFactory fileItemFactory = new DiskFileItemFactory ();
+ /*
+ *Set the size threshold, above which content will be stored on disk.
+ */
+ fileItemFactory.setSizeThreshold(1*1024*1024); //1 MB
+ /*
+ * Set the temporary directory to store the uploaded files of size above threshold.
+ */
+ fileItemFactory.setRepository(tmpDir);
+
+ ServletFileUpload uploadHandler = new ServletFileUpload(fileItemFactory);
+ try {
+ /*
+ * Parse the request
+ */
+ List items = uploadHandler.parseRequest(request);
+ Iterator itr = items.iterator();
+ while(itr.hasNext()) {
+ FileItem item = (FileItem) itr.next();
+ /*
+ * Handle Form Fields.
+ */
+ if(item.isFormField()) {
+ out.println("File Name = "+item.getFieldName()+", Value = "+item.getString());
+ } else if (item.getName().endsWith(".zip") == false) {
+ out.println("File must be a '.zip' archive!");
+ } else {
+ //Handle Uploaded files.
+ out.println("Uploading File: "+item.getName()+"<br>");
+
+ /*
+ * Write file to the ultimate location.
+ */
+ File file = new File(destinationDir,item.getName().substring(0, item.getName().length()-4));
+
+ file.mkdir();
+
+ File wsdlFile=unzip(out, new java.util.zip.ZipInputStream(item.getInputStream()), file.getAbsolutePath());
+
+ if (wsdlFile == null) {
+ out.println("ERROR: No WSDL definition found!!!<br>");
+ } else {
+ // Invoke dynamic service deployment mechanism
+ WSDeployer deployer=new WSDeployer();
+
+ DeployStore.add(deployer.deploy(file, wsdlFile));
+ }
+
+ // Display undeployment options
+ DSPExampleForm.buildForm(out);
+ }
+
+ out.close();
+ }
+ }catch(FileUploadException ex) {
+ log("Error encountered while parsing the request",ex);
+ } catch(Exception ex) {
+ log("Error encountered while uploading file",ex);
+ }
+
+ }
+
+ protected java.io.File unzip(PrintWriter out, ZipInputStream zis, String path) throws IOException {
+ ZipEntry ze=null;
+ java.io.File wsdlFile=null;
+
+ out.println("Unzipping file ....<br>");
+
+ while ((ze=zis.getNextEntry()) != null) {
+
+ if (ze.isDirectory()) {
+ java.io.File f=new java.io.File(path+java.io.File.separatorChar+ze.getName());
+ f.mkdirs();
+ } else {
+ out.println("Unzip: "+ze.getName()+"<br>");
+ unzipEntry(zis, ze.getName(), path);
+
+ if (ze.getName().endsWith(".wsdl")) {
+ wsdlFile = new java.io.File(path+java.io.File.separatorChar+ze.getName());
+ }
+ }
+ }
+
+ out.println("Zip unpacked.<br><br>");
+ zis.close();
+
+ return(wsdlFile);
+ }
+
+ protected void unzipEntry(ZipInputStream zis, String name, String path) throws IOException {
+ System.out.println("\t\tunzipping "+name+"<br>");
+ FileOutputStream fos = new FileOutputStream(path+java.io.File.separatorChar+name);
+ byte[] b=new byte[1024];
+ int len=0;
+
+ while ((len=zis.read(b)) != -1) {
+ fos.write(b,0,len);
+ }
+
+ fos.close();
+ }
+}
\ No newline at end of file
Added: dsp/trunk/samples/example-deployer/deployer/src/org/jboss/soa/dsp/example/DeployStore.java
===================================================================
--- dsp/trunk/samples/example-deployer/deployer/src/org/jboss/soa/dsp/example/DeployStore.java (rev 0)
+++ dsp/trunk/samples/example-deployer/deployer/src/org/jboss/soa/dsp/example/DeployStore.java 2011-01-07 14:16:35 UTC (rev 1220)
@@ -0,0 +1,41 @@
+/*
+ * 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 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/example-deployer/deployer/src/org/jboss/soa/dsp/example/UndeployServlet.java
===================================================================
--- dsp/trunk/samples/example-deployer/deployer/src/org/jboss/soa/dsp/example/UndeployServlet.java (rev 0)
+++ dsp/trunk/samples/example-deployer/deployer/src/org/jboss/soa/dsp/example/UndeployServlet.java 2011-01-07 14:16:35 UTC (rev 1220)
@@ -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/example-deployer/deployer/src/org/jboss/soa/dsp/example/WSDeployer.java
===================================================================
--- dsp/trunk/samples/example-deployer/deployer/src/org/jboss/soa/dsp/example/WSDeployer.java (rev 0)
+++ dsp/trunk/samples/example-deployer/deployer/src/org/jboss/soa/dsp/example/WSDeployer.java 2011-01-07 14:16:35 UTC (rev 1220)
@@ -0,0 +1,184 @@
+/*
+ * 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.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.ServiceDeployer;
+import org.jboss.soa.dsp.example.provider.ExampleWebServiceFactory;
+import org.jboss.soa.dsp.server.ServerConfig;
+import org.jboss.soa.dsp.ws.BaseWebServiceEndpoint;
+import org.jboss.soa.dsp.ws.DeploymentBuilder;
+import org.jboss.soa.dsp.ws.WSDLParser;
+import org.jboss.soa.dsp.ws.WSDLReference;
+import org.jboss.soa.dsp.ws.WebServiceProviderGenerator;
+
+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() {
+ }
+
+ /**
+ * Deploy the web service, using the artifacts contained within the supplied the root folder
+ * and based on the WSDL definition located in the supplied WSDL file.
+ *
+ * @param root The root folder containing the artifacts to be included in the web service
+ * @param wsdlFile The WSDL definition upon which the web service interface will be based
+ * @return The service endpoint reference of the deployed web service
+ */
+ public ServiceEndpointReference deploy(java.io.File root, java.io.File wsdlFile) throws Exception {
+ ServiceEndpointReference ref=null;
+
+ ClassLoader cl=WSDeployer.class.getClassLoader();
+
+ javax.wsdl.factory.WSDLFactory factory=javax.wsdl.factory.WSDLFactory.newInstance();
+ javax.wsdl.Definition wsdl=factory.newWSDLReader().readWSDL(null, wsdlFile.getAbsolutePath());
+
+ WSDLReference wsdlRef=new WSDLReference(wsdl, wsdlFile.toURI());
+
+ WebServiceProviderGenerator providerFactory = new WebServiceProviderGenerator();
+
+ javax.wsdl.Service service=(javax.wsdl.Service)wsdl.getServices().values().iterator().next();
+
+ _log.fine("SERVICE="+service);
+
+ javax.wsdl.Port port=(javax.wsdl.Port)service.getPorts().values().iterator().next();
+
+ _log.fine("PORT="+port);
+
+ EndpointMetaData metaData=new EndpointMetaData(service.getQName(),
+ port.getName(), new QName("http://www.example.org", "ProcessId"),
+ UUID.randomUUID().toString());
+
+ File warArchive = null;
+ try {
+ BaseWebServiceEndpoint providerImpl =
+ providerFactory.createProvider(metaData, wsdlRef, cl,
+ null, ExampleWebServiceFactory.class);
+
+ _log.fine("Provider="+providerImpl);
+
+ ServerConfig serverConfig=getServerConfig();
+
+ ServiceDeployer deployer=getServiceDeployer();
+
+ warArchive = new DeploymentBuilder(serverConfig)
+ .setEndpoint(metaData.getEndpointId())
+ .setWSDL(wsdlFile, root)
+ .setProvider(providerImpl)
+ .process(deployer.getBuildProcessor())
+ .build();
+
+ providerFactory.writeClass(warArchive);
+
+ _log.fine("War Archive="+warArchive);
+
+ URL serviceUrl = new WSDLParser(wsdlRef.getDefinition()).getServiceLocationURL(metaData.getServiceName(),
+ metaData.getPortName());
+
+ _log.fine("Service URL="+serviceUrl);
+
+ ref = deployer.deploy(metaData, providerImpl.getClass(),
+ serviceUrl, cl, warArchive, getServerConfig());
+
+ } catch (Throwable t) {
+ _log.log(Level.SEVERE, "Failed", t);
+ }
+
+ _log.fine("DEPLOYED endpoint ref="+ref);
+
+ return(ref);
+ }
+
+ public void undeploy(ServiceEndpointReference ref) throws Exception {
+ ServiceDeployer deployer=getServiceDeployer();
+
+ deployer.undeploy(ref, getServerConfig());
+ }
+
+ 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/example-deployer/deployer/src/org/jboss/soa/dsp/example/WelcomeServlet.java
===================================================================
--- dsp/trunk/samples/example-deployer/deployer/src/org/jboss/soa/dsp/example/WelcomeServlet.java (rev 0)
+++ dsp/trunk/samples/example-deployer/deployer/src/org/jboss/soa/dsp/example/WelcomeServlet.java 2011-01-07 14:16:35 UTC (rev 1220)
@@ -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
Added: dsp/trunk/samples/example-deployer/provider/src/org/jboss/soa/dsp/example/provider/ExampleServiceProvider.java
===================================================================
--- dsp/trunk/samples/example-deployer/provider/src/org/jboss/soa/dsp/example/provider/ExampleServiceProvider.java (rev 0)
+++ dsp/trunk/samples/example-deployer/provider/src/org/jboss/soa/dsp/example/provider/ExampleServiceProvider.java 2011-01-07 14:16:35 UTC (rev 1220)
@@ -0,0 +1,69 @@
+/*
+ * 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.provider;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.xml.namespace.QName;
+
+import org.jboss.soa.dsp.InvocationAdapter;
+import org.jboss.soa.dsp.MessageAdapter;
+import org.jboss.soa.dsp.ServiceProvider;
+import org.jboss.soa.dsp.ws.WSInvocationAdapter;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+
+public class ExampleServiceProvider implements ServiceProvider {
+
+ public void invoke(InvocationAdapter<?> arg0) throws Exception {
+ System.out.println("EXAMPLE SERVICE PROVIDER: invoke "+arg0);
+
+ arg0.createFault(null, new QName("http://www.example.org", "ExampleFault"),
+ new MessageAdapter() {
+
+ public Map<String, Node> getHeaderParts() {
+ return new HashMap<String,Node>();
+ }
+
+ public Element getMessage() {
+ Element ret=null;
+
+ try {
+ ret = javax.xml.parsers.DocumentBuilderFactory.newInstance().
+ newDocumentBuilder().newDocument().createElement("ExampleFaultDetails");
+ } catch(Exception e) {
+ e.printStackTrace();
+ }
+
+ return(ret);
+ }
+
+ public Element getPart(String arg0) {
+ return null;
+ }
+
+ public void setHeaderPart(String arg0, Element arg1) {
+ }
+
+ public void setPart(String arg0, Element arg1) {
+ }
+
+ });
+ }
+
+}
Added: dsp/trunk/samples/example-deployer/provider/src/org/jboss/soa/dsp/example/provider/ExampleWebServiceFactory.java
===================================================================
--- dsp/trunk/samples/example-deployer/provider/src/org/jboss/soa/dsp/example/provider/ExampleWebServiceFactory.java (rev 0)
+++ dsp/trunk/samples/example-deployer/provider/src/org/jboss/soa/dsp/example/provider/ExampleWebServiceFactory.java 2011-01-07 14:16:35 UTC (rev 1220)
@@ -0,0 +1,37 @@
+/*
+ * 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.provider;
+
+import javax.xml.namespace.QName;
+
+import org.jboss.soa.dsp.ServiceProvider;
+import org.jboss.soa.dsp.ws.SOAPMessageAdapter;
+import org.jboss.soa.dsp.ws.WSInvocationAdapter;
+import org.jboss.soa.dsp.ws.WebServiceProviderFactory;
+
+public class ExampleWebServiceFactory implements WebServiceProviderFactory {
+
+ public ServiceProvider getServiceProvider() {
+ return(new ExampleServiceProvider());
+ }
+
+ public WSInvocationAdapter getInvocationAdapter(String operationName,
+ QName serviceName, String portName, SOAPMessageAdapter soapAdapter) {
+ return(new WSInvocationAdapter(operationName,
+ serviceName, portName, soapAdapter));
+ }
+}
13 years, 4 months