Re: IoC Question with Alias
hi michael, happened to me several times too :) first you could try to define your services as proxy: from: binder.bind(HttpdRequestSecurityManager.class).withId("HttpdRequestSecurityManager"); to: binder.bind(RequestSecurityManager.class, HttpdRequestSecurityManager.class).withId("HttpdRequestSecurityManager"); if this is not enough try to break the dependency cycle by injecting the ObjectLocator and creating the proxy manually eg: configuration.add( AliasContribution.create( RequestSecurityManager.class, locator.proxy( RequestSecurityManager.class, HttpdRequestSecurityManager.class)) ); see also following post http://tapestry-user.markmail.org/search/?q=kristian+marinkovic#query:kristian%20marinkovic%20order%3Adate-backward+page:1+mid:pmmti5eoegosg2n5+state:results g, kris Michael Gerzabek <[EMAIL PROTECTED]> 19.09.2008 19:32 Bitte antworten an "Tapestry users" An users@tapestry.apache.org Kopie Thema IoC Question with Alias Hi, I have a problem with the contributions to the alias service. The AppModule is ... public static void bind( ServiceBinder binder ) { binder.bind( SiteDispatcher.class ).withId( "SiteDispatcher" ); binder.bind( SiteServiceImpl.class ).withId( "SiteService" ); binder.bind( HttpdRequestSecurityManager.class ).withId( "HttpdRequestSecurityManager" ); binder.bind( SiteBaseURLSource.class ).withId( "SiteBaseURLSource" ); } @SuppressWarnings( "unchecked" ) public void contributeAlias( Configuration configuration, @InjectService( "HttpdRequestSecurityManager" ) RequestSecurityManager manager, @InjectService( "SiteBaseURLSource" ) BaseURLSource baseUrlSource ) { configuration.add( AliasContribution.create( BaseURLSource.class, baseUrlSource ) ); configuration.add( AliasContribution.create( RequestSecurityManager.class, manager ) ); } The constructors of the services are ... public SiteServiceImpl( RequestGlobals globals, ApplicationGlobals application, Session session, Logger logger, Collection contributions, SymbolSource symbols ) { ... } public HttpdRequestSecurityManager( Request request, Response response, MetaDataLocator locator, RequestPageCache requestPageCache, @InjectService("SiteBaseURLSource") BaseURLSource baseURLSource, SiteService site ) { ... } public SiteBaseURLSource( SiteService site ) { ... } I get the [ERROR] Alias Construction of service Alias failed: Error invoking service builder method org.apache.tapestry5.services.TapestryModule.build(Logger, String, AliasManager, Collection) (at TapestryModule.java:205) (for service 'Alias'): Error invoking service contribution method com.flexibelinstitut.tapestry5.site.SiteModule.contributeAlias(Configuration, RequestSecurityManager, BaseURLSource): Error building service proxy for service 'HttpdRequestSecurityManager' (at com.flexibelinstitut.tapestry5.site.services.internal.HttpdRequestSecurityManager(Request, Response, MetaDataLocator, RequestPageCache, BaseURLSource, SiteService) (at HttpdRequestSecurityManager.java:26)): Error invoking constructor com.flexibelinstitut.tapestry5.site.services.internal.HttpdRequestSecurityManager(Request, Response, MetaDataLocator, RequestPageCache, BaseURLSource, SiteService) (at HttpdRequestSecurityManager.java:26) (for service 'HttpdRequestSecurityManager'): Exception constructing service 'Alias': Construction of service 'Alias' has failed due to recursion: the service depends on itself in some way. Please check org.apache.tapestry5.services.TapestryModule.build(Logger, String, AliasManager, Collection) (at TapestryModule.java:205) for references to another service that is itself dependent on service 'Alias'. And I don't even have a clue where to look. I tried a lot of different version with @Inject, with @InjectService("..") on the constructors the contributeAlias(..) method. But none of them seems to work. Any ideas? /M - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [ANNOUNCE] Tapestry 5.0.15
Great! 2008/9/22 Howard Lewis Ship <[EMAIL PROTECTED]> > Tapestry 5.0.15 is now available for download or via Maven. > > We've squeezed a whole lot of last minute improvements and fixes into > (what was supposed to be) the released candidate. Alas, we missed a > couple so the release candidate will be 5.0.16, due out in early > October. > > We recommend users upgrade to this release in preparation for the > release candidate. > > Release notes: http://tapestry.apache.org/tapestry5/release-notes.html > > Upgrade notes: http://tapestry.apache.org/tapestry5/upgrade.html > > Download: http://tapestry.apache.org/download.html > > Enjoy! > > -- > Howard M. Lewis Ship > > Creator Apache Tapestry and Apache HiveMind > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Yet Another Java EE Developer!
Re: Page pool hard limit and page instance usage
Hi again, I'm hitting my head to wall here with ServletContextSymbolProvider. It is configured like this: public static void contributeSymbolSource(OrderedConfiguration configuration, @InjectService("ServletContextSymbolProvider") SymbolProvider servletContextSymbolProvider) { configuration.add("ServletContextSymbolProvider" , servletContextSymbolProvider, "after:SystemProperties", "before:ApplicationDefaults"); } public static ServletContextSymbolProvider buildServletContextSymbolProvider(ApplicationGlobals globals){ return new ServletContextSymbolProvider(globals.getServletContext()); } And it always ends to this error: java.lang.RuntimeException: Unable to instantiate class org.apache.tapestry5.services.TapestryModule as a module builder: Exception constructing service 'Alias': Error invoking service builder method org.apache.tapestry5.services.TapestryModule.buildAlias(Logger, String, AliasManager, Collection) (at TapestryModule.java:217) (for service 'Alias'): Exception constructing service 'SymbolSource': Error invoking constructor org.apache.tapestry5.ioc.internal.services.SymbolSourceImpl(List) (at SymbolSourceImpl.java:198) via org.apache.tapestry5.ioc.services.TapestryIOCModule.bind(ServiceBinder) (at TapestryIOCModule.java:38) (for service 'SymbolSource'): Error invoking service contribution method com.example.tapestry5.services.ExampleModule.contributeSymbolSource(OrderedConfiguration, SymbolProvider): Error building service proxy for service 'ServletContextSymbolProvider' (at com.example.tapestry5.services.ExampleModule.buildServletContextSymbolProvider(ApplicationGlobals) (at ExampleModule.java:215)): Error invoking service builder method com.example.tapestry5.services.ExampleModule.buildServletContextSymbolProvider(ApplicationGlobals) (at ExampleModule.java:215) (for service 'ServletContextSymbolProvider'): Exception constructing service 'Alias': Construction of service 'Alias' has failed due to recursion: the service depends on itself in some way. Please check org.apache.tapestry5.services.TapestryModule.buildAlias(Logger, String, AliasManager, Collection) (at TapestryModule.java:217) for references to another service that is itself dependent on service 'Alias'. I can't determine where the recursion is. Is the ApplicationGlobals initiating the construction of Alias service? If this is true then ApplicationGlobsals cannot be used while I'm constructing my alias overrides? Is there anyone out there who has this working? - 99 Ulrich Stärk wrote: > > You don't have to write your own ServletContextSymbolProvider, it already > comes shipped with > Tapestry. See here > http://tapestry.apache.org/tapestry5/apidocs/index.html?org/apache/tapestry5/ioc/services/SymbolProvider.html > You just have to configure it. > > Uli > > 9902468 schrieb: >> Yep, just read through your discussion: >> >> http://www.nabble.com/forum/ViewPost.jtp?post=19547763&framed=y&skin=302 >> >> and that would be the intelligent way of doing it :) >> >> I'll code symbol provider when I have time. Hopefully these providers can >> be >> included in T5 distribution, as these are highly reusable and add only >> little to none "weight" to the distribution. >> >> - 99 >> >> >> Ulrich Stärk wrote: >>> Why not instantiate a ServletContextSymbolProvider (the ServletContext >>> is >>> available from the >>> ApplicationGlobals service) and contribute it to the SymbolProvider >>> before >>> ApplicationDefaults and >>> FactoryDefaults. That way you can directly override >>> tapestry.page-pool.hard-limit and automatically >>> have all other init parameters as symbols, too. >>> >>> Uli >>> >>> 9902468 schrieb: I always keep nabble open when I'm at work :) These parameters can be transferred to web.xml, so that recompile is not needed when changing these parameters: public static void contributeApplicationDefaults(MappedConfiguration>>> String> configuration, ApplicationGlobals globals) { configuration.add("tapestry.page-pool.hard-limit", globals.getServletContext().getInitParameter("page_hard_limit")); } and in web.xml Some Tapestry 5 Application tapestry.app-package fi.hanken.resbuilder.tapestry5 page_hard_limit 60 This can be used through out every single service and page and component. To access this in a page or component use: @Property @Inject @Value("${page_hard_limit}") private String pageHardLimit; Injection can be used in service constructor also (I think) or by using buildSomeService method instead of the usual binder.bind Of course T5 makes it easy to read these from a file or database or from what not, but I have noticed that many admins accept editing web.xml and restarting the app ok.
Re: [ANN] t5components 0.5.15 is now available for Tapestry 5.0.15
hi! how do i put the thumbNail(5.0.13) in my application? Hi there, t5components 0.5.15 is now available for Tapestry 5.0.15 with some fixes project page http://tapestry5-components.googlecode.com -- with regards Sven Homburg http://www.chenillekit.org http://tapestry5-components.googlecode.com - best regards Sven -- View this message in context: http://www.nabble.com/-ANN--t5components-0.5.15-is-now-available-for-Tapestry-5.0.15-tp19598681p19602184.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[ANN] t5components 0.5.15 is now available for Tapestry 5.0.15
Hi there, t5components 0.5.15 is now available for Tapestry 5.0.15 with some fixes project page http://tapestry5-components.googlecode.com -- with regards Sven Homburg http://www.chenillekit.org http://tapestry5-components.googlecode.com
[ANNOUNCE] Tapestry 5.0.15
Tapestry 5.0.15 is now available for download or via Maven. We've squeezed a whole lot of last minute improvements and fixes into (what was supposed to be) the released candidate. Alas, we missed a couple so the release candidate will be 5.0.16, due out in early October. We recommend users upgrade to this release in preparation for the release candidate. Release notes: http://tapestry.apache.org/tapestry5/release-notes.html Upgrade notes: http://tapestry.apache.org/tapestry5/upgrade.html Download: http://tapestry.apache.org/download.html Enjoy! -- Howard M. Lewis Ship Creator Apache Tapestry and Apache HiveMind - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Integration with GWT
Hi, I use T5 in my project as main web framework. The project itself is a sort of simple web GIS, based on Google Maps. There is great widget library for GWT to serve Google Maps with all their AJAX stuff, so I decided to use it also. Please, give me some information whether it's possible to integrate full lifecycle of GWT component with T5 as main framework? What I actually need is to be able to share some objects between Tapestry and GWT, but without page reload. So my GWT component should make its RPCs as usual, but these calls should be made after pressing button in Tapestry component and information should be got from that component too (@ApplicationState may be, but how to integrate it with GWT?)