RE: global hivemind service
Yes, of course. You can implement your own service models however you want. You could store an implementation object in a database if you really wanted to. I meant that Tapestry doesn't (out of the box) have support for that feature. You have to be careful, though. Using session-scoped implementation objects does still have its drawbacks. If a user submits two requests from the same session, you can screw up your session-scoped data (just as you can with any session-scoped data). There are ways to avoid this, of course, but you just have to be careful. -Original Message- From: Jean-Francois Poilpret [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 26, 2006 9:33 AM To: 'Tapestry users' Subject: RE: global hivemind service If you allow me James, although HiveMind does not provide a "session-scoped" or "user-scoped" service model, you can find external implementations out there... Where? Check HiveMind Utilities hivelock module for example. I know there are other existing code for this as well. Cheers Jean-Francois -Original Message- From: James Carman [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 26, 2006 8:23 PM To: 'Tapestry users' Subject: RE: global hivemind service There is no such thing as a "session-scoped" (or user-scoped) service model in HiveMind. So, the singleton model will instantiate exactly one implementation which will be used by everyone. If you want to lookup an ASO in your HiveMind service, you use the ApplicationStateManager. Just declare a property of type ApplicationStateManager and provide a setter for it. When HiveMind builds your service implementation (assuming you're using BuilderFactory), it will automatically inject the ApplicationStateManager into your implementation object. Then, you can use it to lookup the ASO you want by name. -Original Message- From: xVik [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 26, 2006 9:18 AM To: users@tapestry.apache.org Subject: RE: global hivemind service i really dont know how to invoke application state object into hivemind service. and about singleton model.. i think it creates instance of service on first reference and this instance is also individual for each user.. may be im wrong in general i need somthing like global application state object to store some common data. -- View this message in context: http://www.nabble.com/global-hivemind-service-tf2003454.html#a5503015 Sent from the Tapestry - User forum at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: global hivemind service
If you allow me James, although HiveMind does not provide a "session-scoped" or "user-scoped" service model, you can find external implementations out there... Where? Check HiveMind Utilities hivelock module for example. I know there are other existing code for this as well. Cheers Jean-Francois -Original Message- From: James Carman [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 26, 2006 8:23 PM To: 'Tapestry users' Subject: RE: global hivemind service There is no such thing as a "session-scoped" (or user-scoped) service model in HiveMind. So, the singleton model will instantiate exactly one implementation which will be used by everyone. If you want to lookup an ASO in your HiveMind service, you use the ApplicationStateManager. Just declare a property of type ApplicationStateManager and provide a setter for it. When HiveMind builds your service implementation (assuming you're using BuilderFactory), it will automatically inject the ApplicationStateManager into your implementation object. Then, you can use it to lookup the ASO you want by name. -Original Message- From: xVik [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 26, 2006 9:18 AM To: users@tapestry.apache.org Subject: RE: global hivemind service i really dont know how to invoke application state object into hivemind service. and about singleton model.. i think it creates instance of service on first reference and this instance is also individual for each user.. may be im wrong in general i need somthing like global application state object to store some common data. -- View this message in context: http://www.nabble.com/global-hivemind-service-tf2003454.html#a5503015 Sent from the Tapestry - User forum at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: global hivemind service
There is no such thing as a "session-scoped" (or user-scoped) service model in HiveMind. So, the singleton model will instantiate exactly one implementation which will be used by everyone. If you want to lookup an ASO in your HiveMind service, you use the ApplicationStateManager. Just declare a property of type ApplicationStateManager and provide a setter for it. When HiveMind builds your service implementation (assuming you're using BuilderFactory), it will automatically inject the ApplicationStateManager into your implementation object. Then, you can use it to lookup the ASO you want by name. -Original Message- From: xVik [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 26, 2006 9:18 AM To: users@tapestry.apache.org Subject: RE: global hivemind service i really dont know how to invoke application state object into hivemind service. and about singleton model.. i think it creates instance of service on first reference and this instance is also individual for each user.. may be im wrong in general i need somthing like global application state object to store some common data. -- View this message in context: http://www.nabble.com/global-hivemind-service-tf2003454.html#a5503015 Sent from the Tapestry - User forum at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: global hivemind service
i really dont know how to invoke application state object into hivemind service. and about singleton model.. i think it creates instance of service on first reference and this instance is also individual for each user.. may be im wrong in general i need somthing like global application state object to store some common data. -- View this message in context: http://www.nabble.com/global-hivemind-service-tf2003454.html#a5503015 Sent from the Tapestry - User forum at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: global hivemind service
if you declare a service as model="threaded" a new instance will be created for every request of a new thread. so every thread has its individual instance. i think model="singleton" (default model) is what you are looking for. you could also define a application state object with application scope: http://tapestry.apache.org/tapestry4/UsersGuide/state.html#state.aso g, kris xVik <[EMAIL PROTECTED]> An 26.07.2006 14:06 users@tapestry.apache.org Kopie Bitte antwortenThema an global hivemind service "Tapestry users" <[EMAIL PROTECTED] pache.org> i need to have global hivemind service (the only for all threads (and all users)) im not shure that treaded model is what i need more dataily: data generated by this service (sitemap for example, stored in some collection) should be accessible by all working threads (and not recalculating for each user) am i right threaded is what i need? -- View this message in context: http://www.nabble.com/global-hivemind-service-tf2003454.html#a5501986 Sent from the Tapestry - User forum at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]