Author: dallen6
Date: 2010-07-22 05:50:21 -0400 (Thu, 22 Jul 2010)
New Revision: 6750
Modified:
core/trunk/impl/src/main/java/org/jboss/weld/bean/proxy/ProxyFactory.java
Log:
WELD-566 Changed SPI for ProxyServices to remove the wrap method
Modified: core/trunk/impl/src/main/java/org/jboss/weld/bean/proxy/ProxyFactory.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/bean/proxy/ProxyFactory.java 2010-07-22
09:50:04 UTC (rev 6749)
+++ core/trunk/impl/src/main/java/org/jboss/weld/bean/proxy/ProxyFactory.java 2010-07-22
09:50:21 UTC (rev 6750)
@@ -386,7 +386,7 @@
// replacement object and the subsequent call get the proxy object.
CtClass exception = classPool.get(ObjectStreamException.class.getName());
CtClass objectClass = classPool.get(Object.class.getName());
- String writeReplaceBody = "{ " + " if
(firstSerializationPhaseComplete) {" + " firstSerializationPhaseComplete =
false; " + " return $0; " + " } else {" + "
firstSerializationPhaseComplete = true; " + " return
((org.jboss.weld.serialization.spi.ProxyServices)org.jboss.weld.Container.instance().services().get(org.jboss.weld.serialization.spi.ProxyServices.class)).wrapForSerialization($0);"
+ " } }";
+ String writeReplaceBody = "{ " + " if
(firstSerializationPhaseComplete) {" + " firstSerializationPhaseComplete =
false; " + " return $0; " + " } else {" + "
firstSerializationPhaseComplete = true; " + " return new
org.jboss.weld.bean.proxy.util.SerializableProxy($0);" + " } }";
proxyClassType.addMethod(CtNewMethod.make(objectClass, "writeReplace",
null, new CtClass[] { exception }, writeReplaceBody, proxyClassType));
// Also add a static method that can be used to deserialize a proxy
Show replies by date