Author: objectiser
Date: 2011-01-26 06:49:19 -0500 (Wed, 26 Jan 2011)
New Revision: 1274
Added:
trunk/distribution/src/main/release/db/jboss/as5.properties
Modified:
trunk/distribution/src/main/release/db/bpel.properties
trunk/distribution/src/main/release/install/build.xml
trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/EndpointManager.java
Log:
First part of sorting out RIFTSAW-336 - ensures riftsaw can be configured with the
appropriate service deployer for the AS version.
Modified: trunk/distribution/src/main/release/db/bpel.properties
===================================================================
--- trunk/distribution/src/main/release/db/bpel.properties 2011-01-25 15:33:18 UTC (rev
1273)
+++ trunk/distribution/src/main/release/db/bpel.properties 2011-01-26 11:49:19 UTC (rev
1274)
@@ -113,6 +113,12 @@
bpel.jaxws.client.initializer.impl=(a)jaxws.client.initializer.impl@
+#
+# Properties used to configure the Dynamic Service Provider deployer and service config
factory
+#
+bpel.dsp.service.deployer=(a)dsp.service.deployer@
+bpel.dsp.server.config.factory=(a)dsp.server.config.factory@
+
# This property defines whether the Web Service interface should be updated when a new
version
# of the BPEL process is deployed. If the property is false, then the web service
interface
# will be updated when a new version is deployed, however this means that the service
will
Added: trunk/distribution/src/main/release/db/jboss/as5.properties
===================================================================
--- trunk/distribution/src/main/release/db/jboss/as5.properties
(rev 0)
+++ trunk/distribution/src/main/release/db/jboss/as5.properties 2011-01-26 11:49:19 UTC
(rev 1274)
@@ -0,0 +1,2 @@
+dsp.service.deployer=org.jboss.soa.dsp.deployer.jboss.JBossServiceDeployer
+dsp.server.config.factory=org.jboss.soa.dsp.server.jboss.JBossServerConfigFactory
Modified: trunk/distribution/src/main/release/install/build.xml
===================================================================
--- trunk/distribution/src/main/release/install/build.xml 2011-01-25 15:33:18 UTC (rev
1273)
+++ trunk/distribution/src/main/release/install/build.xml 2011-01-26 11:49:19 UTC (rev
1274)
@@ -96,6 +96,7 @@
<filterset filtersfile="../db/jdbc/${database}.properties" />
<filterset filtersfile="../db/wsstack/${ws.stack}.properties" />
<filterset filtersfile="../db/cache/${cache.provider}.properties" />
+ <filterset filtersfile="../db/jboss/as${as.version}.properties" />
</copy>
<copy file="../db/datasource/bpel-${database}-ds.xml"
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-25
15:33:18 UTC (rev 1273)
+++
trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/EndpointManager.java 2011-01-26
11:49:19 UTC (rev 1274)
@@ -32,7 +32,7 @@
import org.jboss.soa.bpel.runtime.engine.ode.UDDIRegistration;
import org.jboss.soa.dsp.EndpointMetaData;
import org.jboss.soa.dsp.ServiceEndpointReference;
-import org.jboss.soa.dsp.deployer.jboss.JBossServiceDeployer;
+import org.jboss.soa.dsp.deployer.ServiceDeployer;
import org.jboss.soa.dsp.server.ServerConfig;
import org.jboss.soa.dsp.server.jboss.JBossServerConfigFactory;
import org.jboss.soa.dsp.ws.BaseWebServiceEndpoint;
@@ -60,7 +60,8 @@
*/
public class EndpointManager
{
- protected final Log log = LogFactory.getLog(getClass());
+ private static final String BPEL_DSP_SERVICE_DEPLOYER =
"dsp.service.deployer";
+protected final Log log = LogFactory.getLog(getClass());
// we should consider having our own OdeConfigProperties class if we need more
properties
private final static String BPEL_UDDI_REGISTRATION = "uddi.registration";
private static final String BPEL_WS_STABLE_INTERFACE = "ws.stableInterface";
@@ -72,7 +73,7 @@
private UDDIRegistration uddiRegistration = null;
private boolean stableInterface=false;
- private JBossServiceDeployer m_deployer=new JBossServiceDeployer();
+ private ServiceDeployer m_deployer=null; //new JBossServiceDeployer();
public EndpointManager(ExecutionEnvironment executionEnvironment)
@@ -93,6 +94,27 @@
log.info("Use stable interface: "+stableInterface);
}
+ protected synchronized ServiceDeployer getDeployer() {
+ if (m_deployer == null) {
+ String
deployerClassName=executionEnvironment.getOdeConfig().getProperty(BPEL_DSP_SERVICE_DEPLOYER);
+
+ if (deployerClassName != null) {
+ try {
+ Class<?> cls=Class.forName(deployerClassName);
+
+ m_deployer = (ServiceDeployer)cls.newInstance();
+
+ } catch(Exception e) {
+ log.error("Failed to get service deployer
'"+deployerClassName+"'", e);
+ }
+ } else {
+ log.error("Failed to find service deployer property
'"+BPEL_DSP_SERVICE_DEPLOYER+"'");
+ }
+ }
+
+ return(m_deployer);
+ }
+
public boolean isStableInterface() {
return(stableInterface);
}
@@ -154,7 +176,7 @@
URL serviceUrl = new
WSDLParser(wsdlRef.getDefinition()).getServiceLocationURL(metaData.getServiceName(),
metaData.getPortName());
- ServiceEndpointReference ref = m_deployer.deploy(metaData,
providerImpl.getClass(),
+ ServiceEndpointReference ref = getDeployer().deploy(metaData,
providerImpl.getClass(),
serviceUrl, classLoader, warArchive, serverConfig);
/*
@@ -235,7 +257,7 @@
try
{
- m_deployer.undeploy(ref, serverConfig);
+ getDeployer().undeploy(ref, serverConfig);
// unregister
endpointMapping.remove(key);
@@ -270,37 +292,6 @@
return ODEServiceEndpointReference.toODE(endpointMapping.get(key));
}
- /*
- public class DelegatingClassLoaderFactory implements ClassLoaderFactory
- {
- private ClassLoader delegate;
-
- public DelegatingClassLoaderFactory(final ClassLoader delegate)
- {
- this.delegate = delegate;
- }
-
- public ClassLoader createClassLoader(DeploymentUnit unit) throws Exception
- {
- return delegate;
- }
-
- public void removeClassLoader(DeploymentUnit unit) throws Exception
- {
- // cleanup?
- }
- }
-
- public class RiftsawWSDeploymentUnitFilter implements DeploymentUnitFilter
- {
- public boolean accepts(DeploymentUnit unit)
- {
- // When I am attached, it's always a BPEL deployment
- return false;
- }
- }
- */
-
public WebServiceClient createClient(
EndpointMetaData metaData, BPELEngineImpl server, ProcessConf pconf)
throws EndpointManagementException
Show replies by date