hivemind-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Chew <chew.a...@gmail.com>
Subject how can i build registry from class resource
Date Thu, 17 Nov 2005 07:31:44 GMT
Hi, there
 How can i build service registry using class resource from my jar file?
 i've put my service.xml in jar file, and try
RegistryBuilder.constructDefaultRegistry(),but i could not get service
point.
  I can get everything run ok using File Resource, but i must edit java code
when deploy my WAR file to different directorys.
  how can i use just private Registry registry =
buildRegistry("service.xml");//service.xml
will build in jar file
  not following lines:
  private Registry registry =
buildRegistry("E:/MyProj/main/src/java/service.xml");
 private static Registry buildRegistry(String fileName)
{
RegistryBuilder builder = new RegistryBuilder();
ClassResolver resolver = new DefaultClassResolver();
builder.processModules(resolver);
builder.processModule(resolver, new FileResource(fileName));//can i use
Class Resource here?
return builder.constructRegistry(Locale.getDefault());
}
 Regards
Alex

Mime
View raw message