Re: session scoped services

2012-02-02 Thread John Bush
The thing is depending on the user I will be pointing to a different
location for the wsdl.  I'm creating an app that talks to a bunch of
servers in our datacenter.

Not sent with my iphone.
On Feb 2, 2012 1:36 AM, "Christian Köberl" <
tapestry.christian.koeb...@gmail.com> wrote:

> 2012-02-02, John Bush:
> > I have a project where I need some services session scoped, not
> > singletons or perthread.  The reason is that I have some web services
> > I use that need some session state for initialization.  While the
> > perthread approach works just fine, I don't want to be initializing
> > that stuff with every request.  Calling out to wslds and all the xml
> > mumbo jumbo is resource intensive.
>
> Maybe it would be better to have the web service handling in a singleton
> service (and initializes wsld and xml stuff there) which is injected
> into the thread scoped - this might work as well.
> In Tapestry you can mix service scopes.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


Re: session scoped services

2012-02-02 Thread Denis Stepanov
If you have your service in the session it also means that there is the ioc 
registry attached to it, it could be a problem when you have a cluster, best 
practices is to store only serializable objects.

Denis

Feb 2, 2012 v 9:35 AM, Christian Köberl:

> 2012-02-02, John Bush:
>> I have a project where I need some services session scoped, not
>> singletons or perthread.  The reason is that I have some web services
>> I use that need some session state for initialization.  While the
>> perthread approach works just fine, I don't want to be initializing
>> that stuff with every request.  Calling out to wslds and all the xml
>> mumbo jumbo is resource intensive.
> 
> Maybe it would be better to have the web service handling in a singleton
> service (and initializes wsld and xml stuff there) which is injected
> into the thread scoped - this might work as well.
> In Tapestry you can mix service scopes.
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
> 


-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: session scoped services

2012-02-02 Thread Christian Köberl
2012-02-02, John Bush:
> I have a project where I need some services session scoped, not
> singletons or perthread.  The reason is that I have some web services
> I use that need some session state for initialization.  While the
> perthread approach works just fine, I don't want to be initializing
> that stuff with every request.  Calling out to wslds and all the xml
> mumbo jumbo is resource intensive.

Maybe it would be better to have the web service handling in a singleton
service (and initializes wsld and xml stuff there) which is injected
into the thread scoped - this might work as well.
In Tapestry you can mix service scopes.

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: session scoped services

2012-02-01 Thread Thiago H. de Paula Figueiredo

Hi!

On Wed, 01 Feb 2012 21:30:33 -0200, John Bush  wrote:


then you need to use a builder method approach for ioc, b/c the
autobinding is not aware of session scoped items, only proper
services, at least that what I've seen in practice.


Actually, you can defined the scope of an autobound service this way:  
binder.bind(Service.class, ServiceImpl.class).scope("yourScopeName").


--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor

Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org