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!
