section 6.6.2: > all beans with normal scope are passivation capable dependencies,
exactly _because_ we create a proxy to make them serializable :) As for Javassist. I didn't update the pom to the newer version exactly because it's not released yet. Thus we currently suffer from the serialization problem and also produce permgenspace leaks. But my changes didn't make things worse. If you use the fixed Javassist version then serialization works properly - if you do not, then it's broken as it was before. I already talked with Pete and davidrallen about that, and they were glad to now have an explanation for their mem leaks too. In fact, they have the same problems as we do, thus I'm pretty optimistic that my patch (or at least something similar) gets released really soon. There is some cleanup work to do though in the caching logic of javassist (which we do not rely on). What I meant to say with my original statement: with the released javassist, there is no way to create serializable proxies. And even if you use the defaultHandler, you will create huge amounts of permgenspace leaks. This of course only makes a huge difference if you actually serialize beans, which is not the case with the builtin scopes of OWB. But I really got slaughtered when using our @ViewScoped extension, because the JSF ViewMap gets serialized with _ervery_ page impression :) LieGrue, strub --- Gurkan Erdogdu <[email protected]> schrieb am Mo, 22.2.2010: > Von: Gurkan Erdogdu <[email protected]> > Betreff: Re: AW: Recent Commits > An: [email protected] > Datum: Montag, 22. Februar, 2010 18:01 Uhr > Problem is not related with > serializing bean proxy or dependent instance. If the bean > scope is passivating capable then you have to validate all > of its injection poinsts that must be passivation capable > dependency. > > If you have a ApplicatinScoped bean and one of its > dependency is not passivation capable you have to throw > exception instead of serializing this dependent instance > proxy or actual instance. > > Please have a look 6.6.2 and 6.6.4. It explains this. > > Currently you save all of the dependencies of the bean > instance whether or not they are passivation capable ornot. > (Because you are using getId on BeanManagerImpl to add every > bean into passivation capable map. This is not correct!, old > code check the passivating capability of the bean before > adding it into map.) > > One more point : Our code base must not depend on > on-released version of any third party. Therefore we must > not depend on Javassist with patching. If current code base > depends patched version, we must revoke this and update it > after actual release of Javassist. > > Thanks > , > Gurkan > > > > > ________________________________ > From: Mark Struberg <[email protected]> > To: [email protected] > Sent: Mon, February 22, 2010 6:23:19 PM > Subject: AW: Recent Commits > > nope, the scope only doesn't allow this if it the scope of > the injected bean is not a NormalScope. > > An @ApplicationScoped bean is proxied and we only serialize > the proxies in this case. > > 5.4 defines the following: > > Finally, client proxies may be passivated, even when > the bean itself may > > not be. Therefore the container must use a client > proxy whenever a bean > > with normal scope is injected into a bean with a > passivating scope, as > > defined in Section 6.6, “Passivation and passivating > scopes”. (On the > > other hand, beans with scope @Dependent must be > serialized > > along with their client.) > > is that what you are looking for? > > If you have further doubt then please tell me. I did change > quite lot things and was not 100% sure about all parts - > only 97% :) > > txs and LieGrue, > strub > > > --- Gurkan Erdogdu <[email protected]> > schrieb am Mo, 22.2.2010: > > > Von: Gurkan Erdogdu <[email protected]> > > Betreff: Recent Commits > > An: [email protected] > > Datum: Montag, 22. Februar, 2010 16:56 Uhr > > Hi Mark; > > > > You have committed some code over weekend related > with > > serialization etc. I > > have skimmed over some changes. My observations > are: > > > > 1* You treat all beans as passivation capable and > saving > > info (Changinb > > BeanManagerImpl) > > I think that this is wrong. > You said said in > > commit comment : > > > > This is needed since we also need to serialise proxies > of > > NormalScoped > > > Beans which are not passivating. Imagine an > > @ApplicationScoped userService > > > gets injected into a @ViewScoped ListModel. > > > > > > But spec. does not allows this. If you have a > > passivating capable and it > > contains not passivating capable dependency you have > to > > throw exception. > > (Section 6.6.4) > > > > 2* You set ApplicationScopedLiteral to > ConversationBean > > This is not true, ConversationBean > scope must be > > RequestScoped. > > > > 3* You add "isDependent" to OwbBean but you do not > > implement this in > > AbstractInjectionTarget, ProducerFieldBean, EJBean > etc. > > > > Thanks; > > > > --Gurkan > > > > __________________________________________________ > Do You Yahoo!? > Sie sind Spam leid? Yahoo! Mail verfügt über einen > herausragenden Schutz gegen Massenmails. > http://mail.yahoo.com > > > > > ___________________________________________________________________ > Yahoo! Türkiye açıldı! http://yahoo.com.tr > İnternet üzerindeki en iyi içeriği Yahoo! Türkiye > sizlere sunuyor! __________________________________________________ Do You Yahoo!? Sie sind Spam leid? Yahoo! Mail verfügt über einen herausragenden Schutz gegen Massenmails. http://mail.yahoo.com
