You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by ri...@apache.org on 2010/01/28 16:36:55 UTC
svn commit: r904134 - in /geronimo/server/trunk/plugins/cxf:
cxf/src/main/history/dependencies.xml
geronimo-cxf/src/main/java/org/apache/geronimo/cxf/pojo/POJOWebServiceContainerFactoryGBean.java
Author: rickmcguire
Date: Thu Jan 28 15:36:55 2010
New Revision: 904134
URL: http://svn.apache.org/viewvc?rev=904134&view=rev
Log:
Fix cxf build errors
Modified:
geronimo/server/trunk/plugins/cxf/cxf/src/main/history/dependencies.xml
geronimo/server/trunk/plugins/cxf/geronimo-cxf/src/main/java/org/apache/geronimo/cxf/pojo/POJOWebServiceContainerFactoryGBean.java
Modified: geronimo/server/trunk/plugins/cxf/cxf/src/main/history/dependencies.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/cxf/cxf/src/main/history/dependencies.xml?rev=904134&r1=904133&r2=904134&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/cxf/cxf/src/main/history/dependencies.xml (original)
+++ geronimo/server/trunk/plugins/cxf/cxf/src/main/history/dependencies.xml Thu Jan 28 15:36:55 2010
@@ -12,6 +12,11 @@
<type>jar</type>
</dependency>
<dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ <type>jar</type>
+ </dependency>
+ <dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<type>jar</type>
Modified: geronimo/server/trunk/plugins/cxf/geronimo-cxf/src/main/java/org/apache/geronimo/cxf/pojo/POJOWebServiceContainerFactoryGBean.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/cxf/geronimo-cxf/src/main/java/org/apache/geronimo/cxf/pojo/POJOWebServiceContainerFactoryGBean.java?rev=904134&r1=904133&r2=904134&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/cxf/geronimo-cxf/src/main/java/org/apache/geronimo/cxf/pojo/POJOWebServiceContainerFactoryGBean.java (original)
+++ geronimo/server/trunk/plugins/cxf/geronimo-cxf/src/main/java/org/apache/geronimo/cxf/pojo/POJOWebServiceContainerFactoryGBean.java Thu Jan 28 15:36:55 2010
@@ -19,6 +19,8 @@
import java.net.URL;
import java.util.Map;
+import java.util.Set;
+import java.util.LinkedHashSet;
import javax.naming.Context;
import javax.naming.NamingException;
@@ -65,46 +67,50 @@
URL configurationBaseUrl,
AnnotationHolder holder,
String contextRoot)
- throws ClassNotFoundException,
+ throws ClassNotFoundException,
IllegalAccessException,
InstantiationException {
-
+
Context context = null;
-
+
if (componentContext != null) {
-
+
// The name should match WebServiceContextAnnotationHelper.RELATIVE_JNDI_NAME
componentContext.put("env/WebServiceContext", new WebServiceContextReference());
-
+
GeronimoUserTransaction userTransaction = new GeronimoUserTransaction(transactionManager);
try {
- context = EnterpriseNamingContext.createEnterpriseNamingContext(componentContext,
- userTransaction,
- kernel,
- classLoader);
+ Context localContext = EnterpriseNamingContext.livenReferences(componentContext,
+ userTransaction,
+ kernel,
+ classLoader,
+ "comp/");
+ Set<Context> contexts = new LinkedHashSet<Context>(3);
+ contexts.add(localContext);
+ context = EnterpriseNamingContext.createEnterpriseNamingContext(contexts);
} catch (NamingException e) {
LOG.warn("Failed to create naming context", e);
}
}
- this.bus = CXFWebServiceContainer.getBus();
+ this.bus = CXFWebServiceContainer.getBus();
this.configurationBaseUrl = configurationBaseUrl;
-
+
this.servletClass = classLoader.loadClass(endpointClassName);
-
+
this.bus.setExtension(new ServerJNDIResolver(context), JNDIResolver.class);
- this.bus.setExtension(portInfo, PortInfo.class);
+ this.bus.setExtension(portInfo, PortInfo.class);
this.bus.setExtension(context, Context.class);
this.bus.setExtension(holder, AnnotationHolder.class);
-
- URL catalog = JAXWSUtils.getOASISCatalogURL(this.configurationBaseUrl,
- classLoader,
+
+ URL catalog = JAXWSUtils.getOASISCatalogURL(this.configurationBaseUrl,
+ classLoader,
JAXWSUtils.DEFAULT_CATALOG_WEB);
if (catalog != null) {
CXFCatalogUtils.loadOASISCatalog(this.bus, catalog);
}
}
-
+
public WebServiceContainer getWebServiceContainer() {
return new POJOWebServiceContainer(bus, configurationBaseUrl, servletClass);
}
@@ -114,7 +120,7 @@
return new WebServiceContextImpl();
}
}
-
+
public static final GBeanInfo GBEAN_INFO;
static {
@@ -130,17 +136,17 @@
infoBuilder.addAttribute("contextRoot", String.class, true, true);
infoBuilder.setConstructor(new String[]{
- "portInfo",
- "endpointClassName",
+ "portInfo",
+ "endpointClassName",
"classLoader",
- "componentContext",
- "kernel",
- "TransactionManager",
+ "componentContext",
+ "kernel",
+ "TransactionManager",
"configurationBaseUrl",
"holder",
"contextRoot"
});
-
+
GBEAN_INFO = infoBuilder.getBeanInfo();
}