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 startupService(Regi

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 L

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 Ta

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 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 thread that sends

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 ag

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 registryIsShuttingDown()

Re: problme learning t5+spring+hibernate

2010-11-29 Thread onj888-tapestry
Thanks all, problem resolved after adding "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 as we

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 wrote: > Hi there; > > I would like to display the validation fee

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 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 FAQ

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 work

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 wrote: > Hi All, > > We're looking for a new Tapestry developer at Widen

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 = null

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 https://sv

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 ful

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 w

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

Re: tapestry-hibernate, hsqldb and registry shutdown

2010-11-29 Thread Kalle Korhonen
Perhaps you should read this as well: http://www.mail-archive.com/users@tapestry.apache.org/msg41237.html. But overall, not necessarily a good idea to shut down services before their time. For your specific case though, why not just use h2 (http://h2database.com) and DB_CLOSE_ON_EXIT=TRUE instead a

Re: tapestry-hibernate, hsqldb and registry shutdown

2010-11-29 Thread Tom van Dijk
Wouldn't registryWillShutdown be used to /prepare/ the session (request a session object) which can then be used in registryDidShutdown? It's the same thread, after all. Op 29-11-2010 21:52, Kalle Korhonen schreef: Perhaps you should read this as well: http://www.mail-archive.com/users@tapestr

Re: T5: using message prefix in a javascript block

2010-11-29 Thread Angelo C.
right, turned out this works: jQuery("#info_text").watermark("${message:info_text}"); Josh Canfield wrote: > > Try looking at the source for the rendered page. It looks like you are > rendering a string without quotes. > > -- View this message in context: http://tapestry.1045711.n5.nabble