Author: thomas.diesler(a)jboss.com
Date: 2007-03-03 12:11:21 -0500 (Sat, 03 Mar 2007)
New Revision: 2515
Modified:
trunk/jbossws-core/.classpath
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/JAXBContextCache.java
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/JAXBDeserializer.java
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/JAXBSerializer.java
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/spi/ServiceDelegateImpl.java
trunk/jbossws-core/src/java/org/jboss/ws/metadata/umdm/EndpointMetaData.java
Log:
Temporarily disable JAXBContextCache
Fix multiple call to rebuildEndpointMetaData
Modified: trunk/jbossws-core/.classpath
===================================================================
--- trunk/jbossws-core/.classpath 2007-03-03 15:32:27 UTC (rev 2514)
+++ trunk/jbossws-core/.classpath 2007-03-03 17:11:21 UTC (rev 2515)
@@ -15,7 +15,7 @@
<classpathentry kind="lib"
path="/build/thirdparty/jboss-logging-spi.jar"/>
<classpathentry kind="lib"
path="/build/thirdparty/jboss-remoting.jar"/>
<classpathentry kind="lib"
path="/build/thirdparty/jboss-xml-binding.jar"
sourcepath="/build/thirdparty/jboss-xml-binding-sources.jar"/>
- <classpathentry kind="lib" path="/build/thirdparty/wsdl4j.jar"
sourcepath="/build/thirdparty/wsdl4j-src.jar"/>
+ <classpathentry kind="lib"
path="/build/thirdparty/wsdl4j.jar"/>
<classpathentry kind="lib"
path="/build/thirdparty/xmlsec.jar"/>
<classpathentry kind="lib"
path="/build/thirdparty/ejb3.deployer/jboss-annotations-ejb3.jar"/>
<classpathentry kind="lib"
path="/build/thirdparty/ejb3.deployer/jboss-ejb3x.jar"/>
Modified: trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/JAXBContextCache.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/JAXBContextCache.java 2007-03-03
15:32:27 UTC (rev 2514)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/JAXBContextCache.java 2007-03-03
17:11:21 UTC (rev 2515)
@@ -29,10 +29,7 @@
import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBException;
-import org.jboss.ws.core.CommonMessageContext;
import org.jboss.ws.core.utils.HashCodeUtil;
-import org.jboss.ws.core.soap.MessageContextAssociation;
-import org.jboss.ws.metadata.umdm.EndpointMetaData;
/**
* Cache JAXBContext's.
@@ -57,9 +54,6 @@
/**
* Retrieve a cached JAXBContext instance.
* If no instance is cached a new one will be created and registered.
- * @param classes
- * @return
- * @throws JAXBException
*/
public JAXBContext getInstance(Class[] classes) throws JAXBException
{
@@ -77,9 +71,6 @@
/**
* Retrieve a cached JAXBContext instance.
* If no instance is cached a new one will be created and registered.
- * @param clazz
- * @return
- * @throws JAXBException
*/
public JAXBContext getInstance(Class clazz) throws JAXBException
{
@@ -98,13 +89,13 @@
* Access the JAXBContext cache through the message context.
* The actual instance is assiciated with the EndpointMetaData.
* @return JAXBContextCache
- */
public static JAXBContextCache getContextCache()
{
CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
EndpointMetaData epMetaData = msgContext.getEndpointMetaData();
return epMetaData.getJaxbCache();
}
+ */
private static Integer buildId(Class[] classes)
{
Modified: trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/JAXBDeserializer.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/JAXBDeserializer.java 2007-03-03
15:32:27 UTC (rev 2514)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/JAXBDeserializer.java 2007-03-03
17:11:21 UTC (rev 2515)
@@ -60,14 +60,16 @@
Object value = null;
try
{
- Class[] types =
(Class[])serContext.getProperty(SerializationContext.CONTEXT_TYPES);
+ Class[] javaTypes =
(Class[])serContext.getProperty(SerializationContext.CONTEXT_TYPES);
TypeMappingImpl typeMapping = serContext.getTypeMapping();
Class javaType = typeMapping.getJavaType(xmlType);
- JAXBContextCache contextCache = JAXBContextCache.getContextCache();
- JAXBContext jaxbContext = contextCache.getInstance(types);
-
+ //JAXBContextCache contextCache = JAXBContextCache.getContextCache();
+ //JAXBContext jaxbContext = contextCache.getInstance(types);
+
+ JAXBContext jaxbContext = JAXBContext.newInstance(javaTypes);
+
Unmarshaller unmarshaller = jaxbContext.createUnmarshaller();
unmarshaller.setAttachmentUnmarshaller( new AttachmentUnmarshallerImpl());
Modified: trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/JAXBSerializer.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/JAXBSerializer.java 2007-03-03
15:32:27 UTC (rev 2514)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/JAXBSerializer.java 2007-03-03
17:11:21 UTC (rev 2515)
@@ -23,27 +23,21 @@
// $Id$
-import java.io.StringWriter;
-import java.io.ByteArrayOutputStream;
import java.util.List;
import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBElement;
import javax.xml.bind.Marshaller;
-import javax.xml.datatype.XMLGregorianCalendar;
import javax.xml.namespace.QName;
-import javax.xml.ws.WebServiceException;
-import javax.xml.transform.Source;
import javax.xml.transform.Result;
-import javax.xml.transform.stream.StreamResult;
-import javax.xml.transform.dom.DOMResult;
+import javax.xml.ws.WebServiceException;
import org.jboss.logging.Logger;
import org.jboss.ws.core.jaxrpc.TypeMappingImpl;
import org.jboss.ws.core.jaxrpc.binding.BindingException;
+import org.jboss.ws.core.jaxrpc.binding.BufferedStreamResult;
import org.jboss.ws.core.jaxrpc.binding.ComplexTypeSerializer;
import org.jboss.ws.core.jaxrpc.binding.SerializationContext;
-import org.jboss.ws.core.jaxrpc.binding.BufferedStreamResult;
import org.jboss.ws.core.utils.JavaUtils;
import org.jboss.ws.extensions.xop.jaxws.AttachmentMarshallerImpl;
import org.w3c.dom.NamedNodeMap;
@@ -73,9 +67,11 @@
{
Class javaType = deriveType(value, xmlType, serContext.getTypeMapping());
- JAXBContextCache contextCache = JAXBContextCache.getContextCache();
- JAXBContext jaxbContext = contextCache.getInstance(javaType);
-
+ //JAXBContextCache contextCache = JAXBContextCache.getContextCache();
+ //JAXBContext jaxbContext = contextCache.getInstance(javaType);
+
+ JAXBContext jaxbContext = JAXBContext.newInstance(javaType);
+
Marshaller marshaller = jaxbContext.createMarshaller();
marshaller.setProperty(Marshaller.JAXB_FRAGMENT, true);
Modified:
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/spi/ServiceDelegateImpl.java
===================================================================
---
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/spi/ServiceDelegateImpl.java 2007-03-03
15:32:27 UTC (rev 2514)
+++
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/spi/ServiceDelegateImpl.java 2007-03-03
17:11:21 UTC (rev 2515)
@@ -205,6 +205,7 @@
{
JAXWSClientMetaDataBuilder metaDataBuilder = new JAXWSClientMetaDataBuilder();
metaDataBuilder.rebuildEndpointMetaData(epMetaData, seiClass);
+ annotatedPorts.add(portName);
}
return (T)createProxy(seiClass, epMetaData);
Modified: trunk/jbossws-core/src/java/org/jboss/ws/metadata/umdm/EndpointMetaData.java
===================================================================
---
trunk/jbossws-core/src/java/org/jboss/ws/metadata/umdm/EndpointMetaData.java 2007-03-03
15:32:27 UTC (rev 2514)
+++
trunk/jbossws-core/src/java/org/jboss/ws/metadata/umdm/EndpointMetaData.java 2007-03-03
17:11:21 UTC (rev 2515)
@@ -51,7 +51,6 @@
import org.jboss.ws.core.jaxrpc.binding.JBossXBSerializerFactory;
import org.jboss.ws.core.jaxrpc.binding.SOAPArrayDeserializerFactory;
import org.jboss.ws.core.jaxrpc.binding.SOAPArraySerializerFactory;
-import org.jboss.ws.core.jaxws.JAXBContextCache;
import org.jboss.ws.core.jaxws.JAXBDeserializerFactory;
import org.jboss.ws.core.jaxws.JAXBSerializerFactory;
import org.jboss.ws.core.utils.JavaUtils;
@@ -127,7 +126,7 @@
private ConfigObservable configObservable = new ConfigObservable();
- private JAXBContextCache jaxbCache = new JAXBContextCache();
+ //private JAXBContextCache jaxbCache = new JAXBContextCache();
public EndpointMetaData(ServiceMetaData service, QName portName, QName portTypeName,
Type type)
{
@@ -578,9 +577,11 @@
}
}
+ /*
public JAXBContextCache getJaxbCache() {
return jaxbCache;
}
+ */
// ---------------------------------------------------------------
// Configuration provider impl
Show replies by date