Thursday, May 16, 2013

Spring (Ders-8) - Scope

 Her bean bir scope kullanır. Bean-ler default olarak singleton scope kullanir.

* Singleton scopeBean object-i  bir kere olustur ve her istekte bu object kullanilir.

















* Prototype scope : Bean object-in her istekgi icin ayri object olusturur.












  



* Web scopes (request, session, globalsession)

- request : Her request icin yeni bir bean olusturur. Request bittince bean yok edilir.

- session : Session bean-i bir kere olusturur. Session sonladirilana kadar ayni bean kullanilir. Session sonladirilinca bean yok olur.
 
- globalsession : portlet-based web uygulamalarinda kullanilir. Web uygulamarinda kullanilidiklarinda sessio ile ayni ozelikleri tasir.

No comments:

Post a Comment