You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by sodium <so...@yahoo.com> on 2009/05/03 11:19:09 UTC
Application scope services
Just few quick questions. I've skim through the documentation as well as the
only Tap5 book i recently bought and i didn't find any reference to this.
Is it possible to bind some sort of services using Tap5 when the container
init the Tap5 application? Also, is it possible to have those services
declared in application scope? For instance, i wanted the application to
constantly check for incoming sms from mobile connected via javacomm.
And also, I was looking at the ajax documentation. It didn't state whether
if the ajax supported is secured or not. I only wanted authenticated user to
be able to call the ajax. Is this possible with Tap5 at the moment?
--
View this message in context: http://www.nabble.com/Application-scope-services-tp23354009p23354009.html
Sent from the Tapestry - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: Application scope services
Posted by Angelo Chen <an...@yahoo.com.hk>.
Hi,
I had a similar needs before, what I did is, write a scheduler using Quarts,
then initialize it at time of IOC start up:
// Start the SMSScheduler from IOC
public static void
contributeRegistryStartup(OrderedConfiguration<Runnable>
configuration, final SMSScheduler scheduler) {
configuration.add("SMSSchedulerStartup", new Runnable() {
public void run() {
try {
scheduler.run();
} catch (SchedulerException e) {
e.printStackTrace();
}
}
});
}
sodium wrote:
>
>
> Just few quick questions. I've skim through the documentation as well as
> the only Tap5 book i recently bought and i didn't find any reference to
> this.
>
> Is it possible to bind some sort of services using Tap5 when the container
> init the Tap5 application? Also, is it possible to have those services
> declared in application scope? For instance, i wanted the application to
> constantly check for incoming sms from mobile connected via javacomm.
>
> And also, I was looking at the ajax documentation. It didn't state whether
> if the ajax supported is secured or not. I only wanted authenticated user
> to be able to call the ajax. Is this possible with Tap5 at the moment?
>
>
>
--
View this message in context: http://www.nabble.com/Application-scope-services-tp23354009p23354325.html
Sent from the Tapestry - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: Application scope services
Posted by Ulrich Stärk <ul...@spielviel.de>.
sodium schrieb:
>
>
> Just few quick questions. I've skim through the documentation as well as the
> only Tap5 book i recently bought and i didn't find any reference to this.
>
> Is it possible to bind some sort of services using Tap5 when the container
> init the Tap5 application?
Yes, absolutely. Have a look at the tapestry-ioc documentation.
> Also, is it possible to have those services
> declared in application scope? For instance, i wanted the application to
> constantly check for incoming sms from mobile connected via javacomm.
I'd do that with the help of quartz. The third-party component library Chenillekit has support for
it IIRC. Also search the list archive (tapestry.markmail.org), there has been some discussion about
Tapestry and Quart in the past.
>
> And also, I was looking at the ajax documentation. It didn't state whether
> if the ajax supported is secured or not. I only wanted authenticated user to
> be able to call the ajax. Is this possible with Tap5 at the moment?
Sure. Use the if component and only render ajax-enabled components if the user is authenticated.
Uli
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org