The RegistryBuilder object may not be as hard to create as you think. I
wrote a standalone app that needed access to the Hivemind registry
normally used by our Tapestry app, it looked something like this:
RegistryBuilder builder = new RegistryBuilder();
builder.addDefaultModuleDescriptorProvider();
Registry registry = builder.constructRegistry(Locale.getDefault());
If you need to add a custom hivemodule.xml you can also add that in like
this:
builder.addModuleDescriptorProvider(new XmlModuleDescriptorProvider(new
DefaultClassResolver(), "mypath/hivemodule.xml"));
Then you can pull services directly out of the registry like so:
registry.getService("moduleName.serviceName", InterfaceName.class)
HTH
Ben
-----Original Message-----
From: Rob Dennett [mailto:[EMAIL PROTECTED]
Sent: Wednesday, April 26, 2006 5:06 PM
To: Tapestry users
Subject: Bootstrapping registry from a test
I am having an issue where tapestry says that a service does not exist.
I want to write a test class to confirm that my services can be found
(basically I want to test hivemodule.xml), but I can't figure out how to
bootstrap the registry from my test case which is not on the regular
class. The javadocs for RegistryBuilder say that I need to make a
custom registry builder to do this. This turns out to be rather
complicated, more so than I want for a test case. Is there another way
to do this?
Thanks,
Rob
--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.385 / Virus Database: 268.4.6/324 - Release Date: 4/25/2006
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]