Hi,

i would like to share some state objects between tapestry pages and spring 
controllers (mainly login data).
My naive first approach is to create session scoped object in spring and access 
it from both sides, unfortunately it is to naive...

In spring i use @Component and @Scope("session") annotations on state object.
In tapestry i use @Inject and @Service("sharedData") annotations.

When I try accesing object from tapestry side i get 

ComponentEventException Error creating bean with name 
'scopedTarget.sharedData': Scope 'session' is not active for the current 
thread; 


What is recommended practice for sharing such data, if that is possible. I 
would like to avoid using external storage like database for various reasons 
including simplicity and performance.

I have read somewhere that T5.1 supports injecting tapestry objects into spring 
beans. Should I try that? 
I don't mind if it is still work in progress so the exact api might change a 
bit until it is final. 


PS
This is the first project I'm using T5 and as expected it is so much more fun 
than T4. 
I really love live class reloading, almost like coding in a scripting language 
but with access to all those refactorings.
Thank you Howard!


Damir


      

Reply via email to