Re: tapestry-hibernate, hsqldb and registry shutdown

2010-11-29 Thread Tom van Dijk
What if you do this: public class DbShutdownImpl implements DbShutdown, RegistryShutdownListener { @Inject private HibernateSessionSource sessionSource; private final static Logger LOG = Logger.getLogger(DbShutdownImpl.class); @PostInjection public void

Re: tapestry-hibernate, hsqldb and registry shutdown

2010-11-29 Thread Javier Molina
Subclass TapestryFilter, map your class instead of Tapestry's in web.xml and override destroy(Registry registry). There you can use something like: DbShutdown dbShutdown = registry.getService(DbShutdown.class); // add this new method and close the database there dbShutdown.shutdownDatabase();

Re: tapestry-hibernate, hsqldb and registry shutdown

2010-11-29 Thread Paul Stanton
same error, different service which can't be injected. On 29/11/2010 8:13 PM, Tom van Dijk wrote: What if you do this: public class DbShutdownImpl implements DbShutdown, RegistryShutdownListener { @Inject private HibernateSessionSource sessionSource; private final static Logger

Re: tapestry-hibernate, hsqldb and registry shutdown

2010-11-29 Thread Paul Stanton
Thanks Javier, this sounds like it would work, but then it also doesn't sound very 'tapestry-ish' and if it's the only way to achieve this, shows a bit of a hole in the tapestry/tapestry-ioc implementation... is there a better solution? On 29/11/2010 8:17 PM, Javier Molina wrote: Subclass

Re: tapestry-hibernate, hsqldb and registry shutdown

2010-11-29 Thread Thiago H. de Paula Figueiredo
On Mon, 29 Nov 2010 03:28:09 -0200, Paul Stanton p...@mapshed.com.au wrote: Hi all, Hi! I'm using tapestry-hibernate and an embedded HSQLDB database. Another suggestion: why don't you use a non-embedded HSQLDB database while developing? That's what I do when I use HSQLDB. Or launch a

Re: tapestry-hibernate, hsqldb and registry shutdown

2010-11-29 Thread Paul Stanton
thanks thiago, that would work too... however if using a embedded hsqldb in production the same problem would occur... in order to solve my case, it's probably simpler to just create a new jdbc connection for shutdown (without hibernate support). however i'm intrigued that there's no ability

Re: tapestry-hibernate, hsqldb and registry shutdown

2010-11-29 Thread Tom van Dijk
Which service would that be? Could you provide a stack trace? Perhaps you could make your service contribute to RegistryStartup as well, to make sure the DbShutdownImpl service is realized and that the sessionSource is realized. The startupService would then be the registry startup method. I

Re: tapestry-hibernate, hsqldb and registry shutdown

2010-11-29 Thread Javier Molina
Overriding the filter might look ugly, but it was designed for that; see the comments on destroy() and destroy(Registry registry). You might find it less ugly to have a ServletContextListener and do the cleanup in contextDestroyed. The real solution would be to have a

Re: problme learning t5+spring+hibernate

2010-11-29 Thread onj888-tapestry
Thanks all, problem resolved after adding config-param tapestry.use-external-spring-context to true. 於 2010/11/29 5:24, Jonathan Barker 提到: Remove the ContextLoaderListener, and remove the @Service annotation. One of the changes in T5.1 was the ability to inject T5 services into Spring beans

RE: How to extend a parent template

2010-11-29 Thread Lu Mudong
Thanks, guys, now I understand. I think I need to dig more on this. At least at the moment, Django's approach seems more flexible to me Ron Date: Sun, 28 Nov 2010 21:47:04 -0800 Subject: Re: How to extend a parent template From: joshcanfi...@gmail.com To: users@tapestry.apache.org

Displaying inline validation messages

2010-11-29 Thread Josh Kamau
Hi there; I would like to display the validation feedback messages alongside the field that failed. Is this possible with wicket? regards. Josh

Re: Displaying inline validation messages

2010-11-29 Thread Juan E. Maya
Hi Josh! :) Not sure in wicket but in tapestry is possible. ;) Checkout this example from Jumpstart: http://jumpstart.doublenegative.com.au/jumpstart/examples/input/novalidationbubbles1 On Mon, Nov 29, 2010 at 2:45 PM, Josh Kamau joshnet2...@gmail.com wrote: Hi there; I would like to display

Re: how to cleanup threads when tapestry shutsdown

2010-11-29 Thread Howard Lewis Ship
Fixed, thanks. On Sun, Nov 28, 2010 at 9:14 PM, Paul Stanton p...@mapshed.com.au wrote: Howard, There's a typo in this FAQ: shutdownHub.addShutdownListener(this); should be shutdownHub.addRegistryShutdownListener(this); p. On 18/09/2010 7:50 AM, Howard Lewis Ship wrote: Added to

Tapestry Job Opening

2010-11-29 Thread Ben Dotte
Hi All, We're looking for a new Tapestry developer at Widen Enterprises, Inc. The full description and contact information is available here: http://www.widen.com/careers/careers_software_dev.php We've been using Tapestry extensively since v2 and we have lots of exciting new projects in the

Re: Tapestry Job Opening

2010-11-29 Thread Howard Lewis Ship
I regularly work with the developers at Widen and I can vouch that it's a fun place to work and a great team. They're doing ambitious work and really using Tapestry to its fullest. On Mon, Nov 29, 2010 at 8:45 AM, Ben Dotte ben.do...@gmail.com wrote: Hi All, We're looking for a new Tapestry

hibernatesessionmanager produces redundant exception

2010-11-29 Thread Yury Luneff
Greetings. I made a simple example playing with hibernate spatial / etc. I have following event handler on my page (tapestry 5.1.0.5): public void onClick() { Stop stop = new Stop(); WKTReader fromText = new WKTReader(); Geometry poly = null; Transaction tx =

Re: hibernatesessionmanager produces redundant exception

2010-11-29 Thread Tom van Dijk
Well, the thing is that an injected Session is retrieved from the HibernateSessionManager. This service is a per-thread service, so every request (has a seperate, new thread and thus) has its own HibernateSessionManager. This service automatically starts a new transaction. (see also

Re: Tapestry Job Opening

2010-11-29 Thread Robert Zeigler
Heh... your website is written in php (or else you have some really funky server-side mappings); you can't help but appreciate the irony. :) Robert On Nov 29, 2010, at 11/2910:45 AM , Ben Dotte wrote: Hi All, We're looking for a new Tapestry developer at Widen Enterprises, Inc. The full

Re: tapestry-hibernate, hsqldb and registry shutdown

2010-11-29 Thread Tom van Dijk
Well, designed or not, I suppose overriding the filter is not a modular solution. You can't add a third party library and expect it to work, instead the application developer needs to do additional work by modifying web.xml and on top of that, if you use your service without tapestry-core, it

Re: tapestry-hibernate, hsqldb and registry shutdown

2010-11-29 Thread Paul Stanton
Javier, I agree re registryIsShuttingDown .. that is what i'm looking for. something that is called after new httprequests have been stopped, but before the registry becomes broken. there would need to be some ordered configuration to control the process however. i'm guessing this doesn't