marc fleury wrote:
> |marc fleury wrote:
> |> We saw with rickard that Proxy creation is a bit slow and he mentioned a
> |> flag at the object level to allow pooling... will have to
> |research that...
> |> but for the pools I believe it is non important
> |
> |See:
> |http://java.sun.com/j2se/1.3/docs/api/java/lang/ref/ReferenceQueue.html
> |http://java.sun.com/j2se/1.3/docs/api/java/lang/ref/WeakReference.html
> |
> |Combine for wanted effect (that we discussed, marc).
> 
> I don't remember :) honestly (i think i was drunk that night)
> 
> can you spell it out? how it will speed up the proxy creation

You can reuse object instances by using this. At creation time you put a
WeakReference on it, and register that with the queue. When the object
(the proxy in this case) is to be GC'ed it is put on the queue. Your
creation code can now poll this queue instead of creating new objects
all the time.

Whether or not it will be a real improvement or just fancy code remains
to be seen. Potentially it could work very well though.

/Rickard

-- 
Rickard Öberg
Software Development Specialist
xlurc - Xpedio Linköping Ubiquitous Research Center
Author of "Mastering RMI"
Email: [EMAIL PROTECTED]

_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to