On Jul 27, 2009, at 11:40 AM, Peter Stavrinides wrote:

Create a service wrapper around
DatabaseConnection.getReadConnection(). This will put the
eager-loading mechanism on your side.
I will try this, but this is not relevant to the issue in question, which is how to control the ordering of eagerloaded services. The very need to eagerload a service already implies that order is important, not being able to imho is an oversight.


Not necessarily, there are two solid cases for eager-loading that don't require order. The first would be pushing a performance hit to startup-time, so the user doesn't suffer from latency while waiting for some expensive service to be manifested. The second would be for services which, if failed, should fail the entire application setup. These should be eagerly loaded so as to ensure you fix the problem before you think of your server as started. "Fail early," in other words.

Not that it can't be useful, but it isn't the goal intended, if I understand correctly. At any rate, as HLS suggested, statics are a design smell, and T5 IoC was designed around IoC patterns, so it's not that surprising. Ordered service creation would specifically be a workaround to support legacy code which could not be easily hosted into an IoC situation.

cheers,
Christian.

Christian Edward Gruber
christianedwardgru...@gmail.com
http://www.geekinasuit.com/


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

Reply via email to