Re: JumpStart v1.6 - for Tapestry 4.1.2
Hi Renat, I should have re-read that thread sooner - you are quite right, EJB 3 doesn't solve that problem at all. Regards, Geoff On 04/08/2007, at 12:54 AM, Renat Zubairov wrote: BTW Could you, Geoff, comment on how EJB 3 solve Hibernate detached object multi-thread access problem? I didn't got your point in this case. Renat On 03/08/07, Geoff Callender [EMAIL PROTECTED] wrote: Hi Kalle, I guess my starting point is that I really like the discipline of building a business facade for my system ie. a layer that says what the system can do for you, irrespective of UIs. So then the question for me is where to put that layer. Since EJB3 arrived, I've opted to put the business layer in a container because: - the configuration is almost nil - the transaction boundary is clear and usually you have to do nothing. - you get remoting for free. - you get JTA (transactions across multiple resources) for free. - you get declarative security for free - you get basic AOP for free - the DAO pattern disappears - I treat each session bean as a business service that manipulates entities directly. DAOs came into existence to hide the persistence details. but now JPA does that for you. No DAOs means one less layer of plumbing. - the old concern of creating masses of DTOs that mimic your domain model is gone, thanks to detached entities. - session beans get their own thread, so you don't get complicated problems like http://thread.gmane.org/gmane.comp.java.tapestry.user/49915/ focus=50023 - you can turn a session bean into a web service with ease I'm sure there's more that I can't think of right now. The only downside I've come across is that testing relies on the container running, but it looks like there are solutions to that just around the corner. HTH Geoff On 03/08/2007, at 1:27 PM, Kalle Korhonen wrote: Hey Geoff, could you comment on the reasons why you require an J2EE container. Is it just so that you don't need to deal with initializing the EntityManager yourself or do you see other compelling benefits in using the container? I'm asking because while we use EJB3 Hibernate annotations in Trails ( trailsframework.org), we don't use an EntityManager at all (the work had started before EntityManager was born, much less the stand alone EntityManager spec finalized), but we've been thinking of moving to using it as we start working on supporting transaction management patterns other than session-per-request. Kalle On 7/25/07, Geoff Callender [EMAIL PROTECTED] wrote: Hi Naz, Is it possible for you to put some tips to use tomcat with your JumpStart? Sorry but I don't have any plans for doing a Tomcat-only implementation, so the short answer is no. The reason is that JumpStart uses EJB3 for the business layer. That pretty much means an application server has to be involved. Today, the instructions cover just one app server: JBoss (note that JBoss has Tomcat embedded in it to handle the web layer, and the instructions cover this). In future, instructions are planned for other EJB3 implementations: Glassfish, JBoss MicroContainer, and perhaps one other app server (JOnAS? OC4J?). If someone else would like to do instructions then I'd really appreciate it, as my time for JumpStart is very limited. I'm sure it would benefit many in the Tapestry community. Regards, Geoff On 24/07/2007, at 10:51 AM, Bhuiyan, Nazmul wrote: Hi, Is it possible for you to put some tips to use tomcat with your JumpStart? Thanks Naz -Original Message- From: Geoff Callender [mailto:[EMAIL PROTECTED] Sent: Tuesday, 24 July 2007 2:18 a.m. To: Tapestry users Subject: JumpStart v1.6 - for Tapestry 4.1.2 Hi all, JumpStart v1.6.0 is now available. New features include: it works with Tapestry 4.1.2, it has a more Maven-like project structure, and it builds its exploded EAR file on the fly. You'll find it at the usual place: http://files.doublenegative.com.au/jumpstart JumpStart v1.5.0 has also been released today for those wanting to stay with Tapestry 4.0.2 but get the other new features. Comments and suggestions welcomed. Be brutal or helpful - I don't care which, because it all helps to make this stuff more useful. Cheers, Geoff Callender -- -- - 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] -- Best regards, Renat Zubairov
[T4] wierd ognl error
hi, we are running an t4 application wich has the following code in .jwc: property name=radioId initial-value=@[EMAIL PROTECTED] + '_radio' / and in .html: label jwcid=@Any for=prop:radioId.../label this normally renders to: label for=mnp_radio.../label but some times, ognl fails and renders to: label for=mnpnull.../label the only way to solve this is to reload the application! any comments on this? kind regards, peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[t4] How do I inject arbitrary services into a custom service encoder?
Hi! I have written a simple (Tapestry4) custom service encoder (CurrentFooEncoder) which works ok for now. It inserts/removes /foo first in the encoding.getServletPath(). It is declared in hivemodule.xml like contribution configuration-id=tapestry.url.ServiceEncoders page-service-encoder id=page extension=html service=page / page-service-encoder id=external extension=ehtml service=external / direct-service-encoder id=direct stateless-extension=direct stateful-extension=sdirect / asset-encoder id=asset path=/assets / extension-encoder id=extension extension=svc after=* / encoder id=CurrentFooEncoder object=instance:CurrentFooEncoder before=* / /contribution Now I wan't my CurrentFooEncoder to do some useful work, for which it needs my Spring context. How do I achieve that? I have already have a HiveMind service-point called SpringContextFactory. I guess that I shall write something magic in the object attribute, but what? Regards, Olle Hallin
Re: [t4] How do I inject arbitrary services into a custom service encoder?
Hi Olle, Try encoder id=CurrentFooEncoder object=instance:CurrentFooEncoder,springContext=spring:springContext / Basically the instance: allows for properties to be set using comma separated property=value Hope that works for you Richard Olle Hallin wrote: Hi! I have written a simple (Tapestry4) custom service encoder (CurrentFooEncoder) which works ok for now. It inserts/removes /foo first in the encoding.getServletPath(). It is declared in hivemodule.xml like contribution configuration-id=tapestry.url.ServiceEncoders page-service-encoder id=page extension=html service=page / page-service-encoder id=external extension=ehtml service=external / direct-service-encoder id=direct stateless-extension=direct stateful-extension=sdirect / asset-encoder id=asset path=/assets / extension-encoder id=extension extension=svc after=* / encoder id=CurrentFooEncoder object=instance:CurrentFooEncoder before=* / /contribution Now I wan't my CurrentFooEncoder to do some useful work, for which it needs my Spring context. How do I achieve that? I have already have a HiveMind service-point called SpringContextFactory. I guess that I shall write something magic in the object attribute, but what? Regards, Olle Hallin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [T5] Grid component failure with hibernate objects
I haven't had any problems navigating relationships in T5. But then again, I avoided the issue with the grid by collecting the properties I needed from the related objects and put them into one specifically tailored for the grid. If you don't need that relation, you could manually create the bean model, and the remove the offending relation: _beanModel.remove(OffendingProperty); Actually, I think it takes an array of property names. You might also try changing the data type so it doesn't look like a hibernate proxy: _beanModel.get(OffendingProperty).dataType(DataType); But I haven't looked into what the options are there. I would be interested to hear back about what you do and find. Jonathan -Original Message- From: Andres Alvarez [mailto:[EMAIL PROTECTED] Sent: Monday, August 06, 2007 11:03 PM To: 'Tapestry users' Subject: [T5] Grid component failure with hibernate objects Hi all, I'm trying to display an object retrieved from hibernate, it has just one relation to other object. When I try to render the page I get: 2007-08-05 15:58:40,843 [http-8080-Processor25] ERROR org.apache.tapestry.internal.services.InternalModule.RequestExceptionHandl er - Processing of request failed with uncaught exception: (class: $PropertyConduit_11438092bfd, method: set signature: (Ljava/lang/Object;Ljava/lang/Object;)V) Incompatible object argument for function call java.lang.VerifyError: (class: $PropertyConduit_11438092bfd, method: set signature: (Ljava/lang/Object;Ljava/lang/Object;)V) Incompatible object argument for function call at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2328) at java.lang.Class.getConstructors(Class.java:1446) at org.apache.tapestry.internal.services.PropertyConduitSourceImpl.build(Prop er tyConduitSourceImpl.java:166) at org.apache.tapestry.internal.services.PropertyConduitSourceImpl.create(Pro pe rtyConduitSourceImpl.java:79) I'm starting to guess that I need to pass a bean with no other objects related, Am I right? Has anyone experience on this? Thanks, Ing. Carlos Andrés Alvarez Vázquez - 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: [t4] How do I inject arbitrary services into a custom service encoder?
Hi again, I tried your suggestion, but I get an ApplicationRuntimeException: No property editor exists for property springContext of class foo.web.CurrentFooEncoder. What else must I do? It smells writing some glue code... Regards, Olle 2007/8/7, Richard Kirby [EMAIL PROTECTED]: Hi Olle, Try encoder id=CurrentFooEncoder object=instance:CurrentFooEncoder,springContext=spring:springContext / Basically the instance: allows for properties to be set using comma separated property=value Hope that works for you Richard Olle Hallin wrote: Hi! I have written a simple (Tapestry4) custom service encoder (CurrentFooEncoder) which works ok for now. It inserts/removes /foo first in the encoding.getServletPath(). It is declared in hivemodule.xml like contribution configuration-id=tapestry.url.ServiceEncoders page-service-encoder id=page extension=html service=page / page-service-encoder id=external extension=ehtml service=external / direct-service-encoder id=direct stateless-extension=direct stateful-extension=sdirect / asset-encoder id=asset path=/assets / extension-encoder id=extension extension=svc after=* / encoder id=CurrentFooEncoder object=instance:CurrentFooEncoder before=* / /contribution Now I wan't my CurrentFooEncoder to do some useful work, for which it needs my Spring context. How do I achieve that? I have already have a HiveMind service-point called SpringContextFactory. I guess that I shall write something magic in the object attribute, but what? Regards, Olle Hallin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Olle Hallin M.Sc. +46 70 6653071 [EMAIL PROTECTED] www.hit.se
Re: [T5] Grid component failure with hibernate objects
There's an issue with Tapestry and Hibernate duking it out w.r.t. class loaders. There was a similar bug fixed in 5.0.5. Are you using 5.0.5? On 8/6/07, Andres Alvarez [EMAIL PROTECTED] wrote: Hi all, I'm trying to display an object retrieved from hibernate, it has just one relation to other object. When I try to render the page I get: 2007-08-05 15:58:40,843 [http-8080-Processor25] ERROR org.apache.tapestry.internal.services.InternalModule.RequestExceptionHandler - Processing of request failed with uncaught exception: (class: $PropertyConduit_11438092bfd, method: set signature: (Ljava/lang/Object;Ljava/lang/Object;)V) Incompatible object argument for function call java.lang.VerifyError: (class: $PropertyConduit_11438092bfd, method: set signature: (Ljava/lang/Object;Ljava/lang/Object;)V) Incompatible object argument for function call at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2328) at java.lang.Class.getConstructors(Class.java:1446) at org.apache.tapestry.internal.services.PropertyConduitSourceImpl.build (Proper tyConduitSourceImpl.java:166) at org.apache.tapestry.internal.services.PropertyConduitSourceImpl.create (Prope rtyConduitSourceImpl.java:79) I'm starting to guess that I need to pass a bean with no other objects related, Am I right? Has anyone experience on this? Thanks, Ing. Carlos Andrés Alvarez Vázquez - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Howard M. Lewis Ship Partner and Senior Architect at Feature50 Creator Apache Tapestry and Apache HiveMind
Re: [t4] How do I inject arbitrary services into a custom service encoder?
Hi there, to me it seems the error message indicates that you don't have a method setSpringContext in your CurrentFooEncoder. I think hivemind will try to set that property using that method. Or maybe you need a constructor with an argument of that type. For a slightly different approach you might want to look at the tapestry-spring library at http://howardlewisship.com/tapestry-javaforge/tapestry-spring/. That will allow you to reference objects defined in your spring application context in your hivemodule.xml using the spring: - prefix. I'm not sure how the syntax would be for your encoders, though. I think you could just create an instance, and within the class you can inject spring objects using the @InjectSpring annotation. I use it in some places, works great, just can't seem to remember the syntactical sugar.. Hope this helps anyway, Lutz On 8/7/07, Olle Hallin [EMAIL PROTECTED] wrote: Hi again, I tried your suggestion, but I get an ApplicationRuntimeException: No property editor exists for property springContext of class foo.web.CurrentFooEncoder. What else must I do? It smells writing some glue code... Regards, Olle 2007/8/7, Richard Kirby [EMAIL PROTECTED]: Hi Olle, Try encoder id=CurrentFooEncoder object=instance:CurrentFooEncoder,springContext=spring:springContext / Basically the instance: allows for properties to be set using comma separated property=value Hope that works for you Richard Olle Hallin wrote: Hi! I have written a simple (Tapestry4) custom service encoder (CurrentFooEncoder) which works ok for now. It inserts/removes /foo first in the encoding.getServletPath(). It is declared in hivemodule.xml like contribution configuration-id=tapestry.url.ServiceEncoders page-service-encoder id=page extension=html service=page / page-service-encoder id=external extension=ehtml service=external / direct-service-encoder id=direct stateless-extension=direct stateful-extension=sdirect / asset-encoder id=asset path=/assets / extension-encoder id=extension extension=svc after=* / encoder id=CurrentFooEncoder object=instance:CurrentFooEncoder before=* / /contribution Now I wan't my CurrentFooEncoder to do some useful work, for which it needs my Spring context. How do I achieve that? I have already have a HiveMind service-point called SpringContextFactory. I guess that I shall write something magic in the object attribute, but what? Regards, Olle Hallin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Olle Hallin M.Sc. +46 70 6653071 [EMAIL PROTECTED] www.hit.se - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [T4] wierd ognl error
Excuse me for being picky, but your subject is misleading. You claim to have an ognl error, but obviously you are using tapestry-prop instead of ognl. From a quick look at your code I would guess the problem is that at some point the value of radioId is mnpnull. Although you have defined an initial value, it is not immutable and can take on other values of type string, I guess. If you think that's unlikely, you could also try to actually use ognl instead of prop, just to make sure it's not a shortcoming of tapestry-prop you're facing. Hth, Lutz On 8/7/07, Peter Schröder [EMAIL PROTECTED] wrote: hi, we are running an t4 application wich has the following code in .jwc: property name=radioId initial-value=@[EMAIL PROTECTED] + '_radio' / and in .html: label jwcid=@Any for=prop:radioId.../label this normally renders to: label for=mnp_radio.../label but some times, ognl fails and renders to: label for=mnpnull.../label the only way to solve this is to reload the application! any comments on this? kind regards, peter - 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]
[T4] Tapestry-Acegi error
Hi, I am trying to setup tapestry-acegi using the wiki - http://wiki.apache.org/tapestry/AcegiSpringJava5 I have tried for several hours to solve this error but I have been unsuccessful. Hoping someone might be able to shed some light on this: exception javax.servlet.ServletException: Unable to initialize application servlet: Error at jar:file:/C:/jboss/jboss-4.2.1.GA/server/default/tmp/deploy/tmp20641YingYang-exp.war/WEB-INF/lib/tapestry-acegi.jar!/META-INF/hivemodule.xml, line 38, column 51: Module tapestry.acegi has contributed to unknown configuration point ClassWorkers. The contribution has been ignored. org.apache.tapestry.ApplicationServlet.init(ApplicationServlet.java:206) org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179) org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84) org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104) org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157) org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241) org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580) org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) java.lang.Thread.run(Thread.java:619) root cause org.apache.hivemind.ApplicationRuntimeException: Error at jar:file:/C:/jboss/jboss-4.2.1.GA/server/default/tmp/deploy/tmp20641YingYang-exp.war/WEB-INF/lib/tapestry-acegi.jar!/META-INF/hivemodule.xml, line 38, column 51: Module tapestry.acegi has contributed to unknown configuration point ClassWorkers. The contribution has been ignored. [jar:file:/C:/jboss/jboss-4.2.1.GA/server/default/tmp/deploy/tmp20641YingYang-exp.war/WEB-INF/lib/tapestry-acegi.jar!/META-INF/hivemodule.xml, line 38, column 51] org.apache.hivemind.impl.StrictErrorHandler.error(StrictErrorHandler.java:39) org.apache.hivemind.impl.RegistryInfrastructureConstructor.addContributions(RegistryInfrastructureConstructor.java:451) org.apache.hivemind.impl.RegistryInfrastructureConstructor.addImplementationsAndContributions(RegistryInfrastructureConstructor.java:400) org.apache.hivemind.impl.RegistryInfrastructureConstructor.constructRegistryInfrastructure(RegistryInfrastructureConstructor.java:176) org.apache.hivemind.impl.RegistryBuilder.constructRegistry(RegistryBuilder.java:151) org.apache.tapestry.ApplicationServlet.constructRegistry(ApplicationServlet.java:253) org.apache.tapestry.ApplicationServlet.init(ApplicationServlet.java:194) org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179) org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84) org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104) org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157) org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241) org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580) org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) java.lang.Thread.run(Thread.java:619) -- View this message in context: http://www.nabble.com/-T4--Tapestry-Acegi-error-tf4233997.html#a12046203 Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]