What should I create to frequently ask it for smart clones??
elijah.epifanov Aug 22, 2006 7:41 AMWhich class encapsulates all data needed to recreate smart clone for a particular object?
The main idea is to reuse final objects pool and recreate smart clones not from raw bytes.
I tried DataContainer, but its DataContainerInput isn't thread safe and occasionally throws this:
Exception in thread "Thread-24" java.lang.RuntimeException: java.io.IOException
....
Caused by: java.io.IOException
at org.jboss.serial.persister.RegularObjectPersister.readSlotWithMethod(RegularObjectPersister.java:103)
at org.jboss.serial.persister.RegularObjectPersister.defaultRead(RegularObjectPersister.java:250)
at org.jboss.serial.persister.RegularObjectPersister.readData(RegularObjectPersister.java:228)
at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.readObjectDescriptionFromStreaming(ObjectDescriptorFactory.java:339)
at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.objectFromDescription(ObjectDescriptorFactory.java:63)
at org.jboss.serial.objectmetamodel.DataContainer$DataContainerInput.readObject(DataContainer.java:735)
at org.jboss.serial.persister.RegularObjectPersister.readSlotWithFields(RegularObjectPersister.java:302)
at org.jboss.serial.persister.RegularObjectPersister.defaultRead(RegularObjectPersister.java:252)
at org.jboss.serial.persister.RegularObjectPersister.readData(RegularObjectPersister.java:228)
at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.readObjectDescriptionFromStreaming(ObjectDescriptorFactory.java:339)
at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.objectFromDescription(ObjectDescriptorFactory.java:63)
at org.jboss.serial.objectmetamodel.DataContainer$DataContainerInput.readObject(DataContainer.java:735)
at ws.xmart.dynamic.JBossSmartCloningFilter.restore(JBossSmartCloningFilter.java:35)
... 4 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.serial.persister.RegularObjectPersister.readSlotWithMethod(RegularObjectPersister.java:97)
... 16 more
Caused by: java.io.EOFException: Unexpected end of repository
at org.jboss.serial.objectmetamodel.DataContainer$DataContainerInput.moveNext(DataContainer.java:724)
at org.jboss.serial.objectmetamodel.DataContainer$DataContainerInput.readInt(DataContainer.java:903)
at org.jboss.serial.persister.RegularObjectPersister.readSlotWithFields(RegularObjectPersister.java:282)
at org.jboss.serial.persister.RegularObjectPersister.defaultRead(RegularObjectPersister.java:252)
at org.jboss.serial.persister.RegularObjectPersister.readData(RegularObjectPersister.java:228)
at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.readObjectDescriptionFromStreaming(ObjectDescriptorFactory.java:339)
at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.objectFromDescription(ObjectDescriptorFactory.java:63)
at org.jboss.serial.objectmetamodel.DataContainer$DataContainerInput.readObject(DataContainer.java:735)
at org.jboss.serial.persister.RegularObjectPersister.readSlotWithFields(RegularObjectPersister.java:302)
at org.jboss.serial.persister.RegularObjectPersister.defaultRead(RegularObjectPersister.java:252)
at org.jboss.serial.persister.RegularObjectPersister.readData(RegularObjectPersister.java:228)
at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.readObjectDescriptionFromStreaming(ObjectDescriptorFactory.java:339)
at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.objectFromDescription(ObjectDescriptorFactory.java:63)
at org.jboss.serial.objectmetamodel.DataContainer$DataContainerInput.readObject(DataContainer.java:735)
at org.jboss.serial.persister.ArrayPersister.readObjectArray(ArrayPersister.java:217)
at org.jboss.serial.persister.ArrayPersister.readData(ArrayPersister.java:196)
at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.readObjectDescriptionFromStreaming(ObjectDescriptorFactory.java:339)
at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.objectFromDescription(ObjectDescriptorFactory.java:63)
at org.jboss.serial.objectmetamodel.DataContainer$DataContainerInput.readObject(DataContainer.java:735)
at org.jboss.serial.persister.RegularObjectPersister.readSlotWithFields(RegularObjectPersister.java:302)
at org.jboss.serial.persister.ObjectInputStreamProxy.defaultReadObject(ObjectInputStreamProxy.java:72)
at java.util.concurrent.ConcurrentHashMap.readObject(ConcurrentHashMap.java:1399)
... 20 more