users@glassfish.java.net

Re: Goodbye CDI

From: Sivakumar Thyagarajan <Sivakumar.Thyagarajan_at_Sun.COM>
Date: Tue, 17 Aug 2010 23:25:22 +0530

Hi Harald

I understand your concerns around these memory leak issues. As you know,
the Weld team is addressing these issues through WELD-570. The upcoming
1.1-BETA1 release of Weld (which should be integrated into GlassFish 3.1
trunk after it becomes available) has a new javassist integration and
also proxy classloading changes that should address WELD-570 and
GlassFish issue 12368. Hopefully with these changes, the memory
footprint of your application should look better. I will test and update
my observations in 12368 after the integration.

Thanks
--Siva.

On Tuesday 17 August 2010 06:28 PM, glassfish_at_javadesktop.org wrote:
> Running the Eclipse Memory Analyzer on a heap dump of my web app, I found out that about 90 % of memory was used by org.jboss.weld.* instances.
>
> Given the amount of time I've spent in the past few months analyzing CDI/Weld-related problems, this was now the last straw.
>
> I've eliminated all CDI usage from my application, which basically amounted to replacing all @Inject annotations by @EJB and was just an hour's work.
>
> After this change, the heap memory usage has dwindled down from 500 MB to less than 50 MB, and the application starts a lot faster than before.
>
> Unlike JPA, CDI has no pluggable interface for different implementations, so for Glassfish users, CDI and Weld are synonymous and it is hard to tell whether the issues I've experienced are rooted in the specification or in the reference implementation.
>
> For me, CDI has created a lot more problems than it actually solved, and I definitely cannot recommend Weld for production use. I'll wait for the Glassfish 3.1 release before giving CDI another try, but I expect it will take another year or so for CDI to stabilize.
>
> Regards,
> Harald
> [Message sent by forum member 'hwellmann']
>
> http://forums.java.net/jive/thread.jspa?messageID=480385
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>